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
2663079c
Commit
2663079c
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
msvcrt: Rename _TRUNCATE to MSVCRT__TRUNCATE.
parent
b205fd81
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
heap.c
dlls/msvcrt/heap.c
+2
-2
mbcs.c
dlls/msvcrt/mbcs.c
+2
-2
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-1
wcs.c
dlls/msvcrt/wcs.c
+4
-4
No files found.
dlls/msvcrt/heap.c
View file @
2663079c
...
...
@@ -578,7 +578,7 @@ int CDECL strncpy_s(char *dest, MSVCRT_size_t numberOfElements,
return
MSVCRT_EINVAL
;
}
if
(
count
!=
_TRUNCATE
&&
count
<
numberOfElements
)
if
(
count
!=
MSVCRT_
_TRUNCATE
&&
count
<
numberOfElements
)
end
=
count
;
else
end
=
numberOfElements
-
1
;
...
...
@@ -586,7 +586,7 @@ int CDECL strncpy_s(char *dest, MSVCRT_size_t numberOfElements,
for
(
i
=
0
;
i
<
end
&&
src
[
i
];
i
++
)
dest
[
i
]
=
src
[
i
];
if
(
!
src
[
i
]
||
end
==
count
||
count
==
_TRUNCATE
)
{
if
(
!
src
[
i
]
||
end
==
count
||
count
==
MSVCRT_
_TRUNCATE
)
{
dest
[
i
]
=
'\0'
;
return
0
;
}
...
...
dlls/msvcrt/mbcs.c
View file @
2663079c
...
...
@@ -1783,7 +1783,7 @@ int CDECL MSVCRT__mbstowcs_s_l(MSVCRT_size_t *ret, MSVCRT_wchar_t *wcstr,
return
MSVCRT_EINVAL
;
}
if
(
count
==
_TRUNCATE
||
size
<
count
)
if
(
count
==
MSVCRT_
_TRUNCATE
||
size
<
count
)
conv
=
size
;
else
conv
=
count
;
...
...
@@ -1791,7 +1791,7 @@ int CDECL MSVCRT__mbstowcs_s_l(MSVCRT_size_t *ret, MSVCRT_wchar_t *wcstr,
conv
=
MSVCRT__mbstowcs_l
(
wcstr
,
mbstr
,
conv
,
locale
);
if
(
conv
<
size
)
wcstr
[
conv
++
]
=
'\0'
;
else
if
(
conv
==
size
&&
(
count
==
_TRUNCATE
||
wcstr
[
conv
-
1
]
==
'\0'
))
else
if
(
conv
==
size
&&
(
count
==
MSVCRT_
_TRUNCATE
||
wcstr
[
conv
-
1
]
==
'\0'
))
wcstr
[
conv
-
1
]
=
'\0'
;
else
{
MSVCRT__invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
...
...
dlls/msvcrt/msvcrt.h
View file @
2663079c
...
...
@@ -709,7 +709,7 @@ typedef void (__cdecl *MSVCRT___sighandler_t)(int);
#define _MB_CP_ANSI -3
#define _MB_CP_LOCALE -4
#define _TRUNCATE ((MSVCRT_size_t)-1)
#define
MSVCRT_
_TRUNCATE ((MSVCRT_size_t)-1)
void
__cdecl
MSVCRT_free
(
void
*
);
void
*
__cdecl
MSVCRT_malloc
(
MSVCRT_size_t
);
...
...
dlls/msvcrt/wcs.c
View file @
2663079c
...
...
@@ -304,7 +304,7 @@ MSVCRT_size_t CDECL MSVCRT__wcstombs_s_l(MSVCRT_size_t *ret, char *mbstr,
return
MSVCRT_EINVAL
;
}
if
(
count
==
_TRUNCATE
||
size
<
count
)
if
(
count
==
MSVCRT_
_TRUNCATE
||
size
<
count
)
conv
=
size
;
else
conv
=
count
;
...
...
@@ -312,7 +312,7 @@ MSVCRT_size_t CDECL MSVCRT__wcstombs_s_l(MSVCRT_size_t *ret, char *mbstr,
conv
=
MSVCRT__wcstombs_l
(
mbstr
,
wcstr
,
conv
,
locale
);
if
(
conv
<
size
)
mbstr
[
conv
++
]
=
'\0'
;
else
if
(
conv
==
size
&&
(
count
==
_TRUNCATE
||
mbstr
[
conv
-
1
]
==
'\0'
))
else
if
(
conv
==
size
&&
(
count
==
MSVCRT_
_TRUNCATE
||
mbstr
[
conv
-
1
]
==
'\0'
))
mbstr
[
conv
-
1
]
=
'\0'
;
else
{
MSVCRT__invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
...
...
@@ -1043,7 +1043,7 @@ int CDECL MSVCRT_vsnprintf_s_l( char *str, MSVCRT_size_t sizeOfBuffer,
ret
=
vsnprintf_internal
(
str
,
len
,
format
,
locale
,
TRUE
,
valist
);
if
(
ret
<
0
||
ret
==
len
)
{
if
(
count
!=
_TRUNCATE
&&
count
>
sizeOfBuffer
)
{
if
(
count
!=
MSVCRT_
_TRUNCATE
&&
count
>
sizeOfBuffer
)
{
MSVCRT__invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
*
MSVCRT__errno
()
=
MSVCRT_ERANGE
;
memset
(
str
,
0
,
sizeOfBuffer
);
...
...
@@ -1154,7 +1154,7 @@ int CDECL MSVCRT_vsnwprintf_s_l( MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer
ret
=
vsnwprintf_internal
(
str
,
len
,
format
,
locale
,
TRUE
,
valist
);
if
(
ret
<
0
||
ret
==
len
)
{
if
(
count
!=
_TRUNCATE
&&
count
>
sizeOfBuffer
/
sizeof
(
MSVCRT_wchar_t
))
{
if
(
count
!=
MSVCRT_
_TRUNCATE
&&
count
>
sizeOfBuffer
/
sizeof
(
MSVCRT_wchar_t
))
{
MSVCRT__invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
*
MSVCRT__errno
()
=
MSVCRT_ERANGE
;
memset
(
str
,
0
,
sizeOfBuffer
);
...
...
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