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
090e2d87
Commit
090e2d87
authored
May 22, 1999
by
Marcus Meissner
Committed by
Alexandre Julliard
May 22, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added init function for CRTDLL, allocate stdio/stderr/stdout on
DLL_PROCESS_ATTACH, increase buffer for vfprintf() (Win95 arp.exe needs 1.3KB).
parent
5a1bf8f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
crtdll.c
misc/crtdll.c
+22
-3
crtdll.spec
relay32/crtdll.spec
+1
-0
No files found.
misc/crtdll.c
View file @
090e2d87
...
@@ -99,6 +99,23 @@ static new_handler_type new_handler;
...
@@ -99,6 +99,23 @@ static new_handler_type new_handler;
#define POP_FPU(x) DO_FPU("fstpl",x)
#define POP_FPU(x) DO_FPU("fstpl",x)
#endif
#endif
CRTDLL_FILE
*
__cdecl
CRTDLL__fdopen
(
INT
handle
,
LPCSTR
mode
);
/*********************************************************************
* CRTDLL_MainInit (CRTDLL.init)
*/
BOOL
WINAPI
CRTDLL_Init
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
TRACE
(
crtdll
,
"(0x%08lx,%ld,%p)
\n
"
,
hinstDLL
,
fdwReason
,
lpvReserved
);
if
(
fdwReason
==
DLL_PROCESS_ATTACH
)
{
CRTDLL__fdopen
(
0
,
"r"
);
CRTDLL__fdopen
(
1
,
"w"
);
CRTDLL__fdopen
(
2
,
"w"
);
}
return
TRUE
;
}
/*********************************************************************
/*********************************************************************
* _GetMainArgs (CRTDLL.022)
* _GetMainArgs (CRTDLL.022)
*/
*/
...
@@ -460,8 +477,10 @@ DWORD __cdecl CRTDLL_fwrite( LPVOID ptr, INT size, INT nmemb, CRTDLL_FILE *file
...
@@ -460,8 +477,10 @@ DWORD __cdecl CRTDLL_fwrite( LPVOID ptr, INT size, INT nmemb, CRTDLL_FILE *file
{
{
DWORD
ret
;
DWORD
ret
;
TRACE
(
crtdll
,
"0x%08x items of size %d to file %p from %p
\n
"
,
TRACE
(
crtdll
,
"0x%08x items of size %d to file %p(%d) from %p
\n
"
,
nmemb
,
size
,
file
,
ptr
);
nmemb
,
size
,
file
,
file
-
(
CRTDLL_FILE
*
)
CRTDLL_iob
,
ptr
);
if
(
!
WriteFile
(
file
->
handle
,
ptr
,
size
*
nmemb
,
&
ret
,
NULL
))
if
(
!
WriteFile
(
file
->
handle
,
ptr
,
size
*
nmemb
,
&
ret
,
NULL
))
WARN
(
crtdll
,
" failed!
\n
"
);
WARN
(
crtdll
,
" failed!
\n
"
);
return
ret
/
size
;
return
ret
/
size
;
...
@@ -523,7 +542,7 @@ void __cdecl CRTDLL_srand(DWORD seed)
...
@@ -523,7 +542,7 @@ void __cdecl CRTDLL_srand(DWORD seed)
*/
*/
INT
__cdecl
CRTDLL_vfprintf
(
CRTDLL_FILE
*
file
,
LPSTR
format
,
va_list
args
)
INT
__cdecl
CRTDLL_vfprintf
(
CRTDLL_FILE
*
file
,
LPSTR
format
,
va_list
args
)
{
{
char
buffer
[
1024
];
/* FIXME... */
char
buffer
[
2048
];
/* FIXME... */
vsprintf
(
buffer
,
format
,
args
);
vsprintf
(
buffer
,
format
,
args
);
return
CRTDLL_fwrite
(
buffer
,
1
,
strlen
(
buffer
),
file
);
return
CRTDLL_fwrite
(
buffer
,
1
,
strlen
(
buffer
),
file
);
...
...
relay32/crtdll.spec
View file @
090e2d87
# C RunTime DLL. All functions use cdecl!
# C RunTime DLL. All functions use cdecl!
name crtdll
name crtdll
type win32
type win32
init CRTDLL_Init
1 cdecl ??2@YAPAXI@Z(long) CRTDLL_new
1 cdecl ??2@YAPAXI@Z(long) CRTDLL_new
2 cdecl ??3@YAXPAX@Z(long) CRTDLL_delete
2 cdecl ??3@YAXPAX@Z(long) CRTDLL_delete
...
...
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