Commit 8664b890 authored by Alexandre Julliard's avatar Alexandre Julliard

Release 960405

Fri Apr 5 15:22:55 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [controls/button.c] [controls/static.c] Changes to use WND * wherever possible. * [debugger/dbg.y] [debugger/debug.l] Added 'info module' and 'walk module' commands. * [if1632/Makefile.in] [if1632/relay.c] [tools/build.c] Added assembly code generation to call from Wine into 32-bit code. Changed all 'call32' references in 'callfrom16' to avoid confusion with Win32 routines. * [include/callback.h] Added prototypes for 32-bit callbacks. * [loader/module.c] [if1632/relay32.c] [tools/build.c] Unified 16- and 32-bit modules. The fake module for 32-bit DLLs is now generated by the build program. * [include/module.h] Added extra info to NE_MODULE for Win32 modules to point to the PE module data. * [include/pe_image.h] [loader/pe_image.c] [win32/resource.c] Removed the wine_files list. The PE data for a module can now be accessed with the NE_WIN32_MODULE macro. * [loader/signal.c] [miscemu/instr.c] Don't start the BIOS timer at startup, but only after an access to the 0x40 segment. * [memory/local.c] Changed LOCAL_Lock() to return a 32-bit pointer. * [misc/main.c] [include/dlls.h] Some built-in DLLs (like KERNEL) can no longer be disabled from the command-line. Thu Apr 4 19:54:39 1996 Keith Reynolds <keithr@sco.COM> * [*/*] A lot of small changes to support SCO OpenServer 5. Thu Apr 4 15:38:13 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl> * [controls/edit.c] Fixed GetKeyState() call to use 0x8000 convention. * [include/windows.h] Added undocumented messages EM_SCROLL and EM_GETTHUMB. Thu Apr 4 09:52:52 1996 John Harvey <john@division.co.uk> * [if1632/except.S] Modified code to assemble on unixware. Wed Apr 3 09:38:26 1996 Juergen Marquardt <marqu@lunar.advantest.de> * [objects/font.c] Implementation of a second font cache which will be updated dynamically. Mon Apr 1 16:47:40 1996 Robert Pouliot <krynos@qbc.clic.net> * [resources/sysres_Cz.rc] [resources/sysres_Da.rc] [resources/sysres_De.rc] [resources/sysres_Eo.rc] [resources/sysres_Es.rc] [resources/sysres_Fi.rc] [resources/sysres_No.rc] [resources/TODO] Updated FIND_TEXT and REPLACE_TEXT to work like the English version.
parent c981d0bf
This is release 960331 of Wine the MS Windows emulator. This is still a
This is release 960405 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-960331: (see ChangeLog for details)
- Many improvements to keyboard handling.
- New registry code with Win32 support.
- Support for Italian language.
WHAT'S NEW with Wine-960405: (see ChangeLog for details)
- Faster text display.
- Support for SCO OpenServer 5.
- Cleaner Win32 module handling.
- Lots of bug fixes.
See the README file in the distribution for installation instructions.
......@@ -17,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-960331.tar.gz
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-960331.tar.gz
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-960331.tar.gz
aris.com:/pub/linux/ALPHA/Wine/development/Wine-960331.tar.gz
sunsite.unc.edu:/pub/Linux/ALPHA/wine/development/Wine-960405.tar.gz
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-960405.tar.gz
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-960405.tar.gz
aris.com:/pub/linux/ALPHA/Wine/development/Wine-960405.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite.
......
----------------------------------------------------------------------
Fri Apr 5 15:22:55 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/button.c] [controls/static.c]
Changes to use WND * wherever possible.
* [debugger/dbg.y] [debugger/debug.l]
Added 'info module' and 'walk module' commands.
* [if1632/Makefile.in] [if1632/relay.c] [tools/build.c]
Added assembly code generation to call from Wine into 32-bit code.
Changed all 'call32' references in 'callfrom16' to avoid confusion
with Win32 routines.
* [include/callback.h]
Added prototypes for 32-bit callbacks.
* [loader/module.c] [if1632/relay32.c] [tools/build.c]
Unified 16- and 32-bit modules. The fake module for 32-bit DLLs is
now generated by the build program.
* [include/module.h]
Added extra info to NE_MODULE for Win32 modules to point to the PE
module data.
* [include/pe_image.h] [loader/pe_image.c] [win32/resource.c]
Removed the wine_files list. The PE data for a module can now be
accessed with the NE_WIN32_MODULE macro.
* [loader/signal.c] [miscemu/instr.c]
Don't start the BIOS timer at startup, but only after an access to
the 0x40 segment.
* [memory/local.c]
Changed LOCAL_Lock() to return a 32-bit pointer.
* [misc/main.c] [include/dlls.h]
Some built-in DLLs (like KERNEL) can no longer be disabled from
the command-line.
Thu Apr 4 19:54:39 1996 Keith Reynolds <keithr@sco.COM>
* [*/*]
A lot of small changes to support SCO OpenServer 5.
Thu Apr 4 15:38:13 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl>
* [controls/edit.c]
Fixed GetKeyState() call to use 0x8000 convention.
* [include/windows.h]
Added undocumented messages EM_SCROLL and EM_GETTHUMB.
Thu Apr 4 09:52:52 1996 John Harvey <john@division.co.uk>
* [if1632/except.S]
Modified code to assemble on unixware.
Wed Apr 3 09:38:26 1996 Juergen Marquardt <marqu@lunar.advantest.de>
* [objects/font.c]
Implementation of a second font cache which will be updated
dynamically.
Mon Apr 1 16:47:40 1996 Robert Pouliot <krynos@qbc.clic.net>
* [resources/sysres_Cz.rc] [resources/sysres_Da.rc]
[resources/sysres_De.rc] [resources/sysres_Eo.rc]
[resources/sysres_Es.rc] [resources/sysres_Fi.rc]
[resources/sysres_No.rc] [resources/TODO]
Updated FIND_TEXT and REPLACE_TEXT to work like the English version.
----------------------------------------------------------------------
Sun Mar 31 13:54:46 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [tools/build.c]
......
......@@ -3,7 +3,8 @@
# First some useful definitions
CC = @CC@
SHELL = /bin/sh
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
DEFS = @DEFS@
......
......@@ -11,7 +11,8 @@
# First some useful definitions
CC = @CC@
SHELL = /bin/sh
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
DEFS = @DEFS@ -DWINE_INI_GLOBAL=\"$(WINE_INI_GLOBAL)\"
......
......@@ -135,16 +135,7 @@ static HLOCAL EDIT_HeapAlloc(HWND hwnd, int bytes, WORD flags)
*/
static void *EDIT_HeapLock(HWND hwnd, HANDLE handle)
{
HINSTANCE hinstance = WIN_GetWindowInstance( hwnd );
#if defined(WINELIB)
return LOCAL_Lock( hinstance, handle );
#else
HANDLE offs;
if (handle == 0) return 0;
offs = LOCAL_Lock( hinstance, handle );
return PTR_SEG_OFF_TO_LIN( hinstance, offs );
#endif
return LOCAL_Lock( WIN_GetWindowInstance(hwnd), handle );
}
/*********************************************************************
......@@ -2798,7 +2789,7 @@ static void EDIT_WM_KeyDown(HWND hwnd, WPARAM wParam)
return;
}
if(motionKey && (0x80 & GetKeyState(VK_SHIFT))) {
if(motionKey && (0x8000 & GetKeyState(VK_SHIFT))) {
EDIT_ExtendSel(hwnd, es->WndCol, es->WndRow*es->txtht);
} else {
EDIT_SetAnchor(hwnd, es->CurrLine, es->CurrCol);
......
......@@ -3,8 +3,7 @@
*
* Copyright David W. Metcalfe, 1993
*
static char Copyright[] = "Copyright David W. Metcalfe, 1993";
*/
*/
#include <stdio.h>
#include <windows.h>
......@@ -12,35 +11,35 @@ static char Copyright[] = "Copyright David W. Metcalfe, 1993";
#include "user.h"
#include "static.h"
extern void DEFWND_SetText( HWND hwnd, LPSTR text ); /* windows/defwnd.c */
extern void DEFWND_SetText( WND *wndPtr, LPSTR text ); /* windows/defwnd.c */
static void PaintTextfn( HWND hwnd, HDC hdc );
static void PaintRectfn( HWND hwnd, HDC hdc );
static void PaintIconfn( HWND hwnd, HDC hdc );
static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc );
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc );
static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc );
static COLORREF color_windowframe, color_background, color_window;
typedef void (*pfPaint)(HWND, HDC);
typedef void (*pfPaint)( WND *, HDC);
#define LAST_STATIC_TYPE SS_LEFTNOWORDWRAP
static pfPaint staticPaintFunc[LAST_STATIC_TYPE+1] =
{
PaintTextfn, /* SS_LEFT */
PaintTextfn, /* SS_CENTER */
PaintTextfn, /* SS_RIGHT */
PaintIconfn, /* SS_ICON */
PaintRectfn, /* SS_BLACKRECT */
PaintRectfn, /* SS_GRAYRECT */
PaintRectfn, /* SS_WHITERECT */
PaintRectfn, /* SS_BLACKFRAME */
PaintRectfn, /* SS_GRAYFRAME */
PaintRectfn, /* SS_WHITEFRAME */
STATIC_PaintTextfn, /* SS_LEFT */
STATIC_PaintTextfn, /* SS_CENTER */
STATIC_PaintTextfn, /* SS_RIGHT */
STATIC_PaintIconfn, /* SS_ICON */
STATIC_PaintRectfn, /* SS_BLACKRECT */
STATIC_PaintRectfn, /* SS_GRAYRECT */
STATIC_PaintRectfn, /* SS_WHITERECT */
STATIC_PaintRectfn, /* SS_BLACKFRAME */
STATIC_PaintRectfn, /* SS_GRAYFRAME */
STATIC_PaintRectfn, /* SS_WHITEFRAME */
NULL, /* Not defined */
PaintTextfn, /* SS_SIMPLE */
PaintTextfn /* SS_LEFTNOWORDWRAP */
STATIC_PaintTextfn, /* SS_SIMPLE */
STATIC_PaintTextfn /* SS_LEFTNOWORDWRAP */
};
......@@ -49,10 +48,9 @@ static pfPaint staticPaintFunc[LAST_STATIC_TYPE+1] =
*
* Set the icon for an SS_ICON control.
*/
static HICON STATIC_SetIcon( HWND hwnd, HICON hicon )
static HICON STATIC_SetIcon( WND *wndPtr, HICON hicon )
{
HICON prevIcon;
WND *wndPtr = WIN_FindWndPtr( hwnd );
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
if ((wndPtr->dwStyle & 0x0f) != SS_ICON) return 0;
......@@ -61,7 +59,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon )
if (hicon)
{
CURSORICONINFO *info = (CURSORICONINFO *) GlobalLock( hicon );
SetWindowPos( hwnd, 0, 0, 0, info->nWidth, info->nHeight,
SetWindowPos( wndPtr->hwndSelf, 0, 0, 0, info->nWidth, info->nHeight,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
GlobalUnlock( hicon );
}
......@@ -94,7 +92,7 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
createStruct->lpszName );
if (!hicon) /* Try OEM icon (FIXME: is this right?) */
hicon = LoadIcon( 0, createStruct->lpszName );
STATIC_SetIcon( hWnd, hicon );
STATIC_SetIcon( wndPtr, hicon );
}
return 1;
}
......@@ -115,7 +113,7 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_NCDESTROY:
if (style == SS_ICON)
DestroyIcon( STATIC_SetIcon( hWnd, 0 ) );
DestroyIcon( STATIC_SetIcon( wndPtr, 0 ) );
else
lResult = DefWindowProc(hWnd, uMsg, wParam, lParam);
break;
......@@ -125,7 +123,7 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
PAINTSTRUCT ps;
BeginPaint( hWnd, &ps );
if (staticPaintFunc[style])
(staticPaintFunc[style])( hWnd, ps.hdc );
(staticPaintFunc[style])( wndPtr, ps.hdc );
EndPaint( hWnd, &ps );
}
break;
......@@ -140,10 +138,10 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_SETTEXT:
if (style == SS_ICON)
/* FIXME : should we also return the previous hIcon here ??? */
STATIC_SetIcon( hWnd, LoadIcon( wndPtr->hInstance,
(SEGPTR)lParam ));
STATIC_SetIcon( wndPtr, LoadIcon( wndPtr->hInstance,
(SEGPTR)lParam ));
else
DEFWND_SetText( hWnd, (LPSTR)PTR_SEG_TO_LIN(lParam) );
DEFWND_SetText( wndPtr, (LPSTR)PTR_SEG_TO_LIN(lParam) );
InvalidateRect( hWnd, NULL, FALSE );
UpdateWindow( hWnd );
break;
......@@ -171,7 +169,7 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return infoPtr->hIcon;
case STM_SETICON:
lResult = STATIC_SetIcon( hWnd, (HICON)wParam );
lResult = STATIC_SetIcon( wndPtr, (HICON)wParam );
InvalidateRect( hWnd, NULL, FALSE );
UpdateWindow( hWnd );
break;
......@@ -185,18 +183,17 @@ LONG StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
static void PaintTextfn( HWND hwnd, HDC hdc )
static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc )
{
RECT rc;
HBRUSH hBrush;
char *text;
WORD wFormat;
WND *wndPtr = WIN_FindWndPtr(hwnd);
LONG style = wndPtr->dwStyle;
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
GetClientRect(hwnd, &rc);
GetClientRect( wndPtr->hwndSelf, &rc);
text = USER_HEAP_LIN_ADDR( wndPtr->hText );
switch (style & 0x0000000F)
......@@ -230,24 +227,23 @@ static void PaintTextfn( HWND hwnd, HDC hdc )
if (infoPtr->hFont) SelectObject( hdc, infoPtr->hFont );
#ifdef WINELIB32
hBrush = SendMessage( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, hwnd );
hBrush = SendMessage( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
hdc, wndPtr->hwndSelf );
#else
hBrush = SendMessage( GetParent(hwnd), WM_CTLCOLOR, (WORD)hdc,
MAKELONG(hwnd, CTLCOLOR_STATIC));
hBrush = SendMessage( GetParent(wndPtr->hwndSelf), WM_CTLCOLOR, (WORD)hdc,
MAKELONG(wndPtr->hwndSelf, CTLCOLOR_STATIC));
#endif
if (!hBrush) hBrush = GetStockObject(WHITE_BRUSH);
FillRect(hdc, &rc, hBrush);
if (text) DrawText( hdc, text, -1, &rc, wFormat );
}
static void PaintRectfn( HWND hwnd, HDC hdc )
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc )
{
RECT rc;
HBRUSH hBrush;
WND *wndPtr = WIN_FindWndPtr(hwnd);
GetClientRect(hwnd, &rc);
GetClientRect( wndPtr->hwndSelf, &rc);
switch (wndPtr->dwStyle & 0x0f)
{
......@@ -282,19 +278,19 @@ static void PaintRectfn( HWND hwnd, HDC hdc )
}
static void PaintIconfn( HWND hwnd, HDC hdc )
static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc )
{
RECT rc;
HBRUSH hbrush;
WND *wndPtr = WIN_FindWndPtr(hwnd);
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
GetClientRect(hwnd, &rc);
GetClientRect( wndPtr->hwndSelf, &rc);
#ifdef WINELIB32
hbrush = SendMessage( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, hwnd );
hbrush = SendMessage( GetParent(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
hdc, wndPtr->hwndSelf );
#else
hbrush = SendMessage( GetParent(hwnd), WM_CTLCOLOR, hdc,
MAKELONG(hwnd, CTLCOLOR_STATIC));
hbrush = SendMessage( GetParent(wndPtr->hwndSelf), WM_CTLCOLOR, hdc,
MAKELONG(wndPtr->hwndSelf, CTLCOLOR_STATIC));
#endif
FillRect( hdc, &rc, hbrush );
if (infoPtr->hIcon) DrawIcon( hdc, rc.left, rc.top, infoPtr->hIcon );
......
......@@ -7,6 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/mman.h>
#include "windows.h"
#include "debugger.h"
......
......@@ -10,6 +10,7 @@
#include <signal.h>
#include <unistd.h>
#include "class.h"
#include "module.h"
#include "options.h"
#include "queue.h"
#include "win.h"
......@@ -38,7 +39,7 @@ int yyerror(char *);
%token tCONT tSTEP tLIST tNEXT tQUIT tHELP tBACKTRACE tINFO tWALK
%token tENABLE tDISABLE tBREAK tDELETE tSET tMODE tPRINT tEXAM tDEFINE tABORT
%token tCLASS tSTACK tSEGMENTS tREGS tWND tQUEUE
%token tCLASS tMODULE tSTACK tSEGMENTS tREGS tWND tQUEUE
%token tNO_SYMBOL tEOL
%token tSYMBOLFILE
......@@ -129,6 +130,7 @@ break_command:
info_command:
tINFO tBREAK tEOL { DEBUG_InfoBreakpoints(); }
| tINFO tCLASS expr tEOL { CLASS_DumpClass( $3 ); }
| tINFO tMODULE expr tEOL { MODULE_DumpModule( $3 ); }
| tINFO tQUEUE expr tEOL { QUEUE_DumpQueue( $3 ); }
| tINFO tREGS tEOL { DEBUG_InfoRegisters(); }
| tINFO tSEGMENTS expr tEOL { LDT_Print( SELECTOR_TO_ENTRY($3), 1 ); }
......@@ -138,6 +140,7 @@ info_command:
walk_command:
tWALK tCLASS tEOL { CLASS_WalkClasses(); }
| tWALK tMODULE tEOL { MODULE_WalkModules(); }
| tWALK tQUEUE tEOL { QUEUE_WalkQueues(); }
| tWALK tWND tEOL { WIN_WalkWindows( 0, 0 ); }
| tWALK tWND tNUM tEOL { WIN_WalkWindows( $3, 0 ); }
......
......@@ -94,6 +94,7 @@ walk|w { return tWALK; }
x { return tEXAM; }
class|clas|cla { return tCLASS; }
module|modul|modu|mod { return tMODULE; }
queue|queu|que { return tQUEUE; }
registers|regs|reg|re { return tREGS; }
segments|segment|segm|seg|se { return tSEGMENTS; }
......
......@@ -13,7 +13,7 @@
#include <stdio.h>
#include <sys/stat.h>
#include <time.h>
#ifdef __svr4__
#if defined(__svr4__) || defined(_SCO_DS)
#include <sys/statfs.h>
#endif
......
......@@ -18,7 +18,7 @@
#include <sys/mount.h>
#include <sys/errno.h>
#endif
#ifdef __svr4__
#if defined(__svr4__) || defined(_SCO_DS)
#include <sys/statfs.h>
#endif
......@@ -437,7 +437,7 @@ int DRIVE_GetFreeSpace( int drive, DWORD *size, DWORD *available )
return 0;
}
#ifdef __svr4__
#if defined(__svr4__) || defined(_SCO_DS)
if (statfs( DOSDrives[drive].root, &info, 0, 0) < 0)
#else
if (statfs( DOSDrives[drive].root, &info) < 0)
......@@ -449,7 +449,7 @@ int DRIVE_GetFreeSpace( int drive, DWORD *size, DWORD *available )
}
*size = info.f_bsize * info.f_blocks;
#ifdef __svr4__
#if defined(__svr4__) || defined(_SCO_DS)
*available = info.f_bfree * info.f_bsize;
#else
*available = info.f_bavail * info.f_bsize;
......
......@@ -50,10 +50,11 @@ C_SRCS = \
ASM_SRCS = \
$(SPEC_FILES) \
call16.S \
call32.S \
except.S \
stdcall.S
callfrom16.S \
callfrom32.S \
callto16.S \
callto32.S \
except.S
.SUFFIXES: .spec
......@@ -69,16 +70,19 @@ $(SPEC_FILES): $(BUILD)
$(BUILD) checkbuild:
cd $(TOPSRC)/tools; $(SUBMAKE) build
call16.S: $(TOPSRC)/include/callback.h $(BUILD)
$(BUILD) -call16 `cat $(TOPSRC)/include/callback.h | grep "extern.*CallTo16_" | sed 's/.*CallTo16_\(.*\)(.*/\1/' | sort | uniq` > call16.S
callfrom16.S: $(SPEC_FILES)
$(BUILD) -callfrom16 `cat $(SPEC_FILES) | grep CallFrom16_ | sed 's/.*CallFrom16_\(.*\)/\1/' | sort | uniq` > callfrom16.S
call32.S: $(SPEC_FILES)
$(BUILD) -call32 `cat $(SPEC_FILES) | grep CallTo32_ | sed 's/.*CallTo32_\(.*\)/\1/' | sort | uniq` > call32.S
callfrom32.S: $(SPEC_FILES)
$(BUILD) -callfrom32 `cat $(SPEC_FILES) | grep CallFrom32_ | sed 's/.*CallFrom32_\([0-9]*\)/\1/' | sort | uniq` > callfrom32.S
stdcall.S: $(SPEC_FILES)
$(BUILD) -stdcall `cat $(SPEC_FILES) | grep Stdcall_ | sed 's/.*Stdcall_\([0-9]*\)/\1/' | sort | uniq` > stdcall.S
callto16.S: $(TOPSRC)/include/callback.h $(BUILD)
$(BUILD) -callto16 `cat $(TOPSRC)/include/callback.h | grep "extern.*CallTo16_" | sed 's/.*CallTo16_\(.*\)(.*/\1/' | sort | uniq` > callto16.S
callto32.S: $(TOPSRC)/include/callback.h $(BUILD)
$(BUILD) -callto32 `cat $(TOPSRC)/include/callback.h | grep "extern.*CallTo32_" | sed 's/.*CallTo32_\(.*\)(.*/\1/' | sort | uniq` > callto32.S
clean::
rm -f $(SPEC_FILES) call32.S call16.S stdcall.S
rm -f $(SPEC_FILES) callfrom16.S callfrom32.S callto16.S callto32.S
### Dependencies:
......@@ -39,8 +39,7 @@ LONG CallWindowProc( WNDPROC func, HWND hwnd, WORD message,
fprintf(stderr,"Where is the Win32 callback?\n");
if (UsesLParamPtr(message))
return RELAY32_CallWindowProcConvStruct(a->win32,hwnd,message,wParam,lParam);
else
return RELAY32_CallWindowProc(a->win32,hwnd,message,wParam,lParam);
return CallWndProc32( (FARPROC)a->win32, hwnd, message, wParam, lParam );
}
/**********************************************************************
......
......@@ -4,17 +4,20 @@
* Copyright (c) 1996 Onno Hovers, (onno@stack.urc.tue.nl)
*
*/
#if defined(__svr4__) || defined(_SCO_DS)
#define __ELF__ 1
#endif
#ifndef __ELF__
.globl _EXC_CallUnhandledExceptionFilter
.extern _pTopExcHandler
.globl _EXC_CallUnhandledExceptionFilter
_EXC_CallUnhandledExceptionFilter:
#else /* __ELF__ */
.globl EXC_CallUnhandledExceptionFilter
.extern pTopExcHandler
.globl EXC_CallUnhandledExceptionFilter
EXC_CallUnhandledExceptionFilter:
#endif /* __ELF__ */
leal 4(%esp),%eax
pushl %eax
......@@ -45,56 +48,55 @@
* we pass the function to be called as a fifth parameter to ContextCall
*
*/
.equ CONTEXT_SegSs, -4
.equ CONTEXT_Esp, -8
.equ CONTEXT_EFlags, -12
.equ CONTEXT_SegCs, -16
.equ CONTEXT_Eip, -20
.equ CONTEXT_Ebp, -24
.equ CONTEXT_Eax, -28
.equ CONTEXT_Ecx, -32
.equ CONTEXT_Edx, -36
.equ CONTEXT_Ebx, -40
.equ CONTEXT_Esi, -44
.equ CONTEXT_Edi, -48
.equ CONTEXT_SegDs, -52
.equ CONTEXT_SegEs, -56
.equ CONTEXT_SegFs, -60
.equ CONTEXT_SegGs, -64
.equ FLOAT_Cr0NpxState, -68
.equ FLOAT_RegisterArea, -148
.equ FLOAT_DataSelector, -152
.equ FLOAT_DataOffset, -156
.equ FLOAT_ErrorSelector, -160
.equ FLOAT_ErrorOffset, -164
.equ FLOAT_TagWord, -168
.equ FLOAT_StatusWord, -172
.equ FLOAT_ControlWord, -176
.equ CONTEXT_FloatSave, -176
.equ CONTEXT_Dr7, -180
.equ CONTEXT_Dr6, -184
.equ CONTEXT_Dr3, -188
.equ CONTEXT_Dr2, -192
.equ CONTEXT_Dr1, -196
.equ CONTEXT_Dr0, -200
.equ CONTEXT_ContextFlags, -204
.equ CONTEXT, -204
.equ CONTEXTSIZE, 204
.equ CONTEXTFLAGS, 0x10007
.equ ORIG_ESP, 16 /** cdecl !!! **/
.equ PARM_ARG4, 28
.equ PARM_ARG3, 24
.equ PARM_ARG2, 20
.equ PARM_ARG1, 16
.equ PARM_RETURN, 12
.equ PARM_CALLFUNC, 8
.equ PARM_EBP, 4
.equ PARM_EFLAGS, 0
#define CONTEXT_SegSs -4
#define CONTEXT_Esp -8
#define CONTEXT_EFlags -12
#define CONTEXT_SegCs -16
#define CONTEXT_Eip -20
#define CONTEXT_Ebp -24
#define CONTEXT_Eax -28
#define CONTEXT_Ecx -32
#define CONTEXT_Edx -36
#define CONTEXT_Ebx -40
#define CONTEXT_Esi -44
#define CONTEXT_Edi -48
#define CONTEXT_SegDs -52
#define CONTEXT_SegEs -56
#define CONTEXT_SegFs -60
#define CONTEXT_SegGs -64
#define FLOAT_Cr0NpxState -68
#define FLOAT_RegisterArea -148
#define FLOAT_DataSelector -152
#define FLOAT_DataOffset -156
#define FLOAT_ErrorSelector -160
#define FLOAT_ErrorOffset -164
#define FLOAT_TagWord -168
#define FLOAT_StatusWord -172
#define FLOAT_ControlWord -176
#define CONTEXT_FloatSave -176
#define CONTEXT_Dr7 -180
#define CONTEXT_Dr6 -184
#define CONTEXT_Dr3 -188
#define CONTEXT_Dr2 -192
#define CONTEXT_Dr1 -196
#define CONTEXT_Dr0 -200
#define CONTEXT_ContextFlags -204
#define CONTEXT -204
#define CONTEXTSIZE 204
#define CONTEXTFLAGS 0x10007
#define ORIG_ESP 16 /** cdecl !!! **/
#define PARM_ARG4 28
#define PARM_ARG3 24
#define PARM_ARG2 20
#define PARM_ARG1 16
#define PARM_RETURN 12
#define PARM_CALLFUNC 8
#define PARM_EBP 4
#define PARM_EFLAGS 0
#ifndef __ELF__
.globl _RaiseException
.extern _EXC_RaiseException
_RaiseException:
push $_EXC_RaiseException
......@@ -107,7 +109,6 @@
#else /* __ELF__ */
.globl RaiseException
.extern EXC_RaiseException
RaiseException:
push $EXC_RaiseException
......
......@@ -25,43 +25,59 @@ dprintf_relay
BUILTIN_DLL dll_builtin_table[] =
{
DLL_ENTRY( KERNEL, 0),
DLL_ENTRY( USER, 0),
DLL_ENTRY( GDI, 0),
DLL_ENTRY( WIN87EM, DLL_FLAG_NOT_USED),
DLL_ENTRY( SHELL, 0),
DLL_ENTRY( SOUND, 0),
DLL_ENTRY( KEYBOARD, 0),
DLL_ENTRY( WINSOCK, 0),
DLL_ENTRY( STRESS, 0),
DLL_ENTRY( MMSYSTEM, 0),
DLL_ENTRY( SYSTEM, 0),
DLL_ENTRY( TOOLHELP, 0),
DLL_ENTRY( MOUSE, 0),
DLL_ENTRY( COMMDLG, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLE2, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLE2CONV, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLE2DISP, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLE2NLS, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLE2PROX, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLECLI, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLESVR, DLL_FLAG_NOT_USED),
DLL_ENTRY( COMPOBJ, DLL_FLAG_NOT_USED),
DLL_ENTRY( STORAGE, DLL_FLAG_NOT_USED),
DLL_ENTRY( WINPROCS, 0),
DLL_ENTRY( DDEML, DLL_FLAG_NOT_USED),
DLL_ENTRY( LZEXPAND, 0),
{ NULL, } /* Last entry */
/* Win16 DLLs */
DLL_ENTRY( KERNEL, DLL_FLAG_ALWAYS_USED),
DLL_ENTRY( USER, DLL_FLAG_ALWAYS_USED),
DLL_ENTRY( GDI, DLL_FLAG_ALWAYS_USED),
DLL_ENTRY( WIN87EM, DLL_FLAG_NOT_USED),
DLL_ENTRY( SHELL, 0),
DLL_ENTRY( SOUND, 0),
DLL_ENTRY( KEYBOARD, 0),
DLL_ENTRY( WINSOCK, 0),
DLL_ENTRY( STRESS, 0),
DLL_ENTRY( MMSYSTEM, 0),
DLL_ENTRY( SYSTEM, 0),
DLL_ENTRY( TOOLHELP, 0),
DLL_ENTRY( MOUSE, 0),
DLL_ENTRY( COMMDLG, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLE2, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLE2CONV, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLE2DISP, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLE2NLS, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLE2PROX, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLECLI, DLL_FLAG_NOT_USED),
DLL_ENTRY( OLESVR, DLL_FLAG_NOT_USED),
DLL_ENTRY( COMPOBJ, DLL_FLAG_NOT_USED),
DLL_ENTRY( STORAGE, DLL_FLAG_NOT_USED),
DLL_ENTRY( WINPROCS, DLL_FLAG_ALWAYS_USED),
DLL_ENTRY( DDEML, DLL_FLAG_NOT_USED),
DLL_ENTRY( LZEXPAND, 0),
/* Win32 DLLs */
DLL_ENTRY( ADVAPI32, 0),
DLL_ENTRY( COMCTL32, 0),
DLL_ENTRY( COMDLG32, 0),
DLL_ENTRY( OLE32, 0),
DLL_ENTRY( GDI32, 0),
DLL_ENTRY( KERNEL32, DLL_FLAG_ALWAYS_USED),
DLL_ENTRY( SHELL32, 0),
DLL_ENTRY( USER32, 0),
DLL_ENTRY( WINPROCS32, DLL_FLAG_ALWAYS_USED),
DLL_ENTRY( WINSPOOL, 0),
/* Last entry */
{ NULL, }
};
/* Saved 16-bit stack */
/* Saved 16-bit stack for current process (Win16 only) */
WORD IF1632_Saved16_ss = 0;
WORD IF1632_Saved16_sp = 0;
/* Saved 32-bit stack */
/* Saved 32-bit stack for current process (Win16 only) */
DWORD IF1632_Saved32_esp = 0;
SEGPTR IF1632_Stack32_base = 0;
DWORD IF1632_Original32_esp = 0;
/* Original Unix stack */
DWORD IF1632_Original32_esp;
/***********************************************************************
* RELAY_Init
......@@ -72,20 +88,20 @@ BOOL RELAY_Init(void)
/* Allocate the code selector for CallTo16 routines */
extern void CALL16_Start(), CALL16_End();
extern void CALL16_Ret_word(), CALL16_Ret_long();
extern DWORD CALL16_RetAddr_word, CALL16_RetAddr_long;
extern void CALLTO16_Start(), CALLTO16_End();
extern void CALLTO16_Ret_word(), CALLTO16_Ret_long();
extern DWORD CALLTO16_RetAddr_word, CALLTO16_RetAddr_long;
codesel = GLOBAL_CreateBlock( GMEM_FIXED, (void *)CALL16_Start,
(int)CALL16_End - (int)CALL16_Start,
codesel = GLOBAL_CreateBlock( GMEM_FIXED, (void *)CALLTO16_Start,
(int)CALLTO16_End - (int)CALLTO16_Start,
0, TRUE, TRUE, FALSE, NULL );
if (!codesel) return FALSE;
/* Patch the return addresses for CallTo16 routines */
CALL16_RetAddr_word = MAKELONG( (int)CALL16_Ret_word - (int)CALL16_Start,
CALLTO16_RetAddr_word=MAKELONG( (int)CALLTO16_Ret_word-(int)CALLTO16_Start,
codesel );
CALL16_RetAddr_long = MAKELONG( (int)CALL16_Ret_long - (int)CALL16_Start,
CALLTO16_RetAddr_long=MAKELONG( (int)CALLTO16_Ret_long-(int)CALLTO16_Start,
codesel );
return TRUE;
......@@ -93,10 +109,10 @@ BOOL RELAY_Init(void)
/***********************************************************************
* RELAY_DebugCall32
* RELAY_DebugCallFrom16
*/
void RELAY_DebugCall32( int func_type, char *args,
void *entry_point, int args32 )
void RELAY_DebugCallFrom16( int func_type, char *args,
void *entry_point, int args32 )
{
STACK16FRAME *frame;
struct dll_table_s *table;
......@@ -162,9 +178,9 @@ void RELAY_DebugCall32( int func_type, char *args,
/***********************************************************************
* RELAY_DebugReturn
* RELAY_DebugCallFrom16Ret
*/
void RELAY_DebugReturn( int func_type, int ret_val, int args32 )
void RELAY_DebugCallFrom16Ret( int func_type, int ret_val, int args32 )
{
STACK16FRAME *frame;
struct dll_table_s *table;
......@@ -230,7 +246,7 @@ void RELAY_Unimplemented16(void)
*
* This function is called for unimplemented 32-bit entry points (declared
* as 'stub' in the spec file).
* (The args are the same than for RELAY_DebugStdcall).
* (The args are the same than for RELAY_DebugCallFrom32).
*/
void RELAY_Unimplemented32( int nb_args, void *entry_point,
const char *func_name )
......@@ -241,7 +257,7 @@ void RELAY_Unimplemented32( int nb_args, void *entry_point,
/***********************************************************************
* RELAY_DebugCall16
* RELAY_DebugCallTo16
*
* 'stack' points to the called function address on the 32-bit stack.
* Stack layout:
......@@ -251,7 +267,7 @@ void RELAY_Unimplemented32( int nb_args, void *entry_point,
* (stack+4) 16-bit ds
* (stack) func to call
*/
void RELAY_DebugCall16( int* stack, int nbargs )
void RELAY_DebugCallTo16( int* stack, int nbargs )
{
if (!debugging_relay) return;
......@@ -264,10 +280,11 @@ void RELAY_DebugCall16( int* stack, int nbargs )
/***********************************************************************
* RELAY_DebugStdcall
* RELAY_DebugCallFrom32
*/
void RELAY_DebugStdcall( int nb_args, void *entry_point, const char *func_name,
int ebp, int ret_addr, int arg1 )
void RELAY_DebugCallFrom32( int nb_args, void *entry_point,
const char *func_name, int ebp, int ret_addr,
int arg1 )
{
int *parg;
if (!debugging_relay) return;
......@@ -282,12 +299,28 @@ void RELAY_DebugStdcall( int nb_args, void *entry_point, const char *func_name,
/***********************************************************************
* RELAY_DebugStdcallRet
* RELAY_DebugCallFrom32Ret
*/
void RELAY_DebugStdcallRet( int ret_val, void *entry_point,
const char *func_name, int ebp, int ret_addr )
void RELAY_DebugCallFrom32Ret( int ret_val, void *entry_point,
const char *func_name, int ebp, int ret_addr )
{
if (!debugging_relay) return;
printf( "Ret %s() retval=0x%08x ret=%08x\n",
func_name, ret_val, ret_addr );
}
/***********************************************************************
* RELAY_DebugCallTo32
*/
void RELAY_DebugCallTo32( unsigned int func, int nbargs, unsigned int arg1 )
{
unsigned int *argptr;
if (!debugging_relay) return;
printf( "CallTo32(func=%08x", func );
for (argptr = &arg1; nbargs; nbargs--, argptr++)
printf( ",%08x", *argptr );
printf( ")\n" );
}
......@@ -11,10 +11,10 @@
#include <unistd.h>
#include <errno.h>
#include "windows.h"
#include "callback.h"
#include "dlls.h"
#include "module.h"
#include "neexe.h"
#include "pe_image.h"
#include "peexe.h"
#include "relay32.h"
#include "struct32.h"
......@@ -24,116 +24,57 @@
#include "stddebug.h"
#include "debug.h"
#define DLL_ENTRY(name) \
{ #name, (WIN32_function *)name##_Module_Start, \
(WIN32_function *)name##_Module_End, (int *)name##_Data_Start, NULL }
static WIN32_builtin WIN32_builtin_list[] =
typedef struct
{
DLL_ENTRY(ADVAPI32),
DLL_ENTRY(COMCTL32),
DLL_ENTRY(COMDLG32),
DLL_ENTRY(OLE32),
DLL_ENTRY(GDI32),
DLL_ENTRY(KERNEL32),
DLL_ENTRY(SHELL32),
DLL_ENTRY(USER32),
DLL_ENTRY(WINPROCS32),
DLL_ENTRY(WINSPOOL)
};
#define NB_DLLS (sizeof(WIN32_builtin_list)/sizeof(WIN32_builtin_list[0]))
static void RELAY32_MakeFakeModule(WIN32_builtin*dll);
int RELAY32_Init(void)
{
int i;
for (i = 0; i < NB_DLLS; i++)
RELAY32_MakeFakeModule( &WIN32_builtin_list[i] );
char *name;
void *definition;
} WIN32_function;
/* Why should it fail, anyways? */
return 1;
}
WIN32_builtin *RELAY32_GetBuiltinDLL(char *name)
typedef struct
{
WIN32_builtin *it;
size_t len;
char *cp;
int i;
int base;
int size;
WIN32_function functions[1];
} WIN32_DLL_INFO;
len = (cp=strchr(name,'.')) ? (cp-name) : strlen(name);
for(i = NB_DLLS, it = WIN32_builtin_list; (i > 0); i--, it++)
if (!lstrncmpi(name,it->name,len)) return it;
return NULL;
}
void RELAY32_Unimplemented(char *dll, int item)
void *RELAY32_GetEntryPoint(BUILTIN_DLL *dll, char *item, int hint)
{
WIN32_builtin *Dll;
fprintf( stderr, "No handler for routine %s.%d", dll, item);
Dll=RELAY32_GetBuiltinDLL(dll);
if(Dll && Dll->functions[item].name)
fprintf(stderr, "(%s?)\n", Dll->functions[item].name);
else
fprintf(stderr, "\n");
fflush(stderr);
exit(1);
}
void *RELAY32_GetEntryPoint(WIN32_builtin *dll, char *item, int hint)
{
int i, size;
dprintf_module(stddeb, "Looking for %s in %s, hint %x\n",
item ? item: "(no name)", dll->name, hint);
if(!dll)
return 0;
size = (int)(dll->last_func - dll->functions);
/* import by ordinal */
if(!item){
if(hint && hint < size)
return dll->functions[hint - *dll->base].definition;
return 0;
}
/* hint is correct */
if(hint && hint < size &&
dll->functions[hint].name &&
strcmp(item,dll->functions[hint].name)==0)
return dll->functions[hint].definition;
/* hint is incorrect, search for name */
for(i=0;i < size;i++)
if (dll->functions[i].name && !strcmp(item,dll->functions[i].name))
return dll->functions[i].definition;
/* function at hint has no name (unimplemented) */
if(hint && hint < size && !dll->functions[hint].name)
{
dll->functions[hint].name=xstrdup(item);
dprintf_module(stddeb, "Returning unimplemented function %s.%d\n",
dll->name,hint);
return dll->functions[hint].definition;
}
return 0;
}
const WIN32_DLL_INFO *info = (const WIN32_DLL_INFO *)dll->data_start;
int i;
LONG RELAY32_CallWindowProc( WNDPROC func, int hwnd, int message,
int wParam, int lParam )
{
int ret;
__asm__ (
"push %1;"
"push %2;"
"push %3;"
"push %4;"
"call %5;"
: "=a" (ret)
: "g" (lParam), "g" (wParam), "g" (message), "g" (hwnd), "g" (func)
);
return ret;
dprintf_module(stddeb, "Looking for %s in %s, hint %x\n",
item ? item: "(no name)", dll->name, hint);
if(!dll) return 0;
/* import by ordinal */
if(!item)
{
if(hint && hint < info->size)
return info->functions[hint - info->base].definition;
return 0;
}
/* hint is correct */
if (hint && hint < info->size &&
info->functions[hint].name &&
strcmp(item,info->functions[hint].name)==0)
return info->functions[hint].definition;
/* hint is incorrect, search for name */
for(i=0;i < info->size;i++)
if (info->functions[i].name && !strcmp(item,info->functions[i].name))
return info->functions[i].definition;
/* function at hint has no name (unimplemented) */
if(hint && hint < info->size && !info->functions[hint].name)
{
/* info->functions[hint].name=xstrdup(item); */
dprintf_module(stddeb,"Returning unimplemented function %s.%d (%s?)\n",
dll->name,hint,item);
return info->functions[hint].definition;
}
return 0;
}
LONG RELAY32_CallWindowProcConvStruct( WNDPROC func, int hwnd, int message,
......@@ -149,18 +90,18 @@ LONG RELAY32_CallWindowProcConvStruct( WNDPROC func, int hwnd, int message,
LONG result;
void *lParam;
if(!lParam16)
return RELAY32_CallWindowProc(func,hwnd,message,wParam,(int)lParam16);
return CallWndProc32(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);
result=CallWndProc32(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);
result=CallWndProc32(func,hwnd,message,wParam,(int)&wp);
STRUCT32_WINDOWPOS32to16(&wp,lParam);
return result;
case WM_NCCALCSIZE:
......@@ -170,7 +111,7 @@ LONG RELAY32_CallWindowProcConvStruct( WNDPROC func, int hwnd, int message,
st.nccs.lppos=&wp;
} else
st.nccs.lppos= 0;
result=RELAY32_CallWindowProc(func,hwnd,message,wParam,(int)&st.nccs);
result=CallWndProc32(func,hwnd,message,wParam,(int)&st.nccs);
STRUCT32_NCCALCSIZE32to16Flat(&st.nccs,lParam);
if(((NCCALCSIZE_PARAMS*)lParam)->lppos)
STRUCT32_WINDOWPOS32to16(&wp,((NCCALCSIZE_PARAMS*)lParam)->lppos);
......@@ -182,7 +123,7 @@ LONG RELAY32_CallWindowProcConvStruct( WNDPROC func, int hwnd, int message,
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);
result=CallWndProc32(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;
......@@ -191,71 +132,9 @@ LONG RELAY32_CallWindowProcConvStruct( WNDPROC func, int hwnd, int message,
return result;
case WM_GETTEXT:
case WM_SETTEXT:
return RELAY32_CallWindowProc(func,hwnd,message,wParam,(int)lParam);
return CallWndProc32(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);
return CallWndProc32(func,hwnd,message,wParam,(int)lParam);
}
static void RELAY32_MakeFakeModule(WIN32_builtin*dll)
{
NE_MODULE *pModule;
struct w_files *wpnt;
int size;
HMODULE hModule;
OFSTRUCT *pFileInfo;
char *pStr;
wpnt=xmalloc(sizeof(struct w_files));
wpnt->hinstance=0;
wpnt->hModule=0;
wpnt->initialised=1;
wpnt->mz_header=wpnt->pe=0;
size=sizeof(NE_MODULE) +
/* loaded file info */
sizeof(*pFileInfo) - sizeof(pFileInfo->szPathName) +
strlen(dll->name) + 1 +
/* name table */
12 +
/* several empty tables */
8;
hModule = GlobalAlloc( GMEM_MOVEABLE | GMEM_ZEROINIT, size );
wpnt->hModule = hModule;
FarSetOwner( hModule, hModule );
pModule = (NE_MODULE*)GlobalLock(hModule);
/* Set all used entries */
pModule->magic=NE_SIGNATURE;
pModule->count=1;
pModule->next=0;
pModule->flags=NE_FFLAGS_WIN32;
pModule->dgroup=0;
pModule->ss=0;
pModule->cs=0;
pModule->heap_size=0;
pModule->stack_size=0;
pModule->seg_count=0;
pModule->modref_count=0;
pModule->nrname_size=0;
pModule->seg_table=0;
pModule->fileinfo=sizeof(NE_MODULE);
pModule->os_flags=NE_OSFLAGS_WINDOWS;
pModule->expected_version=0x30A;
pFileInfo=(OFSTRUCT *)(pModule + 1);
pFileInfo->cBytes = sizeof(*pFileInfo) - sizeof(pFileInfo->szPathName)
+ strlen(dll->name);
strcpy( pFileInfo->szPathName, dll->name );
pStr = ((char*)pFileInfo) + pFileInfo->cBytes + 1;
pModule->name_table=(int)pStr-(int)pModule;
*pStr=strlen(dll->name);
strcpy(pStr+1,dll->name);
pStr += *pStr+1;
pModule->res_table=pModule->import_table=pModule->entry_table=
(int)pStr-(int)pModule;
MODULE_RegisterModule(hModule);
wpnt->builtin=dll;
wpnt->next=wine_files;
wine_files=wpnt;
}
......@@ -12,11 +12,12 @@
#include "stackframe.h"
extern int CallTo32_LargeStack( int (*func)(), int nbargs, ... );
extern
int CallTo32_LargeStack( int (*func)(), int nbargs, ... );
/* List of the 16-bit callback functions. This list is used */
/* by the build program to generate the file if1632/call16.S */
/* by the build program to generate the file if1632/callto16.S */
/* func ds parameters */
extern WORD CallTo16_word_ ( FARPROC, WORD );
......@@ -68,6 +69,22 @@ extern WORD CallTo16_regs_( FARPROC func, WORD ds, WORD es, WORD bp, WORD ax,
#define CallWordBreakProc( func, lpch, ichCurrent, cch, code ) \
CallTo16_word_lwww( func, CURRENT_DS, lpch, ichCurrent, cch, code )
/* List of the 32-bit callback functions. This list is used */
/* by the build program to generate the file if1632/callto32.S */
extern LONG CallTo32_0( FARPROC );
extern LONG CallTo32_3( FARPROC, DWORD, DWORD, DWORD );
extern LONG CallTo32_4( FARPROC, DWORD, DWORD, DWORD, DWORD );
#define CallTaskStart32( func ) \
CallTo32_0( func )
#define CallDLLEntryProc32( func, hmodule, a, b ) \
CallTo32_3( func, hmodule, a, b )
#define CallWndProc32( func, hwnd, msg, wParam, lParam ) \
CallTo32_4( func, hwnd, msg, wParam, lParam )
#else /* WINELIB */
#define CallEnumChildProc( func, hwnd, lParam ) \
......
......@@ -40,6 +40,10 @@ typedef struct
DEBUG_PrintAddress(addr,dbg_mode), \
fprintf(stderr,"\n"),0))
#ifdef REG_SP /* Some Sun includes define this */
#undef REG_SP
#endif
enum debug_regs
{
REG_EAX, REG_EBX, REG_ECX, REG_EDX, REG_ESI,
......
......@@ -20,8 +20,9 @@ typedef struct dll_table_s
} BUILTIN_DLL;
/* DLL flags */
#define DLL_FLAG_NOT_USED 1 /* Use original Windows DLL if possible */
#define DLL_FLAG_WIN32 2 /* DLL is a Win32 DLL */
#define DLL_FLAG_NOT_USED 0x01 /* Use original Windows DLL if possible */
#define DLL_FLAG_ALWAYS_USED 0x02 /* Always use built-in DLL */
#define DLL_FLAG_WIN32 0x04 /* DLL is a Win32 DLL */
#define DECLARE_DLL(name) \
extern const BYTE name##_Code_Start[]; \
......
......@@ -20,7 +20,7 @@ extern HLOCAL LOCAL_Handle( HANDLE ds, WORD addr );
extern WORD LOCAL_Size( HANDLE ds, HLOCAL handle );
extern WORD LOCAL_Flags( HANDLE ds, HLOCAL handle );
extern WORD LOCAL_HeapSize( HANDLE ds );
extern NPVOID LOCAL_Lock( HANDLE ds, HLOCAL handle );
extern LPSTR LOCAL_Lock( HANDLE ds, HLOCAL handle );
extern BOOL LOCAL_Unlock( HANDLE ds, HLOCAL handle );
#endif /* __WINE_LOCAL_H */
......@@ -51,6 +51,14 @@ typedef struct
WORD self_loading_sel; /* Selector used for self-loading apps. procs */
} NE_MODULE;
/* Extra module info appended to NE_MODULE for Win32 modules */
typedef struct
{
DWORD pe_module;
} NE_WIN32_EXTRAINFO;
/* In-memory segment table */
typedef struct
{
......@@ -61,6 +69,7 @@ typedef struct
HANDLE selector; /* Selector of segment in memory */
} SEGTABLEENTRY;
/* Self-loading modules contain this structure in their first segment */
typedef struct
......@@ -97,11 +106,17 @@ typedef struct
#define NE_MODULE_NAME(pModule) \
(((OFSTRUCT *)((char*)(pModule) + (pModule)->fileinfo))->szPathName)
#define NE_WIN32_MODULE(pModule) \
((struct pe_data *)(((pModule)->flags & NE_FFLAGS_WIN32) ? \
((NE_WIN32_EXTRAINFO *)((pModule) + 1))->pe_module : 0))
#ifndef WINELIB
#pragma pack(4)
#endif
extern BOOL MODULE_Init(void);
extern void MODULE_DumpModule( HMODULE hmodule );
extern void MODULE_WalkModules(void);
extern int MODULE_OpenFile( HMODULE hModule );
extern LPSTR MODULE_GetModuleName( HMODULE hModule );
extern void MODULE_RegisterModule( HMODULE hModule );
......
......@@ -3,6 +3,7 @@
#include <sys/types.h>
#include "windows.h"
#include "dlls.h"
struct pe_data {
struct pe_header_s *pe_header;
......@@ -17,40 +18,7 @@ struct pe_data {
int resource_offset; /* offset to resource typedirectory in file */
};
typedef struct _WIN32_function{
char *name;
void *definition;
} WIN32_function;
typedef struct _WIN32_builtin{
char *name;
WIN32_function *functions;
WIN32_function *last_func;
const int *base;
struct _WIN32_builtin *next;
} WIN32_builtin;
struct w_files
{
struct w_files * next;
char * name; /* Name, as it appears in the windows binaries */
char * filename; /* Actual name of the unix file that satisfies this */
int type; /* DLL or EXE */
HINSTANCE hinstance;
HMODULE hModule;
int initialised;
struct mz_header_s *mz_header;
struct pe_data *pe;
OFSTRUCT ofs;
unsigned int load_addr;
WIN32_builtin* builtin;
};
extern int PE_unloadImage(struct w_files *wpnt);
extern int PE_StartProgram(struct w_files *wpnt);
extern void PE_InitDLL(HMODULE hModule);
extern int PE_unloadImage(HMODULE hModule);
extern void my_wcstombs(char * result, u_short * source, int len);
extern struct w_files *wine_files;
#endif /* __WINE_PE_IMAGE_H */
......@@ -10,7 +10,7 @@
#include <windows.h>
#include "wine.h"
#ifndef __svr4__
#if !defined(__svr4__) && !defined(_SCO_DS)
#define EAX_reg(context) ((context)->sc_eax)
#define EBX_reg(context) ((context)->sc_ebx)
......@@ -65,7 +65,11 @@
#define SET_CFLAG(context) (EFL_reg(context) |= 0x0001)
#define RESET_CFLAG(context) (EFL_reg(context) &= 0xfffffffe)
#else /* __svr4__ */
#else /* __svr4__ || _SCO_DS */
#ifdef _SCO_DS
#define gregs regs
#endif
#define EAX_reg(context) ((context)->uc_mcontext.gregs[EAX])
#define EBX_reg(context) ((context)->uc_mcontext.gregs[EBX])
......@@ -122,6 +126,6 @@
#define SET_CFLAG(context) (EFL_reg(context) |= 0x0001)
#define RESET_CFLAG(context) (EFL_reg(context) &= 0xfffffffe)
#endif /* __svr4__ */
#endif /* __svr4__ || _SCO_DS */
#endif /* __WINE_REGISTERS_H */
......@@ -4,16 +4,13 @@
* Copyright 1995 Martin von Loewis
*/
#ifndef _RELAY32_H
#define _RELAY32_H
#include "pe_image.h"
#ifndef __WINE_RELAY32_H
#define __WINE_RELAY32_H
#include "dlls.h"
#include "struct32.h"
void RELAY32_Unimplemented(char *dll, int item);
WIN32_builtin *RELAY32_GetBuiltinDLL(char *name);
void *RELAY32_GetEntryPoint(WIN32_builtin *dll, char *item, int hint);
LONG RELAY32_CallWindowProc(WNDPROC,int,int,int,int);
void RELAY32_DebugEnter(char *dll,char *name);
void *RELAY32_GetEntryPoint(BUILTIN_DLL *dll, char *item, int hint);
typedef struct tagWNDCLASSA{
UINT style;
......
......@@ -14,7 +14,7 @@
#pragma pack(1)
#endif
/* 16-bit stack layout after CallTo32() */
/* 16-bit stack layout after CallFrom16() */
typedef struct
{
WORD saved_ss; /* saved previous 16-bit stack */
......@@ -49,13 +49,15 @@ typedef struct
#pragma pack(4)
#endif
/* Saved 16-bit stack */
/* Saved 16-bit stack for current process (Win16 only) */
extern WORD IF1632_Saved16_ss;
extern WORD IF1632_Saved16_sp;
/* Saved 32-bit stack */
/* Saved 32-bit stack for current process (Win16 only) */
extern DWORD IF1632_Saved32_esp;
extern SEGPTR IF1632_Stack32_base;
/* Original Unix stack */
extern DWORD IF1632_Original32_esp;
#ifndef WINELIB
......
......@@ -2158,6 +2158,9 @@ typedef struct tagDRAGINFO {
#define EM_SETWORDBREAKPROC (WM_USER+32)
#define EM_GETWORDBREAKPROC (WM_USER+33)
#define EM_GETPASSWORDCHAR (WM_USER+34)
/* Edit control undocumented messages */
#define EM_SCROLL (WM_USER+5)
#define EM_GETTHUMB (WM_USER+14)
typedef int (CALLBACK *EDITWORDBREAKPROC)(LPSTR lpch, int ichCurrent,
int cch, int code);
......
......@@ -46,8 +46,11 @@ struct sigcontext_struct
#define WINE_CODE_SELECTOR 0x17
#endif
#ifdef __svr4__
#if defined(__svr4__) || defined(_SCO_DS)
#include <signal.h>
#ifdef _SCO_DS
#include <sys/regset.h>
#endif
#include <sys/ucontext.h>
#define sigcontext_struct ucontext
#define WINE_DATA_SELECTOR 0x1f
......
......@@ -57,7 +57,7 @@ HLOCAL LOCAL_Alloc(WORD ds, WORD flags, WORD size)
{ return LocalAlloc(flags,size); }
HLOCAL LOCAL_ReAlloc(WORD ds, HLOCAL handle, WORD size, WORD flags)
{ return LocalReAlloc(handle,size,flags); }
NPVOID LOCAL_Lock( WORD ds, HLOCAL handle )
LPSTR LOCAL_Lock( WORD ds, HLOCAL handle )
{ return LocalLock(handle); }
BOOL LOCAL_Unlock( WORD ds, HLOCAL handle )
{ return LocalUnlock(handle); }
......@@ -129,12 +129,7 @@ HGLOBAL GlobalHandle(LPCVOID a)
return 0;
}
WIN32_builtin *RELAY32_GetBuiltinDLL(char *name)
{
return NULL;
}
void *RELAY32_GetEntryPoint(WIN32_builtin *dll, char *item, int hint)
void *RELAY32_GetEntryPoint(BUILTIN_DLL *dll, char *item, int hint)
{
return NULL;
}
......
......@@ -49,7 +49,6 @@ void init_wine_signals(void);
int MAIN_Init(void)
{
extern BOOL RELAY_Init(void);
extern BOOL RELAY32_Init(void);
int queueSize;
......@@ -62,9 +61,6 @@ int MAIN_Init(void)
#ifndef WINELIB
/* Initialize relay code */
if (!RELAY_Init()) return 0;
/* Initialize Win32 relay code */
if (!RELAY32_Init()) return 0;
#endif
/* Create built-in modules */
......
......@@ -47,7 +47,7 @@ static HMODULE MODULE_LoadBuiltin( LPCSTR name, BOOL force )
HMODULE hModule;
NE_MODULE *pModule;
SEGTABLEENTRY *pSegTable;
struct dll_table_s *table;
BUILTIN_DLL *table;
char dllname[16], *p;
/* Fix the name in case we have a full path and extension */
......@@ -71,25 +71,31 @@ static HMODULE MODULE_LoadBuiltin( LPCSTR name, BOOL force )
dprintf_module( stddeb, "Built-in %s: hmodule=%04x\n",
table->name, hModule );
/* Allocate the code segment */
pModule = (NE_MODULE *)GlobalLock( hModule );
pSegTable = NE_SEG_TABLE( pModule );
pSegTable->selector = GLOBAL_CreateBlock( GMEM_FIXED, table->code_start,
pSegTable->minsize, hModule,
TRUE, TRUE, FALSE, NULL );
if (!pSegTable->selector) return 0;
pSegTable++;
/* Allocate the data segment */
pSegTable->selector = GLOBAL_Alloc( GMEM_FIXED, pSegTable->minsize,
hModule, FALSE, FALSE, FALSE );
if (!pSegTable->selector) return 0;
memcpy( GlobalLock( pSegTable->selector ),
table->data_start, pSegTable->minsize );
if (pModule->flags & NE_FFLAGS_WIN32)
{
((NE_WIN32_EXTRAINFO*)(pModule+1))->pe_module = (DWORD)table;
}
else /* Win16 module */
{
/* Allocate the code segment */
pSegTable = NE_SEG_TABLE( pModule );
pSegTable->selector = GLOBAL_CreateBlock(GMEM_FIXED, table->code_start,
pSegTable->minsize, hModule,
TRUE, TRUE, FALSE, NULL );
if (!pSegTable->selector) return 0;
pSegTable++;
/* Allocate the data segment */
pSegTable->selector = GLOBAL_Alloc( GMEM_FIXED, pSegTable->minsize,
hModule, FALSE, FALSE, FALSE );
if (!pSegTable->selector) return 0;
memcpy( GlobalLock( pSegTable->selector ),
table->data_start, pSegTable->minsize );
}
pModule->next = hFirstModule;
hFirstModule = hModule;
......@@ -104,13 +110,14 @@ static HMODULE MODULE_LoadBuiltin( LPCSTR name, BOOL force )
*/
BOOL MODULE_Init(void)
{
/* For these, built-in modules are always used */
#ifndef WINELIB32
if (!MODULE_LoadBuiltin( "KERNEL", TRUE ) ||
!MODULE_LoadBuiltin( "GDI", TRUE ) ||
!MODULE_LoadBuiltin( "USER", TRUE ) ||
!MODULE_LoadBuiltin( "WINPROCS", TRUE )) return FALSE;
BUILTIN_DLL *dll;
/* Load all modules marked as always used */
for (dll = dll_builtin_table; dll->name; dll++)
if (dll->flags & DLL_FLAG_ALWAYS_USED)
if (!MODULE_LoadBuiltin(dll->name, TRUE)) return FALSE;
#endif
/* Initialize KERNEL.178 (__WINFLAGS) with the correct flags value */
......@@ -120,9 +127,9 @@ BOOL MODULE_Init(void)
/***********************************************************************
* MODULE_PrintModule
* MODULE_DumpModule
*/
void MODULE_PrintModule( HMODULE hmodule )
void MODULE_DumpModule( HMODULE hmodule )
{
int i, ordinal;
SEGTABLEENTRY *pSeg;
......@@ -130,6 +137,12 @@ void MODULE_PrintModule( HMODULE hmodule )
WORD *pword;
NE_MODULE *pModule = (NE_MODULE *)GlobalLock( hmodule );
if (!pModule || (pModule->magic != NE_SIGNATURE))
{
fprintf( stderr, "**** %04x is not a module handle\n", hmodule );
return;
}
/* Dump the module info */
printf( "Module %04x:\n", hmodule );
......@@ -142,6 +155,8 @@ void MODULE_PrintModule( HMODULE hmodule )
printf( "os_flags=%d swap_area=%d version=%04x\n",
pModule->os_flags, pModule->min_swap_area,
pModule->expected_version );
if (pModule->flags & NE_FFLAGS_WIN32)
printf( "PE module=%08x\n", (unsigned int)NE_WIN32_MODULE(pModule) );
/* Dump the file info */
......@@ -251,6 +266,31 @@ void MODULE_PrintModule( HMODULE hmodule )
/***********************************************************************
* MODULE_WalkModules
*
* Walk the module list and print the modules.
*/
void MODULE_WalkModules(void)
{
HMODULE hModule = hFirstModule;
fprintf( stderr, "Module Flags Name\n" );
while (hModule)
{
NE_MODULE *pModule = (NE_MODULE *)GlobalLock( hModule );
if (!pModule || (pModule->magic != NE_SIGNATURE))
{
fprintf( stderr, "**** Bad module %04x in list\n", hModule );
return;
}
fprintf( stderr, " %04x %04x %.*s\n", hModule, pModule->flags,
*((char *)pModule + pModule->name_table),
(char *)pModule + pModule->name_table + 1 );
hModule = pModule->next;
}
}
/***********************************************************************
* MODULE_OpenFile
*/
int MODULE_OpenFile( HMODULE hModule )
......@@ -591,7 +631,7 @@ HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
}
else pModule->dlls_to_init = 0;
if (debugging_module) MODULE_PrintModule( hModule );
if (debugging_module) MODULE_DumpModule( hModule );
pModule->next = hFirstModule;
hFirstModule = hModule;
return hModule;
......
......@@ -10,8 +10,10 @@
#include <sys/time.h>
#include <sys/timeb.h>
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__svr4__)
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__svr4__) || defined(_SCO_DS)
#ifndef _SCO_DS
#include <sys/syscall.h>
#endif
#include <sys/param.h>
#else
#include <syscall.h>
......@@ -76,7 +78,7 @@ static void wine_timer(int signal, int code, struct sigcontext *context)
static void win_fault(int signal, struct sigcontext_struct context_struct)
{
struct sigcontext_struct *context = &context_struct;
#elif defined(__svr4__)
#elif defined(__svr4__) || defined(_SCO_DS)
static void win_fault(int signal, void *siginfo, ucontext_t *context)
{
#else
......@@ -128,7 +130,7 @@ static void SIGNAL_SetHandler( int sig, void (*func)() )
#ifdef linux
sig_act.sa_handler = func;
sig_act.sa_flags = SA_RESTART;
sig_act.sa_flags = SA_RESTART | SA_NOMASK;
/* Point to the top of the stack, minus 4 just in case, and make
it aligned */
sig_act.sa_restorer =
......@@ -145,14 +147,14 @@ static void SIGNAL_SetHandler( int sig, void (*func)() )
ret = sigaction( sig, &sig_act, NULL );
#endif /* __FreeBSD__ || __NetBSD__ */
#if defined (__svr4__)
#if defined (__svr4__) || defined(_SCO_DS)
sigset_t sig_mask;
sigemptyset(&sig_mask);
sig_act.sa_handler = func;
sig_act.sa_flags = SA_ONSTACK | SA_SIGINFO;
sig_act.sa_mask = sig_mask;
ret = sigaction( sig, &sig_act, NULL );
#endif /* __svr4__ */
#endif /* __svr4__ || _SCO_DS */
if (ret < 0)
{
......@@ -189,7 +191,7 @@ void init_wine_signals(void)
}
#endif /* __FreeBSD__ || __NetBSD__ */
#if defined (__svr4__)
#if defined (__svr4__) || defined(_SCO_DS)
struct sigaltstack ss;
if ((ss.ss_sp = malloc(SIGSTKSZ) ) == NULL) {
......@@ -203,7 +205,7 @@ void init_wine_signals(void)
perror("sigstack");
exit(1);
}
#endif /* __svr4__ */
#endif /* __svr4__ || _SCO_DS */
SIGNAL_SetHandler( SIGALRM, (void (*)())wine_timer );
SIGNAL_SetHandler( SIGSEGV, (void (*)())win_fault );
......@@ -217,19 +219,21 @@ void init_wine_signals(void)
#ifdef CONFIG_IPC
SIGNAL_SetHandler( SIGUSR2, (void (*)())stop_wait ); /* For IPC */
#endif
SIGNAL_StartBIOSTimer();
}
/**********************************************************************
* SIGNAL_StartTimer
* SIGNAL_StartBIOSTimer
*
* Start the BIOS tick timer.
*/
void SIGNAL_StartBIOSTimer(void)
{
struct itimerval vt_timer;
static int timer_started = 0;
if (timer_started) return;
timer_started = 1;
vt_timer.it_interval.tv_sec = 0;
vt_timer.it_interval.tv_usec = 54929;
vt_timer.it_value = vt_timer.it_interval;
......
......@@ -384,7 +384,7 @@ HTASK TASK_CreateTask( HMODULE hModule, HANDLE hInstance, HANDLE hPrevInstance,
char *stack16Top, *stack32Top;
STACK16FRAME *frame16;
STACK32FRAME *frame32;
extern DWORD CALL16_RetAddr_word;
extern DWORD CALLTO16_RetAddr_word;
#endif
if (!(pModule = (NE_MODULE *)GlobalLock( hModule ))) return 0;
......@@ -529,8 +529,8 @@ HTASK TASK_CreateTask( HMODULE hModule, HANDLE hInstance, HANDLE hPrevInstance,
frame16->ordinal_number = 24; /* WINPROCS.24 is TASK_Reschedule */
frame16->dll_id = 24; /* WINPROCS */
frame16->bp = 0;
frame16->ip = LOWORD( CALL16_RetAddr_word );
frame16->cs = HIWORD( CALL16_RetAddr_word );
frame16->ip = LOWORD( CALLTO16_RetAddr_word );
frame16->cs = HIWORD( CALLTO16_RetAddr_word );
pTask->sp -= sizeof(STACK16FRAME);
/* If there's no 16-bit stack yet, use a part of the new task stack */
......
......@@ -22,7 +22,7 @@
_syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount)
#endif /* linux */
#ifdef __svr4__
#if defined(__svr4__) || defined(_SCO_DS)
#include <sys/sysi86.h>
#include <sys/seg.h>
#endif
......@@ -153,7 +153,7 @@ int LDT_SetEntry( int entry, const ldt_entry *content )
}
}
#endif /* __NetBSD__ || __FreeBSD__ */
#ifdef __svr4__
#if defined(__svr4__) || defined(_SCO_DS)
{
struct ssd ldt_mod;
int i;
......
......@@ -823,16 +823,14 @@ HLOCAL LOCAL_ReAlloc( HANDLE ds, HLOCAL handle, WORD size, WORD flags )
/***********************************************************************
* LOCAL_Lock
* LOCAL_InternalLock
*/
HANDLE LOCAL_Lock( HANDLE ds, HLOCAL handle )
static HLOCAL LOCAL_InternalLock( LPSTR heap, HLOCAL handle )
{
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
dprintf_local( stddeb, "LocalLock: %04x ", handle );
if (HANDLE_MOVEABLE(handle))
{
LOCALHANDLEENTRY *pEntry = (LOCALHANDLEENTRY *)(ptr + handle);
LOCALHANDLEENTRY *pEntry = (LOCALHANDLEENTRY *)(heap + handle);
if (pEntry->lock < 255) pEntry->lock++;
handle = pEntry->addr;
}
......@@ -842,6 +840,16 @@ HANDLE LOCAL_Lock( HANDLE ds, HLOCAL handle )
/***********************************************************************
* LOCAL_Lock
*/
LPSTR LOCAL_Lock( HANDLE ds, HLOCAL handle )
{
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
return handle ? ptr + LOCAL_InternalLock( ptr, handle ) : NULL;
}
/***********************************************************************
* LOCAL_Unlock
*/
BOOL LOCAL_Unlock( WORD ds, HLOCAL handle )
......@@ -929,7 +937,8 @@ HLOCAL LocalFree( HLOCAL handle )
*/
NPVOID LocalLock( HLOCAL handle )
{
return LOCAL_Lock( CURRENT_DS, handle );
char *ptr = PTR_SEG_OFF_TO_LIN( CURRENT_DS, 0 );
return (NPVOID)LOCAL_InternalLock( ptr, handle );
}
......
......@@ -54,7 +54,7 @@ void COMM_Init(void)
}
stat(temp, &st);
if (!S_ISCHR(st.st_mode))
fprintf(stderr,"comm: can 't use `%s' as %s !\n", temp, option);
fprintf(stderr,"comm: can't use `%s' as %s !\n", temp, option);
else
if ((COM[x].devicename = malloc(strlen(temp)+1)) == NULL)
fprintf(stderr,"comm: can't malloc for device info!\n");
......@@ -77,7 +77,7 @@ void COMM_Init(void)
else {
stat(temp, &st);
if (!S_ISCHR(st.st_mode))
fprintf(stderr,"comm: can 't use `%s' as %s !\n", temp, option);
fprintf(stderr,"comm: can't use `%s' as %s !\n", temp, option);
else
if ((LPT[x].devicename = malloc(strlen(temp)+1)) == NULL)
fprintf(stderr,"comm: can't malloc for device info!\n");
......@@ -352,15 +352,19 @@ LONG EscapeCommFunction(int fd, int nFunction)
return 0x80 + max;
break;
#ifdef TIOCM_DTR
case CLRDTR:
port.c_cflag &= TIOCM_DTR;
break;
#endif
#ifdef TIOCM_RTS
case CLRRTS:
port.c_cflag &= TIOCM_RTS;
break;
#endif
#ifndef __svr4__
#ifdef CRTSCTS
case SETDTR:
port.c_cflag |= CRTSCTS;
break;
......@@ -464,7 +468,11 @@ int SetCommState(DCB FAR *lpdcb)
port.c_cc[VMIN] = 0;
port.c_cc[VTIME] = 1;
#ifdef IMAXBEL
port.c_iflag &= ~(ISTRIP|BRKINT|IGNCR|ICRNL|INLCR|IMAXBEL);
#else
port.c_iflag &= ~(ISTRIP|BRKINT|IGNCR|ICRNL|INLCR);
#endif
port.c_iflag |= (IGNBRK);
port.c_oflag &= ~(OPOST);
......@@ -622,7 +630,7 @@ int SetCommState(DCB FAR *lpdcb)
commerror = IE_BYTESIZE;
return -1;
}
#ifndef __svr4__
#ifdef CRTSCTS
if (lpdcb->fDtrflow || lpdcb->fRtsflow || lpdcb->fOutxCtsFlow)
port.c_cflag |= CRTSCTS;
......@@ -730,7 +738,7 @@ int GetCommState(int fd, DCB FAR *lpdcb)
lpdcb->fBinary = 1;
lpdcb->fDtrDisable = 0;
#ifndef __svr4__
#ifdef CRTSCTS
if (port.c_cflag & CRTSCTS) {
lpdcb->fDtrflow = 1;
......
......@@ -266,7 +266,7 @@ BOOL ParseDebugOptions(char *options)
*/
static BOOL MAIN_ParseDLLOptions(char *options)
{
int i, l;
int l;
BUILTIN_DLL *dll;
if (strlen(options)<3) return FALSE;
......@@ -280,7 +280,11 @@ static BOOL MAIN_ParseDLLOptions(char *options)
if (!lstrncmpi(options+1,dll->name,l-1))
{
if (*options == '+') dll->flags &= ~DLL_FLAG_NOT_USED;
else dll->flags |= DLL_FLAG_NOT_USED;
else
{
if (dll->flags & DLL_FLAG_ALWAYS_USED) return FALSE;
dll->flags |= DLL_FLAG_NOT_USED;
}
break;
}
}
......@@ -438,8 +442,9 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
fprintf(stderr,"%s: Syntax: -dll +xxx,... or -dll -xxx,...\n",argv[0]);
fprintf(stderr,"Example: -dll -ole2 Do not use emulated OLE2.DLL\n");
fprintf(stderr,"Available DLLs\n");
for (dll = dll_builtin_table; dll->name; dll++)
fprintf(stderr,"%-9s%c",dll->name, (((i+2)%8==0)?'\n':' '));
for (i = 0, dll = dll_builtin_table; dll->name; dll++)
if (!(dll->flags & DLL_FLAG_ALWAYS_USED))
fprintf(stderr,"%-9s%c",dll->name, (((++i)%8==0)?'\n':' '));
fprintf(stderr,"\n\n");
exit(1);
}
......
......@@ -9,8 +9,7 @@ unsigned int usleep (unsigned int useconds)
delay.tv_sec = 0;
delay.tv_usec = useconds;
(void) select (0, (fd_set *) NULL, (fd_set *) NULL, (fd_set *) NULL,
&delay);
(void) select (0, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, &delay);
return 0;
}
......
......@@ -9,6 +9,7 @@
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
#include "windows.h"
#include "win.h"
#include "winerror.h"
......@@ -76,7 +77,7 @@ add_handle(HKEY hkey,LPKEYSTRUCT lpkey,REGSAM accessmask) {
}
static LPKEYSTRUCT
get_handle(hkey) {
get_handle(HKEY hkey) {
int i;
for (i=0;i<nrofopenhandles;i++)
......
......@@ -11,7 +11,7 @@
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/ioctl.h>
#ifdef __svr4__
#if defined__svr4__
#include <sys/filio.h>
#include <sys/ioccom.h>
#endif
......@@ -29,6 +29,11 @@
#include "stddebug.h"
#include "debug.h"
#ifdef _SCO_DS
#define _IOR _IOSR
#define _IOW _IOSW
#endif
static WORD wsa_errno;
static int wsa_initted;
static key_t wine_key = 0;
......@@ -208,7 +213,9 @@ static WORD wsaerrno(void)
#ifdef EPROCLIM
case EPROCLIM: return WSAEPROCLIM;
#endif
#ifdef EUSERS
case EUSERS: return WSAEUSERS;
#endif
#ifdef EDQUOT
case EDQUOT: return WSAEDQUOT;
#endif
......
......@@ -138,7 +138,7 @@ BOOL DOSMEM_Init(void)
*/
void DOSMEM_Tick(void)
{
pBiosData->Ticks++;
if (pBiosData) pBiosData->Ticks++;
}
......@@ -149,8 +149,6 @@ void DOSMEM_Tick(void)
*/
void DOSMEM_FillBiosSegment(void)
{
extern void SIGNAL_StartBIOSTimer(void);
pBiosData = (BIOSDATA *)GlobalLock( DOSMEM_BiosSeg );
/* Clear all unused values */
......@@ -175,7 +173,5 @@ void DOSMEM_FillBiosSegment(void)
pBiosData->NbHardDisks = 2;
pBiosData->KbdBufferStart = 0x1e;
pBiosData->KbdBufferEnd = 0x3e;
SIGNAL_StartBIOSTimer();
}
......@@ -28,8 +28,10 @@ static WORD INSTR_ReplaceSelector( struct sigcontext_struct *context, WORD sel)
{
if (sel == 0x40)
{
extern void SIGNAL_StartBIOSTimer(void);
fprintf( stderr, "Direct access to segment 0x40 (cs:ip=%04x:%04lx).\n",
CS_reg(context), EIP_reg(context) );
SIGNAL_StartBIOSTimer();
return DOSMEM_BiosSeg;
}
return 0; /* Can't replace selector */
......
......@@ -28,8 +28,8 @@
#include "xmalloc.h"
#include "stddebug.h"
#include "debug.h"
#ifdef __svr4__
/* SVR4 DOESNTdo locking the same way must implement properly */
#if defined(__svr4__) || defined(_SCO_DS)
/* SVR4 DOESNT do locking the same way must implement properly */
#define LOCK_EX 0
#define LOCK_SH 1
#define LOCK_NB 8
......@@ -346,7 +346,7 @@ void OpenExistingFile(struct sigcontext_struct *context)
int result,retries=sharing_retries;
{
#ifdef __svr4__
#if defined(__svr4__) || defined(_SCO_DS)
printf("Should call flock and needs porting to lockf\n");
result = 0;
retries = 0;
......
......@@ -12,6 +12,7 @@
#include "windows.h"
#include "win.h"
#include "ldt.h"
#include "module.h"
#include "callback.h"
#include "user.h"
#include "driver.h"
......
......@@ -3,6 +3,10 @@
*
* Copyright 1993 Alexandre Julliard
*
* Enhacements by Juergen Marquardt 1996
*
* Implementation of a second font cache which
* will be updated dynamically
*/
#include <stdio.h>
......@@ -17,6 +21,7 @@
#include "stddebug.h"
#include "debug.h"
#define FONTCACHE 32 /* dynamic font cache size */
#define MAX_FONTS 256
static LPLOGFONT lpLogFontList[MAX_FONTS] = { NULL };
......@@ -139,10 +144,15 @@ static XFontStruct * FONT_MatchFont( LOGFONT * font, DC * dc )
if (height == 0) height = 120; /* Default height = 12 */
else if (height < 0)
{
/* If height is negative, it means the height of the characters */
/* *without* the internal leading. So we adjust it a bit to */
/* compensate. 5/4 seems to give good results for small fonts. */
height = 10 * (-height * 8 / 7);
/* If height is negative, it means the height of the characters */
/* *without* the internal leading. So we adjust it a bit to */
/* compensate. 5/4 seems to give good results for small fonts. */
/*
* J.M.: This causes wrong font size for bigger fonts e.g. in Winword & Write
height = 10 * (-height * 9 / 8);
* may be we have to use an non linear function
*/
height *= -10;
}
else height *= 10;
width = 10 * (font->lfWidth * dc->w.VportExtY / dc->w.WndExtY);
......@@ -151,10 +161,17 @@ static XFontStruct * FONT_MatchFont( LOGFONT * font, DC * dc )
width, font->lfWidth );
width = -width;
}
spacing = (font->lfPitchAndFamily & FIXED_PITCH) ? 'm' :
(font->lfPitchAndFamily & VARIABLE_PITCH) ? 'p' : '*';
charset = (font->lfCharSet == ANSI_CHARSET) ? "iso8859-1" : "*-*";
if (*font->lfFaceName) family = FONT_TranslateName( font->lfFaceName );
if (*font->lfFaceName) {
family = FONT_TranslateName( font->lfFaceName );
/* FIX ME: I don't if that's correct but it works J.M. */
spacing = '*';
}
else switch(font->lfPitchAndFamily & 0xf0)
{
case FF_ROMAN:
......@@ -191,6 +208,7 @@ static XFontStruct * FONT_MatchFont( LOGFONT * font, DC * dc )
names = XListFonts( display, pattern, 1, &count );
if (count > 0) break;
if (spacing == 'm') /* try 'c' if no 'm' found */ {
spacing = 'c';
continue;
} else if (spacing == 'p') /* try '*' if no 'p' found */ {
......@@ -367,6 +385,15 @@ int FONT_GetObject( FONTOBJ * font, int count, LPSTR buffer )
HFONT FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font )
{
static X_PHYSFONT stockFonts[LAST_STOCK_FONT-FIRST_STOCK_FONT+1];
static struct {
HFONT id;
LOGFONT logfont;
int access;
int used;
X_PHYSFONT cacheFont; } cacheFonts[FONTCACHE], *cacheFontsMin;
int i;
X_PHYSFONT * stockPtr;
HFONT prevHandle = dc->w.hFont;
XFontStruct * fontStruct;
......@@ -393,9 +420,46 @@ HFONT FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font )
if ((hfont >= FIRST_STOCK_FONT) && (hfont <= LAST_STOCK_FONT))
stockPtr = &stockFonts[hfont - FIRST_STOCK_FONT];
else
else {
stockPtr = NULL;
/*
* Ok, It's not a stock font but
* may be it's cached in dynamic cache
*/
for(i=0; i<FONTCACHE; i++) /* search for same handle */
if (cacheFonts[i].id==hfont) { /* Got the handle */
/*
* Check if Handle matches the font
*/
if(memcmp(&cacheFonts[i].logfont,&(font->logfont), sizeof(LOGFONT))) {
/* No: remove handle id from dynamic font cache */
cacheFonts[i].access=0;
cacheFonts[i].used=0;
cacheFonts[i].id=0;
/* may be there is an unused handle which contains the font */
for(i=0; i<FONTCACHE; i++) {
if((cacheFonts[i].used == 0) &&
(memcmp(&cacheFonts[i].logfont,&(font->logfont), sizeof(LOGFONT)))== 0) {
/* got it load from cache and set new handle id */
stockPtr = &cacheFonts[i].cacheFont;
cacheFonts[i].access=1;
cacheFonts[i].used=1;
cacheFonts[i].id=hfont;
dprintf_font(stddeb,"FONT_SelectObject: got font from unused handle\n");
break;
}
}
}
else {
/* Yes: load from dynamic font cache */
stockPtr = &cacheFonts[i].cacheFont;
cacheFonts[i].access++;
cacheFonts[i].used++;
}
break;
}
}
if (!stockPtr || !stockPtr->fstruct)
{
if (!(fontStruct = FONT_MatchFont( &font->logfont, dc )))
......@@ -422,16 +486,14 @@ HFONT FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font )
hfont, fontStruct );
}
/* Free previous font */
if ((prevHandle < FIRST_STOCK_FONT) || (prevHandle > LAST_STOCK_FONT))
{
if (dc->u.x.font.fstruct)
XFreeFont( display, dc->u.x.font.fstruct );
}
/* Unuse previous font */
for (i=0; i < FONTCACHE; i++) {
if (cacheFonts[i].id == prevHandle) {
cacheFonts[i].used--;
}
}
/* Store font */
dc->w.hFont = hfont;
if (stockPtr)
{
......@@ -444,8 +506,31 @@ HFONT FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font )
}
else
{
dc->u.x.font.fstruct = fontStruct;
FONT_GetMetrics( &font->logfont, fontStruct, &dc->u.x.font.metrics );
/*
* Check in cacheFont
*/
cacheFontsMin=NULL;
for (i=0; i < FONTCACHE; i++) {
if (cacheFonts[i].used==0)
if ((!cacheFontsMin) || ((cacheFontsMin) && (cacheFontsMin->access > cacheFonts[i].access)))
cacheFontsMin=&cacheFonts[i];
}
if (!cacheFontsMin)
fprintf(stderr,"No unused font cache entry !!!!\n" );
if (cacheFontsMin->id!=0) {
dprintf_font(stddeb,
"FONT_SelectObject: Freeing %04x \n",cacheFontsMin->id );
XFreeFont( display, cacheFontsMin->cacheFont.fstruct );
}
cacheFontsMin->cacheFont.fstruct = fontStruct;
FONT_GetMetrics( &font->logfont, fontStruct, &cacheFontsMin->cacheFont.metrics );
cacheFontsMin->access=1;
cacheFontsMin->used=1;
cacheFontsMin->id=hfont;
memcpy( &dc->u.x.font, &(cacheFontsMin->cacheFont), sizeof(cacheFontsMin->cacheFont) );
memcpy(&cacheFontsMin->logfont,&(font->logfont), sizeof(LOGFONT));
}
return prevHandle;
}
......
Due to the implementation of FindText() and ReplaceText() in /misc/commdlg.c
I had to change the definition in sysres_En.rc of the dialogs FIND_TEXT and
REPLACE_TEXT. These changes should also be made for the other languages.
Not only should the definitions in sysres_??.rc made up to date with the
Enlish version, but also the dimensions of the controls should be changed so
that they will be big enough to contain the text for every individual
language.
The dimensions of the controls should be changed so that they will be big
enough to contain the text for every individual language.
Therefore:
- Definitions of FIND_TEXT and REPLACE_TEXT in sysres_??.rc should match
those in sysres_En.rc
- Dimensions of controls are based on sysres_En.rc. Other languages should
change these dimensions in order to make the text fit.
Frans van Dorsselaer
dorssel@rulhm1.LeidenUniv.nl
I (krynos@qbc.clic.net) will try to make sysres_Fr.rc fit correctly, if
someone is interrested in others languages, message me. I may correct
others languages after, but not soon.
Here are structure of each line (for example):
PUSHBUTTON "&Help", 1038, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP
1038: The ID of this button, you shouldn't change this.
174 : X-offset of the button with respect to the upper-left corner of
the dialog box.
75 : Y-offset
50 : The width of the button
14 : The height
flags (WS_??? etc): They control how the dialog behaves. Things like:
changing the focus with a TAB, scrolling to a list
of radiobuttons with up/down keys, etc. If you're
not sure: leave them as they are (in the english
version).
Robert Pouliot (krynos@qbc.clic.net): Changes to sysres_Fr.rc have been made.
Frans van Dorsselaer
dorssel@rulhm1.LeidenUniv.nl
......@@ -165,36 +165,38 @@ FONT 8, "Helv"
}
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 84
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 236, 62
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Hledn"
FONT 8, "Helv"
{
LTEXT "&Vyhledat:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
CHECKBOX "Pouze &cel slova", 1040, 20, 30, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "&Rozliovat mal a velk psmena", 1041, 20, 50, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
GROUPBOX "Smr", 1072, 90, 40, 80, 40, BS_GROUPBOX
RADIOBUTTON "&Nahoru", 1056, 100, 50, 50, 12
RADIOBUTTON "&Dolu", 1057, 150, 50, 50, 12
DEFPUSHBUTTON "Vyhledat d&al", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Zavt", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "&Vyhledat:", -1, 4, 8, 42, 8
EDITTEXT 1152, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "Pouze &cel slova", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "&Rozliovat mal a velk psmena", 1041, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP
GROUPBOX "Smr", 1072, 107, 26, 68, 28
CONTROL "N&ahoru", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12
CONTROL "&Dolu", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12
DEFPUSHBUTTON "Vyhledat d&al", 1, 182, 5, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Zavt", 2, 182, 23, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Npovda", 1038, 182, 45, 50, 14, WS_GROUP | WS_TABSTOP
}
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 114
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 230, 94
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Zmna"
FONT 8, "Helv"
{
LTEXT "&Vyhledat:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
LTEXT "&Zamnit za:", 1090, 6, 26, 40, 9
LTEXT "", 1091, 60, 26, 150, 9
CHECKBOX "Pouze &cel slova", 1040, 20, 40, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "&Rozliovat mal a velk psmena", 1041, 20, 60, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
DEFPUSHBUTTON "Vyhledat d&al", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Za&mnit", 1024, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Zamnit ve v&bru", 1025, 206, 44, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Zavt", 2, 206, 64, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "&Vyhledat:", -1, 4, 9, 48, 8
EDITTEXT 1152, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "&Zamnit za:", -1, 4, 26, 48, 8
EDITTEXT 1153, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "Pouze &cel slova", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "&Rozliovat mal a velk psmena", 1041, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP
DEFPUSHBUTTON "Vyhledat d&al", 1, 174, 4, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Za&mnit", 1024, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Zamnit ve v&bru", 1025, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Zavt", 2, 174, 55, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Npovda", 1038, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP
}
......@@ -165,36 +165,38 @@ FONT 8, "Helv"
}
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 84
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 236, 62
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Find"
FONT 8, "Helv"
{
LTEXT "&Find hvad:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
CHECKBOX "Kun &hele ord", 1040, 20, 30, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Forskel p store/sm &bogstaver", 1041, 20, 50, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
GROUPBOX "Retning", 1072, 90, 40, 80, 40, BS_GROUPBOX
RADIOBUTTON "&Op", 1056, 100, 50, 50, 12
RADIOBUTTON "&Ned", 1057, 150, 50, 50, 12
DEFPUSHBUTTON "&Find nste", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Annuller", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "&Find hvad:", -1, 4, 8, 42, 8
EDITTEXT 1152, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "&Kun hele ord", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Forskel p store/sm &bogstaver", 1041, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP
GROUPBOX "Retning", 1072, 107, 26, 68, 28
CONTROL "&Op", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12
CONTROL "&Ned", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12
DEFPUSHBUTTON "&Find nste", 1, 182, 5, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Annuller", 2, 182, 23, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Hjlp", 1038, 182, 45, 50, 14, WS_GROUP | WS_TABSTOP
}
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 114
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 230, 94
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Erstat"
FONT 8, "Helv"
{
LTEXT "&Find hvad:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
LTEXT "&Erstat med:", 1090, 6, 26, 40, 9
LTEXT "", 1091, 60, 26, 150, 9
CHECKBOX "Kun &hele ord", 1040, 20, 40, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Forskel p store/sm &bogstaver", 1041, 20, 60, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
DEFPUSHBUTTON "&Find nste", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Erstat", 1024, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Erstat &alle", 1025, 206, 44, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Afbryd", 2, 206, 64, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "&Find hvad:", -1, 4, 9, 48, 8
EDITTEXT 1152, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "&Erstat med:", -1, 4, 26, 48, 8
EDITTEXT 1153, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "&Kun hele ord", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_TABSTOP
CHECKBOX "Forskel p store/sm &bogstaver", 1041, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP
DEFPUSHBUTTON "&Find nste", 1, 174, 4, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Erstat", 1024, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Erstat &alle", 1025, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Annuller", 2, 174, 55, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Hjlp", 1038, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP
}
......@@ -165,37 +165,38 @@ FONT 8, "Helv"
}
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 84
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 236, 62
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Suchen"
FONT 8, "Helv"
{
LTEXT "S&uchen nach:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
CHECKBOX "Nur ganze &Worte", 1040, 20, 30, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Beachte Gro/Kleinschreibung", 1041, 20, 50, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
GROUPBOX "Richtung", 1072, 90, 40, 80, 40, BS_GROUPBOX
RADIOBUTTON "&Hoch", 1056, 100, 50, 50, 12
RADIOBUTTON "&Runter", 1057, 150, 50, 50, 12
DEFPUSHBUTTON "&Nchsten finden", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Abbrechen", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "S&uchen nach:", -1, 4, 8, 42, 8
EDITTEXT 1152, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "Nur ganze &Worte", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Beachte Gro/Kleinschreibung", 1041, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP
GROUPBOX "Richtung", 1072, 107, 26, 68, 28
CONTROL "H&och", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12
CONTROL "&Runter", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12
DEFPUSHBUTTON "&Nchsten finden", 1, 182, 5, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Abbrechen", 2, 182, 23, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Hilfe", 1038, 182, 45, 50, 14, WS_GROUP | WS_TABSTOP
}
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 114
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 230, 94
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Ersetzen"
FONT 8, "Helv"
{
LTEXT "S&uchen nach:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
LTEXT "Ersetzen &durch:", 1090, 6, 26, 40, 9
LTEXT "", 1091, 60, 26, 150, 9
CHECKBOX "Nur ganze &Worte", 1040, 20, 40, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Beachte Gro/Kleinschreibung", 1041, 20, 60, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
DEFPUSHBUTTON "&Nchsten finden", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Ersetzen", 1024, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Alle ersetzen", 1025, 206, 44, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Abbrechen", 2, 206, 64, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "S&uchen nach:", -1, 4, 9, 48, 8
EDITTEXT 1152, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "Ersetzen &durch:", -1, 4, 26, 48, 8
EDITTEXT 1153, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "Nur ganze &Worte", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Beachte Gro/Kleinschreibung", 1041, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP
DEFPUSHBUTTON "&Nchsten finden", 1, 174, 4, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Ersetzen", 1024, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Alle ersetzen", 1025, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Abbrechen", 2, 174, 55, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Hilfe", 1038, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP
}
......@@ -165,37 +165,38 @@ FONT 8, "Helv"
}
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 84
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 236, 62
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Seru"
FONT 8, "Helv"
{
LTEXT "&Seru:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
CHECKBOX "Nur tutan &vorton", 1040, 20, 30, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Atentu &Usklecon", 1041, 20, 50, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
GROUPBOX "Direkto", 1072, 90, 40, 80, 40, BS_GROUPBOX
RADIOBUTTON "&Retro", 1056, 100, 50, 50, 12
RADIOBUTTON "&Antaen", 1057, 150, 50, 50, 12
DEFPUSHBUTTON "&Pluseru", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Nuligu", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "&Seru:", -1, 4, 8, 42, 8
EDITTEXT 1152, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "Nur tutan &vorton", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Atentu &Usklecon", 1041, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP
GROUPBOX "Direkto", 1072, 107, 26, 68, 28
CONTROL "&Retro", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12
CONTROL "&Antaen", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12
DEFPUSHBUTTON "&Pluseru", 1, 182, 5, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Nuligu", 2, 182, 23, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Helpu", 1038, 182, 45, 50, 14, WS_GROUP | WS_TABSTOP
}
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 114
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 230, 94
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Anstataigu"
FONT 8, "Helv"
{
LTEXT "Anstataigu:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
LTEXT "&per:", 1090, 6, 26, 40, 9
LTEXT "", 1091, 60, 26, 150, 9
CHECKBOX "Nur tutan &vorton", 1040, 20, 40, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Atentu &Usklecon", 1041, 20, 60, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
DEFPUSHBUTTON "Plu&seru", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Anstataigu", 1024, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Anstataigu &iujn", 1025, 206, 44, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Nuligu", 2, 206, 64, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "Anstataigu:", -1, 4, 9, 48, 8
EDITTEXT 1152, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "&per:", -1, 4, 26, 48, 8
EDITTEXT 1153, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "Nur tutan &vorton", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Atentu &Usklecon", 1041, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP
DEFPUSHBUTTON "Plu&seru", 1, 174, 4, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Anstataigu", 1024, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Anstataigu &iujn", 1025, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Nuligu", 2, 174, 55, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Helpu", 1038, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP
}
......@@ -166,37 +166,38 @@ FONT 8, "Helv"
}
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 84
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 236, 62
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Buscar"
FONT 8, "Helv"
{
LTEXT "Buscar:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
CHECKBOX "&Comparar palabra entera solamente", 1040, 20, 30, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "&Maysculas/minsculas", 1041, 20, 50, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
GROUPBOX "Direccin", 1072, 90, 40, 80, 40, BS_GROUPBOX
RADIOBUTTON "A&rriba", 1056, 100, 50, 50, 12
RADIOBUTTON "&Abajo", 1057, 150, 50, 50, 12
DEFPUSHBUTTON "Buscar &siguiente", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Cancelar", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "Buscar:", -1, 4, 8, 42, 8
EDITTEXT 1152, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "&Comparar palabra entera solamente", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "&Maysculas/minsculas", 1041, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP
GROUPBOX "Direccin", 1072, 107, 26, 68, 28
CONTROL "A&rriba", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12
CONTROL "&Abajo", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12
DEFPUSHBUTTON "Buscar &siguiente", 1, 182, 5, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Cancelar", 2, 182, 23, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "A&yuda", 1038, 182, 45, 50, 14, WS_GROUP | WS_TABSTOP
}
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 114
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 230, 94
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "R&eemplazar"
FONT 8, "Helv"
{
LTEXT "Buscar:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
LTEXT "Re&place With:", 1090, 6, 26, 40, 9
LTEXT "", 1091, 60, 26, 150, 9
CHECKBOX "&Comparar palabra entera solamente", 1040, 20, 40, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "&Maysculas/minsculas", 1041, 20, 60, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
DEFPUSHBUTTON "Reemplazar &siguiente", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Reemplazar", 1024, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Reemplazar &todo", 1025, 206, 44, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Cancelar", 2, 206, 64, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "Buscar:", -1, 4, 9, 48, 8
EDITTEXT 1152, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "Re&emplazar por:", 1090, -1, 4, 26, 48, 8
EDITTEXT 1153, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "&Comparar palabra entera solamente", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "&Maysculas/minsculas", 1041, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP
DEFPUSHBUTTON "Reemplazar &siguiente", 1, 174, 4, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Reemplazar", 1024, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Reemplazar &todo", 1025, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Cancelar", 2, 174, 55, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "A&yuda", 1038, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP
}
......@@ -165,36 +165,38 @@ FONT 8, "Helv"
}
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 84
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 236, 62
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Etsi"
FONT 8, "Helv"
{
LTEXT "&Etsittv:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
CHECKBOX "&Koko sana", 1040, 20, 30, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Kirjaink&oko", 1041, 20, 50, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
GROUPBOX "Suunta", 1072, 90, 40, 80, 40, BS_GROUPBOX
RADIOBUTTON "&Yls", 1056, 100, 50, 50, 12
RADIOBUTTON "&Alas", 1057, 150, 50, 50, 12
DEFPUSHBUTTON "Etsi &seuraava", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Peruuta", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "&Etsittv:", -1, 4, 8, 42, 8
EDITTEXT 1152, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "&Koko sana", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Kirjaink&oko", 1041, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP
GROUPBOX "Suunta", 1072, 107, 26, 68, 28
CONTROL "&Yls", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12
CONTROL "&Alas", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12
DEFPUSHBUTTON "Etsi &seuraava", 1, 182, 5, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Peruuta", 2, 182, 23, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "O&hje", 1038, 182, 45, 50, 14, WS_GROUP | WS_TABSTOP
}
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 114
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 230, 94
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Korvaa"
FONT 8, "Helv"
{
LTEXT "&Etsittv:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
LTEXT "Ko&rvattava:", 1090, 6, 26, 40, 9
LTEXT "", 1091, 60, 26, 150, 9
CHECKBOX "&Koko sana", 1040, 20, 40, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Kirjaink&oko", 1041, 20, 60, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
DEFPUSHBUTTON "Etsi &seuraava", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Korv&aa", 1024, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Korvaa ka&ikki", 1025, 206, 44, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "S&ulje", 2, 206, 64, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "&Etsittv:", -1, 4, 9, 48, 8
EDITTEXT 1152, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "Ko&rvattava:", -1, 4, 26, 48, 8
EDITTEXT 1153, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "&Koko sana", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Kirjaink&oko", 1041, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP
DEFPUSHBUTTON "Etsi &seuraava", 1, 174, 4, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Korv&aa", 1024, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Korvaa ka&ikki", 1025, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "S&ulje", 2, 174, 55, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "O&hje", 1038, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP
}
......@@ -165,36 +165,38 @@ FONT 8, "Helv"
}
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 84
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 236, 62
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Finn"
FONT 8, "Helv"
{
LTEXT "&Finn hva:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
CHECKBOX "&Kun hele ord", 1040, 20, 30, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "&Skill p store/sm bokstaver", 1041, 20, 50, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
GROUPBOX "Retning", 1072, 90, 40, 80, 40, BS_GROUPBOX
RADIOBUTTON "&Opp", 1056, 100, 50, 50, 12
RADIOBUTTON "&Ned", 1057, 150, 50, 50, 12
DEFPUSHBUTTON "&Finn neste", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Avbryt", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "&Finn hva:", -1, 4, 8, 42, 8
EDITTEXT 1152, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "&Kun hele ord", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "&Skill p store/sm bokstaver", 1041, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP
GROUPBOX "Retning", 1072, 107, 26, 68, 28
CONTROL "&Opp", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12
CONTROL "&Ned", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12
DEFPUSHBUTTON "&Finn neste", 1, 182, 5, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Avbryt", 2, 182, 23, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Hjelp", 1038, 182, 45, 50, 14, WS_GROUP | WS_TABSTOP
}
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 114
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 230, 94
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Bytt"
FONT 8, "Helv"
{
LTEXT "&Finn hva:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
LTEXT "&Bytt med:", 1090, 6, 26, 40, 9
LTEXT "", 1091, 60, 26, 150, 9
CHECKBOX "&Kun hele ord", 1040, 20, 40, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "&Skill p store/sm bokstaver", 1041, 20, 60, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
DEFPUSHBUTTON "&Finn neste", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Bytt", 1024, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Bytt alt", 1025, 206, 44, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Avbryt", 2, 206, 64, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "&Finn hva:", -1, 4, 9, 48, 8
EDITTEXT 1152, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "&Bytt med:", -1, 4, 26, 48, 8
EDITTEXT 1153, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
CHECKBOX "&Kun hele ord", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "&Skill p store/sm bokstaver", 1041, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
DEFPUSHBUTTON "&Finn neste", 1, 174, 4, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Bytt", 1024, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Bytt alt", 1025, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Avbryt", 2, 174, 55, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Hjelp", 1038, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP
}
......@@ -10,8 +10,8 @@
#include "windows.h"
#include "winerror.h"
#include "kernel32.h"
#include "module.h"
#include "task.h"
#include "pe_image.h"
#include "stddebug.h"
#include "debug.h"
......@@ -26,7 +26,7 @@ LPSTR GetCommandLineA(void)
PDB *pdb = (PDB *)GlobalLock( GetCurrentPDB() );
#ifndef WINELIB
strcpy(buffer, wine_files->name);
strcpy(buffer, MODULE_GetModuleName( GetExePtr(GetCurrentTask()) ) );
cp = buffer+strlen(buffer);
*cp++ = ' ';
#else
......
......@@ -39,17 +39,14 @@
#include "stddebug.h"
#include "debug.h"
#include "except.h"
#include "relay32.h"
WINAPI DWORD KERNEL32_537(PEXCEPTION_POINTERS ptrs);
LPTOP_LEVEL_EXCEPTION_FILTER pTopExcHandler = NULL;
void EXC_Init(void)
{
WIN32_builtin *dll = RELAY32_GetBuiltinDLL("KERNEL32");
pTopExcHandler = (LPTOP_LEVEL_EXCEPTION_FILTER)RELAY32_GetEntryPoint( dll,
"UnhandledExceptionFilter", 537 );
pTopExcHandler = (LPTOP_LEVEL_EXCEPTION_FILTER)PE_GetProcAddress(
GetModuleHandle("KERNEL32"),
"UnhandledExceptionFilter" );
}
/*
......
......@@ -12,7 +12,6 @@
#include "kernel32.h"
#include "handle32.h"
#include "except.h"
#include "pe_image.h"
#include "task.h"
#include "stddebug.h"
#define DEBUG_WIN32
......
......@@ -16,6 +16,7 @@
#include "windows.h"
#include "kernel32.h"
#include "pe_image.h"
#include "module.h"
#include "handle32.h"
#include "libres.h"
#include "resource32.h"
......@@ -92,7 +93,8 @@ PIMAGE_RESOURCE_DIRECTORY GetResDirEntry(PIMAGE_RESOURCE_DIRECTORY resdirptr,
HANDLE32 FindResource32( HINSTANCE hModule, LPCWSTR name, LPCWSTR type )
{
#ifndef WINELIB
struct w_files *wptr = wine_files;
struct pe_data *pe;
NE_MODULE *pModule;
PIMAGE_RESOURCE_DIRECTORY resdirptr;
DWORD root;
HANDLE32 result;
......@@ -103,11 +105,11 @@ HANDLE32 FindResource32( HINSTANCE hModule, LPCWSTR name, LPCWSTR type )
dprintf_resource( stddeb, " name=" );
PrintId( name );
dprintf_resource( stddeb, "\n" );
while (wptr != NULL && (wptr->hModule != hModule))
wptr = wptr->next;
if ((wptr == NULL) || (wptr->pe == NULL) || (wptr->pe->pe_resource == NULL))
return 0;
resdirptr = (PIMAGE_RESOURCE_DIRECTORY) wptr->pe->pe_resource;
if (!(pModule = (NE_MODULE *)GlobalLock( hModule ))) return 0;
if (!(pModule->flags & NE_FFLAGS_WIN32)) return 0; /* FIXME? */
if (!(pe = NE_WIN32_MODULE(pModule)) || !pe->pe_resource) return 0;
resdirptr = (PIMAGE_RESOURCE_DIRECTORY) pe->pe_resource;
root = (DWORD) resdirptr;
if ((resdirptr = GetResDirEntry(resdirptr, type, root)) == NULL)
return 0;
......@@ -129,17 +131,18 @@ HANDLE32 FindResource32( HINSTANCE hModule, LPCWSTR name, LPCWSTR type )
HANDLE32 LoadResource32( HINSTANCE hModule, HANDLE32 hRsrc )
{
#ifndef WINELIB
struct w_files *wptr = wine_files;
struct pe_data *pe;
NE_MODULE *pModule;
hModule = GetExePtr( hModule ); /* In case we were passed an hInstance */
dprintf_resource(stddeb, "LoadResource: module=%04x res=%04x\n",
hModule, hRsrc );
if (!hRsrc) return 0;
while (wptr != NULL && (wptr->hModule != hModule))
wptr = wptr->next;
if ((wptr == NULL) || (wptr->pe == NULL) || (wptr->pe->pe_resource == NULL))
return 0;
return (HANDLE32) (wptr->load_addr+((PIMAGE_RESOURCE_DATA_ENTRY)hRsrc)->OffsetToData);
if (!(pModule = (NE_MODULE *)GlobalLock( hModule ))) return 0;
if (!(pModule->flags & NE_FFLAGS_WIN32)) return 0; /* FIXME? */
if (!(pe = NE_WIN32_MODULE(pModule)) || !pe->pe_resource) return 0;
return (HANDLE32) (pe->load_addr+((PIMAGE_RESOURCE_DATA_ENTRY)hRsrc)->OffsetToData);
#else
return LIBRES_LoadResource( hModule, hRsrc );
#endif
......
......@@ -33,10 +33,9 @@ static short iMenuSysKey = 0;
*
* Set the window text.
*/
void DEFWND_SetText( HWND hwnd, LPSTR text )
void DEFWND_SetText( WND *wndPtr, LPSTR text )
{
LPSTR textPtr;
WND *wndPtr = WIN_FindWndPtr( hwnd );
if (!text) text = "";
if (wndPtr->hText) USER_HEAP_FREE( wndPtr->hText );
......@@ -66,7 +65,7 @@ LRESULT DefWindowProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
CREATESTRUCT *createStruct = (CREATESTRUCT*)PTR_SEG_TO_LIN(lParam);
if (createStruct->lpszName)
DEFWND_SetText( hwnd,
DEFWND_SetText( wndPtr,
(LPSTR)PTR_SEG_TO_LIN(createStruct->lpszName) );
return 1;
}
......@@ -249,7 +248,7 @@ LRESULT DefWindowProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
}
case WM_SETTEXT:
DEFWND_SetText( hwnd, (LPSTR)PTR_SEG_TO_LIN(lParam) );
DEFWND_SetText( wndPtr, (LPSTR)PTR_SEG_TO_LIN(lParam) );
NC_HandleNCPaint( hwnd , (HRGN)1 ); /* Repaint caption */
return 0;
......
......@@ -182,7 +182,6 @@ int MessageBox(HWND hWnd, LPCSTR text, LPCSTR title, WORD type)
HANDLE handle;
MSGBOX mbox;
int ret;
DWORD WineProc,Win16Proc,Win32Proc;
mbox.title = title;
mbox.text = text;
......
......@@ -272,7 +272,7 @@ void WIN_SendParentNotify( HWND hwnd, WORD event, WORD idChild, LONG lValue )
/* if lValue contains cursor coordinates they have to be
* mapped to the client area of parent window */
if (bMouse) MapWindowPoints(0, hwnd, lppt, 2);
if (bMouse) MapWindowPoints(0, hwnd, lppt, 1);
#ifndef WINELIB32
else lValue = MAKELONG( LOWORD(lValue), idChild );
#endif
......
......@@ -40,6 +40,9 @@ SymbolTableFile=./wine.sym
system=*-helvetica
mssansserif=*-helvetica
msserif=*-times
courier new=adobe-courier
times new roman=adobe-times
symbol=adobe-symbol
fixedsys=*-fixed
arial=*-helvetica
helv=*-helvetica
......
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