Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cc08b38f
Commit
cc08b38f
authored
Apr 03, 1999
by
Christian Schlaile
Committed by
Alexandre Julliard
Apr 03, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented makepath, rand() returns correct range, fixed fputc.
parent
d5240f13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
2 deletions
+50
-2
crtdll.c
misc/crtdll.c
+49
-1
crtdll.spec
relay32/crtdll.spec
+1
-1
No files found.
misc/crtdll.c
View file @
cc08b38f
...
...
@@ -51,6 +51,9 @@ AJ 990101:
#include "options.h"
#include "winnls.h"
/* windows.h RAND_MAX is smaller than normal RAND_MAX */
#define CRTDLL_RAND_MAX 0x7fff
static
DOS_FULL_NAME
CRTDLL_tmpname
;
UINT
CRTDLL_argc_dll
;
/* CRTDLL.23 */
...
...
@@ -670,7 +673,7 @@ INT __cdecl CRTDLL_fflush( CRTDLL_FILE *file )
*/
INT
__cdecl
CRTDLL_rand
()
{
return
rand
();
return
(
rand
()
&
CRTDLL_RAND_MAX
);
}
...
...
@@ -734,6 +737,7 @@ INT __cdecl CRTDLL_fgetc( CRTDLL_FILE *file )
DWORD
res
;
char
ch
;
if
(
!
ReadFile
(
file
->
handle
,
&
ch
,
1
,
&
res
,
NULL
))
return
-
1
;
if
(
res
!=
1
)
return
-
1
;
return
ch
;
}
...
...
@@ -1719,6 +1723,50 @@ VOID __cdecl CRTDLL__splitpath(LPCSTR path, LPSTR drive, LPSTR directory, LPSTR
}
/*********************************************************************
* _makepath (CRTDLL.182)
*/
VOID
__cdecl
CRTDLL__makepath
(
LPSTR
path
,
LPCSTR
drive
,
LPCSTR
directory
,
LPCSTR
filename
,
LPCSTR
extension
)
{
char
ch
;
TRACE
(
crtdll
,
"CRTDLL__makepath got %s %s %s %s
\n
"
,
drive
,
directory
,
filename
,
extension
);
if
(
!
path
)
return
;
path
[
0
]
=
0
;
if
(
drive
)
if
(
drive
[
0
]
)
{
sprintf
(
path
,
"%c:"
,
drive
[
0
]);
}
if
(
directory
)
if
(
directory
[
0
]
)
{
strcat
(
path
,
directory
);
ch
=
path
[
strlen
(
path
)
-
1
];
if
(
ch
!=
'/'
&&
ch
!=
'\\'
)
strcat
(
path
,
"
\\
"
);
}
if
(
filename
)
if
(
filename
[
0
]
)
{
strcat
(
path
,
filename
);
if
(
extension
)
{
if
(
extension
[
0
]
)
{
if
(
extension
[
0
]
!=
'.'
)
{
strcat
(
path
,
"."
);
}
strcat
(
path
,
extension
);
}
}
}
TRACE
(
crtdll
,
"CRTDLL__makepath returns %s
\n
"
,
path
);
}
/*********************************************************************
* _getcwd (CRTDLL.120)
*/
...
...
relay32/crtdll.spec
View file @
cc08b38f
...
...
@@ -183,7 +183,7 @@ type win32
179 stub _lseek
180 cdecl _ltoa(long str long) CRTDLL__ltoa
181 stub _ltow
182
stub
_makepath
182
cdecl _makepath (ptr str str str str) CRTDLL_
_makepath
183 stub _matherr
184 stub _mbbtombc
185 stub _mbbtype
...
...
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