msvcrt: Rename _TRUNCATE to MSVCRT__TRUNCATE.

This commit is contained in:
Alexander Scott-Johns 2010-06-06 16:11:09 +01:00 committed by Alexandre Julliard
parent b205fd8108
commit 2663079c60
4 changed files with 9 additions and 9 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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);

View File

@ -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);