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
f48648ae
Commit
f48648ae
authored
Nov 18, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use the msvcrt atoi() function internally.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b7fe06d0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
29 deletions
+30
-29
locale.c
dlls/msvcrt/locale.c
+26
-26
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-0
string.c
dlls/msvcrt/string.c
+1
-1
undname.c
dlls/msvcrt/undname.c
+2
-2
No files found.
dlls/msvcrt/locale.c
View file @
f48648ae
...
@@ -357,7 +357,7 @@ LCID MSVCRT_locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *s
...
@@ -357,7 +357,7 @@ LCID MSVCRT_locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *s
locale_cp
=
CP_UTF8
;
locale_cp
=
CP_UTF8
;
#endif
#endif
}
else
{
}
else
{
locale_cp
=
atoi
(
cp
+
1
);
locale_cp
=
MSVCRT_
atoi
(
cp
+
1
);
}
}
if
(
!
IsValidCodePage
(
locale_cp
))
if
(
!
IsValidCodePage
(
locale_cp
))
return
-
1
;
return
-
1
;
...
@@ -1118,7 +1118,7 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category,
...
@@ -1118,7 +1118,7 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category,
LCID
lcid
[
6
]
=
{
0
};
LCID
lcid
[
6
]
=
{
0
};
unsigned
short
cp
[
6
]
=
{
0
};
unsigned
short
cp
[
6
]
=
{
0
};
const
char
*
locale_name
[
6
]
=
{
0
};
const
char
*
locale_name
[
6
]
=
{
0
};
int
locale_len
[
6
]
=
{
0
};
int
val
,
locale_len
[
6
]
=
{
0
};
char
buf
[
256
];
char
buf
[
256
];
BOOL
sname
;
BOOL
sname
;
#if _MSVCR_VER >= 100
#if _MSVCR_VER >= 100
...
@@ -1437,65 +1437,65 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category,
...
@@ -1437,65 +1437,65 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category,
return
NULL
;
return
NULL
;
}
}
if
(
GetLocaleInfo
A
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_IINTLCURRDIGITS
if
(
GetLocaleInfo
W
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_IINTLCURRDIGITS
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
))
|
LOCALE_NOUSEROVERRIDE
|
LOCALE_RETURN_NUMBER
,
(
WCHAR
*
)
&
val
,
2
))
locinfo
->
lconv
->
int_frac_digits
=
atoi
(
buf
)
;
locinfo
->
lconv
->
int_frac_digits
=
val
;
else
{
else
{
free_locinfo
(
locinfo
);
free_locinfo
(
locinfo
);
return
NULL
;
return
NULL
;
}
}
if
(
GetLocaleInfo
A
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_ICURRDIGITS
if
(
GetLocaleInfo
W
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_ICURRDIGITS
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
))
|
LOCALE_NOUSEROVERRIDE
|
LOCALE_RETURN_NUMBER
,
(
WCHAR
*
)
&
val
,
2
))
locinfo
->
lconv
->
frac_digits
=
atoi
(
buf
)
;
locinfo
->
lconv
->
frac_digits
=
val
;
else
{
else
{
free_locinfo
(
locinfo
);
free_locinfo
(
locinfo
);
return
NULL
;
return
NULL
;
}
}
if
(
GetLocaleInfo
A
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_IPOSSYMPRECEDES
if
(
GetLocaleInfo
W
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_IPOSSYMPRECEDES
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
))
|
LOCALE_NOUSEROVERRIDE
|
LOCALE_RETURN_NUMBER
,
(
WCHAR
*
)
&
val
,
2
))
locinfo
->
lconv
->
p_cs_precedes
=
atoi
(
buf
)
;
locinfo
->
lconv
->
p_cs_precedes
=
val
;
else
{
else
{
free_locinfo
(
locinfo
);
free_locinfo
(
locinfo
);
return
NULL
;
return
NULL
;
}
}
if
(
GetLocaleInfo
A
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_IPOSSEPBYSPACE
if
(
GetLocaleInfo
W
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_IPOSSEPBYSPACE
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
))
|
LOCALE_NOUSEROVERRIDE
|
LOCALE_RETURN_NUMBER
,
(
WCHAR
*
)
&
val
,
2
))
locinfo
->
lconv
->
p_sep_by_space
=
atoi
(
buf
)
;
locinfo
->
lconv
->
p_sep_by_space
=
val
;
else
{
else
{
free_locinfo
(
locinfo
);
free_locinfo
(
locinfo
);
return
NULL
;
return
NULL
;
}
}
if
(
GetLocaleInfo
A
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_INEGSYMPRECEDES
if
(
GetLocaleInfo
W
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_INEGSYMPRECEDES
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
))
|
LOCALE_NOUSEROVERRIDE
|
LOCALE_RETURN_NUMBER
,
(
WCHAR
*
)
&
val
,
2
))
locinfo
->
lconv
->
n_cs_precedes
=
atoi
(
buf
)
;
locinfo
->
lconv
->
n_cs_precedes
=
val
;
else
{
else
{
free_locinfo
(
locinfo
);
free_locinfo
(
locinfo
);
return
NULL
;
return
NULL
;
}
}
if
(
GetLocaleInfo
A
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_INEGSEPBYSPACE
if
(
GetLocaleInfo
W
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_INEGSEPBYSPACE
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
))
|
LOCALE_NOUSEROVERRIDE
|
LOCALE_RETURN_NUMBER
,
(
WCHAR
*
)
&
val
,
2
))
locinfo
->
lconv
->
n_sep_by_space
=
atoi
(
buf
)
;
locinfo
->
lconv
->
n_sep_by_space
=
val
;
else
{
else
{
free_locinfo
(
locinfo
);
free_locinfo
(
locinfo
);
return
NULL
;
return
NULL
;
}
}
if
(
GetLocaleInfo
A
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_IPOSSIGNPOSN
if
(
GetLocaleInfo
W
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_IPOSSIGNPOSN
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
))
|
LOCALE_NOUSEROVERRIDE
|
LOCALE_RETURN_NUMBER
,
(
WCHAR
*
)
&
val
,
2
))
locinfo
->
lconv
->
p_sign_posn
=
atoi
(
buf
)
;
locinfo
->
lconv
->
p_sign_posn
=
val
;
else
{
else
{
free_locinfo
(
locinfo
);
free_locinfo
(
locinfo
);
return
NULL
;
return
NULL
;
}
}
if
(
GetLocaleInfo
A
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_INEGSIGNPOSN
if
(
GetLocaleInfo
W
(
lcid
[
MSVCRT_LC_MONETARY
],
LOCALE_INEGSIGNPOSN
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
))
|
LOCALE_NOUSEROVERRIDE
|
LOCALE_RETURN_NUMBER
,
(
WCHAR
*
)
&
val
,
2
))
locinfo
->
lconv
->
n_sign_posn
=
atoi
(
buf
)
;
locinfo
->
lconv
->
n_sign_posn
=
val
;
else
{
else
{
free_locinfo
(
locinfo
);
free_locinfo
(
locinfo
);
return
NULL
;
return
NULL
;
...
...
dlls/msvcrt/msvcrt.h
View file @
f48648ae
...
@@ -1072,6 +1072,7 @@ void* __cdecl MSVCRT_malloc(MSVCRT_size_t);
...
@@ -1072,6 +1072,7 @@ void* __cdecl MSVCRT_malloc(MSVCRT_size_t);
void
*
__cdecl
MSVCRT_calloc
(
MSVCRT_size_t
,
MSVCRT_size_t
);
void
*
__cdecl
MSVCRT_calloc
(
MSVCRT_size_t
,
MSVCRT_size_t
);
void
*
__cdecl
MSVCRT_realloc
(
void
*
,
MSVCRT_size_t
);
void
*
__cdecl
MSVCRT_realloc
(
void
*
,
MSVCRT_size_t
);
int
__cdecl
MSVCRT_atoi
(
const
char
*
str
);
int
__cdecl
MSVCRT_isalpha
(
int
c
);
int
__cdecl
MSVCRT_isalpha
(
int
c
);
int
__cdecl
MSVCRT_isdigit
(
int
c
);
int
__cdecl
MSVCRT_isdigit
(
int
c
);
int
__cdecl
MSVCRT_isspace
(
int
c
);
int
__cdecl
MSVCRT_isspace
(
int
c
);
...
...
dlls/msvcrt/string.c
View file @
f48648ae
...
@@ -2441,7 +2441,7 @@ int CDECL MSVCRT_I10_OUTPUT(MSVCRT__LDOUBLE ld80, int prec, int flag, struct _I1
...
@@ -2441,7 +2441,7 @@ int CDECL MSVCRT_I10_OUTPUT(MSVCRT__LDOUBLE ld80, int prec, int flag, struct _I1
MSVCRT_sprintf
(
buf
,
format
,
d
);
MSVCRT_sprintf
(
buf
,
format
,
d
);
buf
[
1
]
=
buf
[
0
];
buf
[
1
]
=
buf
[
0
];
data
->
pos
=
atoi
(
buf
+
prec
+
3
);
data
->
pos
=
MSVCRT_
atoi
(
buf
+
prec
+
3
);
if
(
buf
[
1
]
!=
'0'
)
if
(
buf
[
1
]
!=
'0'
)
data
->
pos
++
;
data
->
pos
++
;
...
...
dlls/msvcrt/undname.c
View file @
f48648ae
...
@@ -469,7 +469,7 @@ static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym,
...
@@ -469,7 +469,7 @@ static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym,
sym
->
current
++
;
sym
->
current
++
;
if
(
!
(
n1
=
get_number
(
sym
)))
return
FALSE
;
if
(
!
(
n1
=
get_number
(
sym
)))
return
FALSE
;
num
=
atoi
(
n1
);
num
=
MSVCRT_
atoi
(
n1
);
if
(
str_modif
[
0
]
==
' '
&&
!
modifier
)
if
(
str_modif
[
0
]
==
' '
&&
!
modifier
)
str_modif
++
;
str_modif
++
;
...
@@ -1007,7 +1007,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
...
@@ -1007,7 +1007,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
sym
->
current
++
;
sym
->
current
++
;
if
(
!
(
n1
=
get_number
(
sym
)))
goto
done
;
if
(
!
(
n1
=
get_number
(
sym
)))
goto
done
;
num
=
atoi
(
n1
);
num
=
MSVCRT_
atoi
(
n1
);
while
(
num
--
)
while
(
num
--
)
arr
=
str_printf
(
sym
,
"%s[%s]"
,
arr
,
get_number
(
sym
));
arr
=
str_printf
(
sym
,
"%s[%s]"
,
arr
,
get_number
(
sym
));
...
...
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