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
ab999f6d
Commit
ab999f6d
authored
Jun 14, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90: Use codecvt<char>::is in basic_istream_char__Ipfx function.
parent
bcdcef87
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
18 deletions
+49
-18
ios.c
dlls/msvcp90/ios.c
+2
-2
locale.c
dlls/msvcp90/locale.c
+26
-16
msvcp90.h
dlls/msvcp90/msvcp90.h
+21
-0
No files found.
dlls/msvcp90/ios.c
View file @
ab999f6d
...
...
@@ -4061,6 +4061,7 @@ MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_b
if
(
!
noskip
&&
(
ios_base_flags_get
(
&
base
->
base
)
&
FMTFLAG_skipws
))
{
basic_streambuf_char
*
strbuf
=
basic_ios_char_rdbuf_get
(
base
);
const
ctype_char
*
ctype
=
ctype_char_use_facet
(
base
->
strbuf
->
loc
);
int
ch
;
for
(
ch
=
basic_streambuf_char_sgetc
(
strbuf
);
;
...
...
@@ -4070,8 +4071,7 @@ MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_b
return
FALSE
;
}
/* TODO: use locale class instead of isspace */
if
(
!
isspace
(
ch
))
if
(
!
ctype_char_is_ch
(
ctype
,
_SPACE
|
_BLANK
,
ch
))
break
;
}
}
...
...
dlls/msvcp90/locale.c
View file @
ab999f6d
...
...
@@ -76,13 +76,6 @@ typedef struct {
typedef
struct
{
LCID
handle
;
unsigned
page
;
const
short
*
table
;
int
delfl
;
}
_Ctypevec
;
typedef
struct
{
LCID
handle
;
unsigned
page
;
}
_Cvtvec
;
typedef
struct
{
...
...
@@ -91,15 +84,6 @@ typedef struct {
}
collate
;
typedef
struct
{
locale_facet
facet
;
}
ctype_base
;
typedef
struct
{
ctype_base
base
;
_Ctypevec
ctype
;
}
ctype_char
;
typedef
struct
{
ctype_base
base
;
_Ctypevec
ctype
;
_Cvtvec
cvt
;
...
...
@@ -1496,6 +1480,32 @@ MSVCP_size_t __cdecl ctype_char__Getcat(const locale_facet **facet, const locale
return
LC_CTYPE
;
}
ctype_char
*
ctype_char_use_facet
(
const
locale
*
loc
)
{
static
ctype_char
*
obj
=
NULL
;
_Lockit
lock
;
const
locale_facet
*
fac
;
_Lockit_ctor_locktype
(
&
lock
,
_LOCK_LOCALE
);
fac
=
locale__Getfacet
(
loc
,
ctype_char_id
.
id
);
if
(
fac
)
{
_Lockit_dtor
(
&
lock
);
return
(
ctype_char
*
)
fac
;
}
if
(
obj
)
return
obj
;
ctype_char__Getcat
(
&
fac
,
loc
);
obj
=
(
ctype_char
*
)
fac
;
locale_facet__Incref
(
&
obj
->
base
.
facet
);
locale_facet_register
(
&
obj
->
base
.
facet
);
_Lockit_dtor
(
&
lock
);
return
obj
;
}
/* _Tolower */
int
__cdecl
_Tolower
(
int
ch
,
const
_Ctypevec
*
ctype
)
{
...
...
dlls/msvcp90/msvcp90.h
View file @
ab999f6d
...
...
@@ -311,6 +311,26 @@ int __thiscall codecvt_char_in(const codecvt_char*, int*, const char*,
const
char
*
,
const
char
**
,
char
*
,
char
*
,
char
**
);
int
__thiscall
codecvt_base_max_length
(
const
codecvt_base
*
);
typedef
struct
{
LCID
handle
;
unsigned
page
;
const
short
*
table
;
int
delfl
;
}
_Ctypevec
;
/* class ctype_base */
typedef
struct
{
locale_facet
facet
;
}
ctype_base
;
/* class ctype<char> */
typedef
struct
{
ctype_base
base
;
_Ctypevec
ctype
;
}
ctype_char
;
MSVCP_bool
__thiscall
ctype_char_is_ch
(
const
ctype_char
*
,
short
,
char
);
/* class locale */
typedef
struct
{
...
...
@@ -323,6 +343,7 @@ locale* __thiscall locale_operator_assign(locale*, const locale*);
void
__thiscall
locale_dtor
(
locale
*
);
void
free_locale
(
void
);
codecvt_char
*
codecvt_char_use_facet
(
const
locale
*
);
ctype_char
*
ctype_char_use_facet
(
const
locale
*
);
/* class _Lockit */
typedef
struct
{
...
...
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