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
a91a28cf
Commit
a91a28cf
authored
Jan 12, 2001
by
Jon Griffiths
Committed by
Alexandre Julliard
Jan 12, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes as a result of testing builtin crtdll against builtin msvcrt.
parent
e4055508
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
27 deletions
+25
-27
locale.c
dlls/msvcrt/locale.c
+1
-1
math.c
dlls/msvcrt/math.c
+2
-3
mbcs.c
dlls/msvcrt/mbcs.c
+22
-23
No files found.
dlls/msvcrt/locale.c
View file @
a91a28cf
...
...
@@ -15,7 +15,7 @@ DEFAULT_DEBUG_CHANNEL(msvcrt);
#define MAX_LOCALE_LENGTH 256
char
MSVCRT_current_lc_all
[
MAX_LOCALE_LENGTH
];
LCID
MSVCRT_current_lc_all_lcid
;
unsigned
int
MSVCRT_current_lc_all_cp
;
int
MSVCRT_current_lc_all_cp
;
/* MT */
extern
CRITICAL_SECTION
MSVCRT_locale_cs
;
...
...
dlls/msvcrt/math.c
View file @
a91a28cf
...
...
@@ -110,7 +110,7 @@ static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL;
double
__cdecl
MSVCRT__CIacos
(
void
)
{
FPU_DOUBLE
(
x
);
if
(
!
finite
(
x
))
SET_THREAD_VAR
(
errno
,
MSVCRT_EDOM
);
if
(
x
<
-
1
.
0
||
x
>
1
.
0
||
!
finite
(
x
))
SET_THREAD_VAR
(
errno
,
MSVCRT_EDOM
);
return
acos
(
x
);
}
...
...
@@ -121,7 +121,6 @@ double __cdecl MSVCRT__CIasin(void)
{
FPU_DOUBLE
(
x
);
if
(
x
<
-
1
.
0
||
x
>
1
.
0
||
!
finite
(
x
))
SET_THREAD_VAR
(
errno
,
MSVCRT_EDOM
);
return
asin
(
x
);
}
...
...
@@ -466,7 +465,7 @@ double __cdecl MSVCRT_ldexp(double num, long exp)
*/
double
__cdecl
MSVCRT__cabs
(
MSVCRT_complex
num
)
{
return
sqrt
(
num
.
real
*
num
.
imaginary
+
num
.
real
*
num
.
imaginary
);
return
sqrt
(
num
.
real
*
num
.
real
+
num
.
imaginary
*
num
.
imaginary
);
}
/*********************************************************************
...
...
dlls/msvcrt/mbcs.c
View file @
a91a28cf
...
...
@@ -40,7 +40,7 @@ int *__cdecl MSVCRT___p___mb_cur_max(void)
/*********************************************************************
* _mbsnextc(MSVCRT.@)
*/
unsigned
int
__cdecl
MSVCRT__mbsnextc
(
const
char
*
str
)
unsigned
int
__cdecl
MSVCRT__mbsnextc
(
const
unsigned
char
*
str
)
{
if
(
MSVCRT___mb_cur_max
>
1
&&
MSVCRT_isleadbyte
(
*
str
))
return
*
str
<<
8
|
str
[
1
];
...
...
@@ -127,13 +127,12 @@ int __cdecl MSVCRT__mbsnicmp(const char *str, const char *cmp, unsigned int len)
/*********************************************************************
* _mbsinc(MSVCRT.@)
*/
char
*
__cdecl
MSVCRT__mbsinc
(
const
char
*
str
)
char
*
__cdecl
MSVCRT__mbsinc
(
const
unsigned
char
*
str
)
{
if
(
MSVCRT___mb_cur_max
>
1
&&
MSVCRT_isleadbyte
(
*
str
))
return
(
char
*
)
str
+
2
;
/* MB char */
if
(
MSVCRT___mb_cur_max
>
1
&&
MSVCRT_isleadbyte
(
*
str
))
return
(
char
*
)
str
+
2
;
/* MB char */
return
(
char
*
)
str
+
1
;
/* ASCII CP or SB char */
return
(
char
*
)
str
+
1
;
/* ASCII CP or SB char */
}
/*********************************************************************
...
...
@@ -147,15 +146,15 @@ char *MSVCRT__mbsninc(const char *str, unsigned int num)
{
while
(
num
--
)
str
=
MSVCRT__mbsinc
(
str
);
return
(
char
*
)
str
;
return
(
char
*
)
str
;
}
return
(
char
*
)
str
+
num
;
/* ASCII CP */
return
(
char
*
)
str
+
num
;
/* ASCII CP */
}
/*********************************************************************
* _mbslen(MSVCRT.206)
*/
int
__cdecl
MSVCRT__mbslen
(
const
char
*
str
)
int
__cdecl
MSVCRT__mbslen
(
const
unsigned
char
*
str
)
{
if
(
MSVCRT___mb_cur_max
>
1
)
{
...
...
@@ -182,7 +181,7 @@ char *__cdecl MSVCRT__mbsrchr(const char *s,unsigned int x)
/*********************************************************************
* mbtowc(MSVCRT.@)
*/
int
__cdecl
MSVCRT_mbtowc
(
WCHAR
*
dst
,
const
char
*
str
,
unsigned
int
n
)
int
__cdecl
MSVCRT_mbtowc
(
WCHAR
*
dst
,
const
unsigned
char
*
str
,
unsigned
int
n
)
{
if
(
n
<=
0
||
!
str
)
return
0
;
...
...
@@ -199,7 +198,7 @@ int __cdecl MSVCRT_mbtowc(WCHAR *dst, const char *str, unsigned int n)
/*********************************************************************
* _mbccpy(MSVCRT.@)
*/
void
__cdecl
MSVCRT__mbccpy
(
char
*
dest
,
char
*
src
)
void
__cdecl
MSVCRT__mbccpy
(
char
*
dest
,
c
onst
unsigned
c
har
*
src
)
{
*
dest
++
=
*
src
;
if
(
MSVCRT___mb_cur_max
>
1
&&
MSVCRT_isleadbyte
(
*
src
))
...
...
@@ -224,7 +223,7 @@ unsigned int __cdecl MSVCRT__mbbtombc(unsigned int c)
/*********************************************************************
* _mbclen(MSVCRT.@)
*/
unsigned
int
__cdecl
MSVCRT__mbclen
(
const
char
*
str
)
unsigned
int
__cdecl
MSVCRT__mbclen
(
const
unsigned
char
*
str
)
{
return
MSVCRT_isleadbyte
(
*
str
)
?
2
:
1
;
}
...
...
@@ -238,7 +237,7 @@ int __cdecl MSVCRT__ismbbkana(unsigned int c)
if
(
MSVCRT_current_lc_all_cp
==
932
)
{
/* Japanese/Katakana, CP 932 */
return
(
c
>=
0xa1
&&
c
<=
0xdf
);
return
(
c
>=
0xa1
&&
c
<=
0xdf
);
}
return
0
;
}
...
...
@@ -252,7 +251,7 @@ int __cdecl MSVCRT__ismbchira(unsigned int c)
if
(
MSVCRT_current_lc_all_cp
==
932
)
{
/* Japanese/Hiragana, CP 932 */
return
(
c
>=
0x829f
&&
c
<=
0x82f1
);
return
(
c
>=
0x829f
&&
c
<=
0x82f1
);
}
return
0
;
}
...
...
@@ -268,7 +267,7 @@ int __cdecl MSVCRT__ismbckata(unsigned int c)
if
(
c
<
256
)
return
MSVCRT__ismbbkana
(
c
);
/* Japanese/Katakana, CP 932 */
return
(
c
>=
0x8340
&&
c
<=
0x8396
&&
c
!=
0x837f
);
return
(
c
>=
0x8340
&&
c
<=
0x8396
&&
c
!=
0x837f
);
}
return
0
;
}
...
...
@@ -295,7 +294,7 @@ int __cdecl MSVCRT__ismbbtrail(unsigned int c)
/*********************************************************************
* _ismbslead(MSVCRT.@)
*/
int
__cdecl
MSVCRT__ismbslead
(
const
char
*
start
,
const
char
*
str
)
int
__cdecl
MSVCRT__ismbslead
(
const
unsigned
char
*
start
,
const
unsigned
char
*
str
)
{
/* Lead bytes can also be trail bytes if caller messed up
* iterating through the string...
...
...
@@ -314,7 +313,7 @@ int __cdecl MSVCRT__ismbslead(const char *start, const char *str)
/*********************************************************************
* _ismbstrail(MSVCRT.@)
*/
int
__cdecl
MSVCRT__ismbstrail
(
const
char
*
start
,
const
char
*
str
)
int
__cdecl
MSVCRT__ismbstrail
(
const
char
*
start
,
const
unsigned
char
*
str
)
{
/* Must not be a lead, and must be preceeded by one */
return
!
MSVCRT__ismbslead
(
start
,
str
)
&&
MSVCRT_isleadbyte
(
str
[
-
1
]);
...
...
@@ -326,9 +325,9 @@ int __cdecl MSVCRT__ismbstrail(const char *start, const char *str)
char
*
__cdecl
MSVCRT__mbsdec
(
const
char
*
start
,
const
char
*
cur
)
{
if
(
MSVCRT___mb_cur_max
>
1
)
return
(
char
*
)(
MSVCRT__ismbstrail
(
start
,
cur
-
1
)
?
cur
-
2
:
cur
-
1
);
return
(
char
*
)(
MSVCRT__ismbstrail
(
start
,
cur
-
1
)
?
cur
-
2
:
cur
-
1
);
return
(
char
*
)
cur
-
1
;
/* ASCII CP or SB char */
return
(
char
*
)
cur
-
1
;
/* ASCII CP or SB char */
}
/*********************************************************************
...
...
@@ -383,7 +382,7 @@ char *__cdecl MSVCRT__mbsnset(char *str, unsigned int c, unsigned int len)
/*********************************************************************
* _mbstrlen(MSVCRT.@)
*/
int
__cdecl
MSVCRT__mbstrlen
(
const
char
*
str
)
int
__cdecl
MSVCRT__mbstrlen
(
const
unsigned
char
*
str
)
{
if
(
MSVCRT___mb_cur_max
>
1
)
{
...
...
@@ -437,7 +436,7 @@ char *__cdecl MSVCRT__mbschr(const char *str, unsigned int c)
while
((
next
=
MSVCRT__mbsnextc
(
str
)))
{
if
(
next
==
c
)
return
(
char
*
)
str
;
return
(
char
*
)
str
;
str
+=
next
>
255
?
2
:
1
;
}
return
c
?
NULL
:
(
char
*
)
str
;
...
...
@@ -448,7 +447,7 @@ char *__cdecl MSVCRT__mbschr(const char *str, unsigned int c)
/*********************************************************************
* _mbsnccnt(MSVCRT.@)
*/
unsigned
int
__cdecl
MSVCRT__mbsnccnt
(
const
char
*
str
,
unsigned
int
len
)
unsigned
int
__cdecl
MSVCRT__mbsnccnt
(
const
unsigned
char
*
str
,
unsigned
int
len
)
{
int
ret
=
0
;
...
...
@@ -473,7 +472,7 @@ unsigned int __cdecl MSVCRT__mbsnccnt(const char *str, unsigned int len)
/*********************************************************************
* _mbsncat(MSVCRT.@)
*/
char
*
__cdecl
MSVCRT__mbsncat
(
char
*
dst
,
const
char
*
src
,
unsigned
int
len
)
char
*
__cdecl
MSVCRT__mbsncat
(
char
*
dst
,
const
unsigned
char
*
src
,
unsigned
int
len
)
{
if
(
MSVCRT___mb_cur_max
>
1
)
{
...
...
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