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
4e8e2f39
Commit
4e8e2f39
authored
Jun 06, 2010
by
Alexander Scott-Johns
Committed by
Alexandre Julliard
Jun 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include/msvcrt: Define _TRUNCATE; use it in the tests.
parent
2663079c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
string.c
dlls/msvcrt/tests/string.c
+4
-4
stdlib.h
include/msvcrt/stdlib.h
+2
-0
No files found.
dlls/msvcrt/tests/string.c
View file @
4e8e2f39
...
...
@@ -1215,22 +1215,22 @@ static void test_mbstowcs(void)
return
;
}
err
=
pmbstowcs_s
(
&
ret
,
wOut
,
6
,
mSimple
,
-
1
/*_TRUNCATE*/
);
err
=
pmbstowcs_s
(
&
ret
,
wOut
,
6
,
mSimple
,
_TRUNCATE
);
ok
(
err
==
0
,
"err = %d
\n
"
,
err
);
ok
(
ret
==
5
,
"ret = %d
\n
"
,
(
int
)
ret
);
ok
(
!
memcmp
(
wOut
,
wSimple
,
sizeof
(
wSimple
)),
"wOut = %s
\n
"
,
wine_dbgstr_w
(
wOut
));
err
=
pmbstowcs_s
(
&
ret
,
wOut
,
6
,
mHiragana
,
-
1
/*_TRUNCATE*/
);
err
=
pmbstowcs_s
(
&
ret
,
wOut
,
6
,
mHiragana
,
_TRUNCATE
);
ok
(
err
==
0
,
"err = %d
\n
"
,
err
);
ok
(
ret
==
3
,
"ret = %d
\n
"
,
(
int
)
ret
);
ok
(
!
memcmp
(
wOut
,
wHiragana
,
sizeof
(
wHiragana
)),
"wOut = %s
\n
"
,
wine_dbgstr_w
(
wOut
));
err
=
pwcstombs_s
(
&
ret
,
mOut
,
6
,
wSimple
,
-
1
/*_TRUNCATE*/
);
err
=
pwcstombs_s
(
&
ret
,
mOut
,
6
,
wSimple
,
_TRUNCATE
);
ok
(
err
==
0
,
"err = %d
\n
"
,
err
);
ok
(
ret
==
5
,
"ret = %d
\n
"
,
(
int
)
ret
);
ok
(
!
memcmp
(
mOut
,
mSimple
,
sizeof
(
mSimple
)),
"mOut = %s
\n
"
,
mOut
);
err
=
pwcstombs_s
(
&
ret
,
mOut
,
6
,
wHiragana
,
-
1
/*_TRUNCATE*/
);
err
=
pwcstombs_s
(
&
ret
,
mOut
,
6
,
wHiragana
,
_TRUNCATE
);
ok
(
err
==
0
,
"err = %d
\n
"
,
err
);
ok
(
ret
==
5
,
"ret = %d
\n
"
,
(
int
)
ret
);
ok
(
!
memcmp
(
mOut
,
mHiragana
,
sizeof
(
mHiragana
)),
"mOut = %s
\n
"
,
mOut
);
...
...
include/msvcrt/stdlib.h
View file @
4e8e2f39
...
...
@@ -47,6 +47,8 @@ typedef struct
#define _MAX_PATH 260
#endif
/* Make the secure string functions (names end in "_s") truncate their output */
#define _TRUNCATE ((size_t)-1)
typedef
struct
_div_t
{
int
quot
;
...
...
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