Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e296bf37
Commit
e296bf37
authored
Nov 29, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed CallTo16* functions to wine_call_to_16* and export them from
kernel32.spec.
parent
b5eefcd1
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
78 additions
and
53 deletions
+78
-53
kernel32.spec
dlls/kernel/kernel32.spec
+4
-0
thunk.c
dlls/kernel/thunk.c
+4
-4
wowthunk.c
dlls/kernel/wowthunk.c
+2
-2
mouse.c
dlls/user/mouse.c
+1
-1
relay.c
if1632/relay.c
+28
-8
builtin16.h
include/builtin16.h
+0
-5
winbase16.h
include/wine/winbase16.h
+6
-0
module.c
loader/ne/module.c
+1
-1
segment.c
loader/ne/segment.c
+2
-2
system.c
misc/system.c
+1
-1
dpmi.c
msdos/dpmi.c
+2
-2
thread.c
scheduler/thread.c
+1
-1
relay.c
tools/winebuild/relay.c
+19
-19
spec16.c
tools/winebuild/spec16.c
+5
-5
keyboard.c
windows/keyboard.c
+1
-1
winproc.c
windows/winproc.c
+1
-1
No files found.
dlls/kernel/kernel32.spec
View file @
e296bf37
...
...
@@ -950,3 +950,7 @@ debug_channels (comm debugstr dll int resource stress thunk toolhelp win32)
@ varargs __wine_call_from_16_long() __wine_call_from_16_long
@ varargs __wine_call_from_16_regs() __wine_call_from_16_regs
@ varargs __wine_call_from_16_thunk() __wine_call_from_16_thunk
@ stdcall wine_call_to_16_word(ptr long) wine_call_to_16_word
@ stdcall wine_call_to_16_long(ptr long) wine_call_to_16_long
@ stdcall wine_call_to_16_regs_short(ptr long) wine_call_to_16_regs_short
@ stdcall wine_call_to_16_regs_long (ptr long) wine_call_to_16_regs_long
dlls/kernel/thunk.c
View file @
e296bf37
...
...
@@ -303,7 +303,7 @@ void WINAPI QT_Thunk( CONTEXT86 *context )
memcpy
(
(
LPBYTE
)
CURRENT_STACK16
-
argsize
,
(
LPBYTE
)
context
->
Esp
,
argsize
);
CallTo16RegisterS
hort
(
&
context16
,
argsize
);
wine_call_to_16_regs_s
hort
(
&
context16
,
argsize
);
context
->
Eax
=
context16
.
Eax
;
context
->
Edx
=
context16
.
Edx
;
context
->
Ecx
=
context16
.
Ecx
;
...
...
@@ -430,7 +430,7 @@ void WINAPI FT_Thunk( CONTEXT86 *context )
+
(
*
(
LPBYTE
*
)
arg
-
oldstack
));
}
CallTo16RegisterS
hort
(
&
context16
,
argsize
);
wine_call_to_16_regs_s
hort
(
&
context16
,
argsize
);
context
->
Eax
=
context16
.
Eax
;
context
->
Edx
=
context16
.
Edx
;
context
->
Ecx
=
context16
.
Ecx
;
...
...
@@ -637,7 +637,7 @@ void WINAPI Common32ThkLS( CONTEXT86 *context )
memcpy
(
(
LPBYTE
)
CURRENT_STACK16
-
argsize
,
(
LPBYTE
)
context
->
Esp
,
argsize
);
CallTo16RegisterL
ong
(
&
context16
,
argsize
+
32
);
wine_call_to_16_regs_l
ong
(
&
context16
,
argsize
+
32
);
context
->
Eax
=
context16
.
Eax
;
/* Clean up caller's stack frame */
...
...
@@ -688,7 +688,7 @@ void WINAPI OT_32ThkLSF( CONTEXT86 *context )
memcpy
(
(
LPBYTE
)
CURRENT_STACK16
-
argsize
,
(
LPBYTE
)
context
->
Esp
,
argsize
);
CallTo16RegisterS
hort
(
&
context16
,
argsize
);
wine_call_to_16_regs_s
hort
(
&
context16
,
argsize
);
context
->
Eax
=
context16
.
Eax
;
context
->
Edx
=
context16
.
Edx
;
...
...
dlls/kernel/wowthunk.c
View file @
e296bf37
...
...
@@ -266,12 +266,12 @@ BOOL WINAPI K32WOWCallback16Ex( DWORD vpfn16, DWORD dwFlags,
/*
* Actually, we should take care whether the called routine cleans up
* its stack or not. Fortunately, our
CallTo
16 core doesn't rely on
* its stack or not. Fortunately, our
wine_call_to_
16 core doesn't rely on
* the callee to do so; after the routine has returned, the 16-bit
* stack pointer is always reset to the position it had before.
*/
ret
=
CallTo16L
ong
(
(
FARPROC16
)
vpfn16
,
cbArgs
);
ret
=
wine_call_to_16_l
ong
(
(
FARPROC16
)
vpfn16
,
cbArgs
);
if
(
pdwRetCode
)
*
pdwRetCode
=
ret
;
...
...
dlls/user/mouse.c
View file @
e296bf37
...
...
@@ -82,7 +82,7 @@ static VOID WINAPI MOUSE_CallMouseEventProc( FARPROC16 proc,
context
.
Esi
=
LOWORD
(
dwExtraInfo
);
context
.
Edi
=
HIWORD
(
dwExtraInfo
);
CallTo16RegisterS
hort
(
&
context
,
0
);
wine_call_to_16_regs_s
hort
(
&
context
,
0
);
}
VOID
WINAPI
WIN16_MOUSE_Enable
(
FARPROC16
proc
)
...
...
if1632/relay.c
View file @
e296bf37
...
...
@@ -63,17 +63,37 @@ BOOL RELAY_Init(void)
* (these will never be called but need to be present to satisfy the linker ...)
*/
#ifndef __i386__
WORD
CALLBACK
CallTo16Word
(
FARPROC16
target
,
INT
nArgs
)
{
assert
(
FALSE
);
}
/***********************************************************************
* wine_call_to_16_word
*/
WORD
WINAPI
wine_call_to_16_word
(
FARPROC16
target
,
INT
nArgs
)
{
assert
(
FALSE
);
}
LONG
CALLBACK
CallTo16Long
(
FARPROC16
target
,
INT
nArgs
)
{
assert
(
FALSE
);
}
/***********************************************************************
* wine_call_to_16_long
*/
LONG
WINAPI
wine_call_to_16_long
(
FARPROC16
target
,
INT
nArgs
)
{
assert
(
FALSE
);
}
void
CALLBACK
CallTo16RegisterShort
(
CONTEXT86
*
context
,
INT
nArgs
)
{
assert
(
FALSE
);
}
/***********************************************************************
* wine_call_to_16_regs_short
*/
void
WINAPI
wine_call_to_16_regs_short
(
CONTEXT86
*
context
,
INT
nArgs
)
{
assert
(
FALSE
);
}
void
CALLBACK
CallTo16RegisterLong
(
CONTEXT86
*
context
,
INT
nArgs
)
{
assert
(
FALSE
);
}
/***********************************************************************
* wine_call_to_16_regs_long
*/
void
WINAPI
wine_call_to_16_regs_long
(
CONTEXT86
*
context
,
INT
nArgs
)
{
assert
(
FALSE
);
}
/***********************************************************************
* __wine_call_from_16_word
...
...
include/builtin16.h
View file @
e296bf37
...
...
@@ -13,11 +13,6 @@
struct
_CONTEXT86
;
struct
_STACK16FRAME
;
extern
WORD
CALLBACK
CallTo16Word
(
FARPROC16
target
,
INT
nArgs
);
extern
LONG
CALLBACK
CallTo16Long
(
FARPROC16
target
,
INT
nArgs
);
extern
void
CALLBACK
CallTo16RegisterShort
(
struct
_CONTEXT86
*
context
,
INT
nArgs
);
extern
void
CALLBACK
CallTo16RegisterLong
(
struct
_CONTEXT86
*
context
,
INT
nArgs
);
#include "pshpack1.h"
typedef
struct
...
...
include/wine/winbase16.h
View file @
e296bf37
...
...
@@ -255,4 +255,10 @@ SEGPTR WINAPI WIN16_LockResource16(HGLOBAL16);
LONG
WINAPI
WIN16_hread
(
HFILE16
,
SEGPTR
,
LONG
);
UINT16
WINAPI
WIN16_lread
(
HFILE16
,
SEGPTR
,
UINT16
);
/* Wine-specific functions */
WORD
WINAPI
wine_call_to_16_word
(
FARPROC16
target
,
INT
nArgs
);
LONG
WINAPI
wine_call_to_16_long
(
FARPROC16
target
,
INT
nArgs
);
void
WINAPI
wine_call_to_16_regs_short
(
CONTEXT86
*
context
,
INT
nArgs
);
void
WINAPI
wine_call_to_16_regs_long
(
CONTEXT86
*
context
,
INT
nArgs
);
#endif
/* __WINE_WINE_WINBASE16_H */
loader/ne/module.c
View file @
e296bf37
...
...
@@ -1192,7 +1192,7 @@ static void NE_InitProcess(void)
SELECTOROF
(
pTask
->
teb
->
cur_stack
),
OFFSETOF
(
pTask
->
teb
->
cur_stack
)
);
CallTo16RegisterS
hort
(
&
context
,
0
);
wine_call_to_16_regs_s
hort
(
&
context
,
0
);
ExitThread
(
LOWORD
(
context
.
Eax
)
);
}
...
...
loader/ne/segment.c
View file @
e296bf37
...
...
@@ -627,7 +627,7 @@ static BOOL NE_InitDLL( TDB* pTask, NE_MODULE *pModule )
TRACE_
(
dll
)(
"Calling LibMain, cs:ip=%04lx:%04lx ds=%04lx di=%04x cx=%04x
\n
"
,
context
.
SegCs
,
context
.
Eip
,
context
.
SegDs
,
LOWORD
(
context
.
Edi
),
LOWORD
(
context
.
Ecx
)
);
CallTo16RegisterS
hort
(
&
context
,
0
);
wine_call_to_16_regs_s
hort
(
&
context
,
0
);
return
TRUE
;
}
...
...
@@ -712,7 +712,7 @@ static void NE_CallDllEntryPoint( NE_MODULE *pModule, DWORD dwReason )
*
(
DWORD
*
)(
stack
-
14
)
=
0
;
/* dwReserved1 */
*
(
WORD
*
)
(
stack
-
16
)
=
0
;
/* wReserved2 */
CallTo16RegisterS
hort
(
&
context
,
16
);
wine_call_to_16_regs_s
hort
(
&
context
,
16
);
}
}
...
...
misc/system.c
View file @
e296bf37
...
...
@@ -136,7 +136,7 @@ static void SYSTEM_CallSystemTimerProc( FARPROC16 proc, WORD timer )
AX_reg
(
&
context
)
=
timer
;
CallTo16RegisterS
hort
(
&
context
,
0
);
wine_call_to_16_regs_s
hort
(
&
context
,
0
);
}
WORD
WINAPI
WIN16_CreateSystemTimer
(
WORD
rate
,
FARPROC16
proc
)
...
...
msdos/dpmi.c
View file @
e296bf37
...
...
@@ -287,7 +287,7 @@ static void DPMI_CallRMCBProc( CONTEXT86 *context, RMCB *rmcb, WORD flag )
ctx
.
SegEs
=
rmcb
->
regs_sel
;
ctx
.
Edi
=
rmcb
->
regs_ofs
;
/* FIXME: I'm pretty sure this isn't right - should push flags first */
CallTo16RegisterS
hort
(
&
ctx
,
0
);
wine_call_to_16_regs_s
hort
(
&
ctx
,
0
);
es
=
ctx
.
SegEs
;
edi
=
ctx
.
Edi
;
}
...
...
@@ -615,7 +615,7 @@ static void StartPM( CONTEXT86 *context, LPDOSTASK lpDosTask )
pm_ctx
.
SegGs
=
0
;
TRACE
(
"DOS program is now entering protected mode
\n
"
);
CallTo16RegisterS
hort
(
&
pm_ctx
,
0
);
wine_call_to_16_regs_s
hort
(
&
pm_ctx
,
0
);
/* in the current state of affairs, we won't ever actually return here... */
/* we should have int21/ah=4c do it someday, though... */
...
...
scheduler/thread.c
View file @
e296bf37
...
...
@@ -329,7 +329,7 @@ static DWORD CALLBACK THREAD_StartThread16( LPVOID threadArgs )
HeapFree
(
GetProcessHeap
(),
0
,
threadArgs
);
((
LPDWORD
)
CURRENT_STACK16
)[
-
1
]
=
param
;
return
CallTo16L
ong
(
start
,
sizeof
(
DWORD
)
);
return
wine_call_to_16_l
ong
(
start
,
sizeof
(
DWORD
)
);
}
HANDLE
WINAPI
CreateThread16
(
SECURITY_ATTRIBUTES
*
sa
,
DWORD
stack
,
FARPROC16
start
,
SEGPTR
param
,
...
...
tools/winebuild/relay.c
View file @
e296bf37
...
...
@@ -417,10 +417,10 @@ static void BuildCallFrom16Core( FILE *outfile, int reg_func, int thunk, int sho
*
* This routine builds the core routines used in 32->16 thunks:
*
* extern void
CALLBACK CallTo16W
ord( SEGPTR target, int nb_args );
* extern void
CALLBACK CallTo16L
ong( SEGPTR target, int nb_args );
* extern void
CALLBACK CallTo16RegisterS
hort( const CONTEXT86 *context, int nb_args );
* extern void
CALLBACK CallTo16RegisterL
ong ( const CONTEXT86 *context, int nb_args );
* extern void
WINAPI wine_call_to_16_w
ord( SEGPTR target, int nb_args );
* extern void
WINAPI wine_call_to_16_l
ong( SEGPTR target, int nb_args );
* extern void
WINAPI wine_call_to_16_regs_s
hort( const CONTEXT86 *context, int nb_args );
* extern void
WINAPI wine_call_to_16_regs_l
ong ( const CONTEXT86 *context, int nb_args );
*
* These routines can be called directly from 32-bit code.
*
...
...
@@ -442,19 +442,19 @@ static void BuildCallFrom16Core( FILE *outfile, int reg_func, int thunk, int sho
static
void
BuildCallTo16Core
(
FILE
*
outfile
,
int
short_ret
,
int
reg_func
)
{
char
*
name
=
reg_func
==
2
?
"
RegisterLong"
:
reg_func
==
1
?
"
RegisterS
hort"
:
short_ret
?
"
Word"
:
"L
ong"
;
char
*
name
=
reg_func
==
2
?
"
regs_long"
:
reg_func
==
1
?
"
regs_s
hort"
:
short_ret
?
"
word"
:
"l
ong"
;
/* Function header */
fprintf
(
outfile
,
"
\n\t
.align 4
\n
"
);
#ifdef USE_STABS
fprintf
(
outfile
,
".stabs
\"
CallTo16%s:F1
\"
,36,0,0,"
PREFIX
"CallTo16
%s
\n
"
,
fprintf
(
outfile
,
".stabs
\"
wine_call_to_16_%s:F1
\"
,36,0,0,"
PREFIX
"wine_call_to_16_
%s
\n
"
,
name
,
name
);
#endif
fprintf
(
outfile
,
"
\t
.type "
PREFIX
"
CallTo16
%s,@function
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
.globl "
PREFIX
"
CallTo16
%s
\n
"
,
name
);
fprintf
(
outfile
,
PREFIX
"
CallTo16
%s:
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
.type "
PREFIX
"
wine_call_to_16_
%s,@function
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
.globl "
PREFIX
"
wine_call_to_16_
%s
\n
"
,
name
);
fprintf
(
outfile
,
PREFIX
"
wine_call_to_16_
%s:
\n
"
,
name
);
/* Function entry sequence */
fprintf
(
outfile
,
"
\t
pushl %%ebp
\n
"
);
...
...
@@ -470,10 +470,10 @@ static void BuildCallTo16Core( FILE *outfile, int short_ret, int reg_func )
if
(
UsePIC
)
{
/* Get Global Offset Table into %ebx */
fprintf
(
outfile
,
"
\t
call .L
CallTo16
%s.getgot1
\n
"
,
name
);
fprintf
(
outfile
,
".L
CallTo16
%s.getgot1:
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
call .L
wine_call_to_16_
%s.getgot1
\n
"
,
name
);
fprintf
(
outfile
,
".L
wine_call_to_16_
%s.getgot1:
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
popl %%ebx
\n
"
);
fprintf
(
outfile
,
"
\t
addl $_GLOBAL_OFFSET_TABLE_+[.-.L
CallTo16
%s.getgot1], %%ebx
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
addl $_GLOBAL_OFFSET_TABLE_+[.-.L
wine_call_to_16_
%s.getgot1], %%ebx
\n
"
,
name
);
}
/* Enter Win16 Mutex */
...
...
@@ -509,7 +509,7 @@ static void BuildCallTo16Core( FILE *outfile, int short_ret, int reg_func )
/* Call the actual CallTo16 routine (simulate a lcall) */
fprintf
(
outfile
,
"
\t
pushl %%cs
\n
"
);
fprintf
(
outfile
,
"
\t
call .L
CallTo16
%s
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
call .L
wine_call_to_16_
%s
\n
"
,
name
);
if
(
!
reg_func
)
{
...
...
@@ -553,10 +553,10 @@ static void BuildCallTo16Core( FILE *outfile, int short_ret, int reg_func )
if
(
UsePIC
)
{
/* Get Global Offset Table into %ebx (might have been overwritten) */
fprintf
(
outfile
,
"
\t
call .L
CallTo16
%s.getgot2
\n
"
,
name
);
fprintf
(
outfile
,
".L
CallTo16
%s.getgot2:
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
call .L
wine_call_to_16_
%s.getgot2
\n
"
,
name
);
fprintf
(
outfile
,
".L
wine_call_to_16_
%s.getgot2:
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
popl %%ebx
\n
"
);
fprintf
(
outfile
,
"
\t
addl $_GLOBAL_OFFSET_TABLE_+[.-.L
CallTo16
%s.getgot2], %%ebx
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
addl $_GLOBAL_OFFSET_TABLE_+[.-.L
wine_call_to_16_
%s.getgot2], %%ebx
\n
"
,
name
);
}
/* Print debugging info */
...
...
@@ -595,7 +595,7 @@ static void BuildCallTo16Core( FILE *outfile, int short_ret, int reg_func )
/* Start of the actual CallTo16 routine */
fprintf
(
outfile
,
".L
CallTo16
%s:
\n
"
,
name
);
fprintf
(
outfile
,
".L
wine_call_to_16_
%s:
\n
"
,
name
);
/* Complete STACK32FRAME */
fprintf
(
outfile
,
"
\t
.byte 0x64
\n\t
pushl (%d)
\n
"
,
STACKOFFSET
);
...
...
tools/winebuild/spec16.c
View file @
e296bf37
...
...
@@ -413,7 +413,7 @@ static void BuildCallFrom16Func( FILE *outfile, char *profile, char *prefix, int
*
* These routines are provided solely for convenience; they simply
* write the arguments onto the 16-bit stack, and call the appropriate
*
CallTo
16... core routine.
*
wine_call_to_
16... core routine.
*
* If you have more sophisticated argument conversion requirements than
* are provided by these routines, you might as well call the core
...
...
@@ -463,8 +463,8 @@ static void BuildCallTo16Func( FILE *outfile, char *profile, char *prefix )
fprintf
(
outfile
,
" *)args = arg%d;
\n
"
,
i
+
1
);
}
fprintf
(
outfile
,
" return
CallTo16
%s( proc, %d );
\n
}
\n\n
"
,
short_ret
?
"
Word"
:
"L
ong"
,
argsize
);
fprintf
(
outfile
,
" return
wine_call_to_16_
%s( proc, %d );
\n
}
\n\n
"
,
short_ret
?
"
word"
:
"l
ong"
,
argsize
);
}
...
...
@@ -802,8 +802,8 @@ void BuildGlue( FILE *outfile, FILE *infile )
fprintf
(
outfile
,
"#include
\"
builtin16.h
\"\n
"
);
fprintf
(
outfile
,
"#include
\"
stackframe.h
\"\n\n
"
);
fprintf
(
outfile
,
"extern WORD
CALLBACK CallTo16W
ord( FARPROC16 target, INT nArgs );
\n
"
);
fprintf
(
outfile
,
"extern LONG
CALLBACK CallTo16L
ong( FARPROC16 target, INT nArgs );
\n
"
);
fprintf
(
outfile
,
"extern WORD
WINAPI wine_call_to_16_w
ord( FARPROC16 target, INT nArgs );
\n
"
);
fprintf
(
outfile
,
"extern LONG
WINAPI wine_call_to_16_l
ong( FARPROC16 target, INT nArgs );
\n
"
);
/* Build the callback glue functions */
...
...
windows/keyboard.c
View file @
e296bf37
...
...
@@ -83,7 +83,7 @@ static VOID WINAPI KEYBOARD_CallKeybdEventProc( FARPROC16 proc,
context
.
Esi
=
LOWORD
(
dwExtraInfo
);
context
.
Edi
=
HIWORD
(
dwExtraInfo
);
CallTo16RegisterS
hort
(
&
context
,
0
);
wine_call_to_16_regs_s
hort
(
&
context
,
0
);
}
VOID
WINAPI
WIN16_KEYBOARD_Enable
(
FARPROC16
proc
,
LPBYTE
lpKeyState
)
...
...
windows/winproc.c
View file @
e296bf37
...
...
@@ -238,7 +238,7 @@ static LRESULT WINAPI WINPROC_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
args
[
3
]
=
msg
;
args
[
4
]
=
hwnd
;
CallTo16RegisterS
hort
(
&
context
,
5
*
sizeof
(
WORD
)
);
wine_call_to_16_regs_s
hort
(
&
context
,
5
*
sizeof
(
WORD
)
);
ret
=
MAKELONG
(
LOWORD
(
context
.
Eax
),
LOWORD
(
context
.
Edx
)
);
if
(
offset
)
stack16_pop
(
offset
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment