summaryrefslogtreecommitdiff
path: root/src/pal/src/cruntime/wchar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/src/cruntime/wchar.cpp')
-rw-r--r--src/pal/src/cruntime/wchar.cpp211
1 files changed, 0 insertions, 211 deletions
diff --git a/src/pal/src/cruntime/wchar.cpp b/src/pal/src/cruntime/wchar.cpp
index 2d244a639f..3de065e361 100644
--- a/src/pal/src/cruntime/wchar.cpp
+++ b/src/pal/src/cruntime/wchar.cpp
@@ -73,146 +73,6 @@ wtolower(wchar_16 c)
}
-/*******************************************************************************
-Function:
- Internal_i64tow
-
-Parameters:
- value
- - INT64 value to be converted to a string
- string
- - out buffer to place interger string
- radix
- - numeric base to convert to
- isI64
- - TRUE if value is INT64, FALSE if value is a long
-
-Note:
- - only a radix of ten (and value < 0) will result in a negative
- sign in the output buffer
-*******************************************************************************/
-LPWSTR Internal_i64tow(INT64 value, LPWSTR string, int radix, BOOL isI64)
-{
- int length = 0;
- int n;
- int r;
- UINT64 uval = value;
- LPWSTR stringPtr = string;
- int start = 0;
- int end;
- WCHAR tempCh;
-
- if (radix < 2 || radix > 36)
- {
- ASSERT( "Invalid radix, radix must be between 2 and 36\n" );
- SetLastError(ERROR_INVALID_PARAMETER);
- return string;
- }
- if (FALSE == isI64)
- {
- uval = (ULONG) uval;
- }
- if (10 == radix && value < 0)
- {
- uval = value * -1;
- }
- if(0 == uval)
- {
- ++length;
- *stringPtr++ = '0';
- }
- else while (uval > 0)
- {
- ++length;
- n = uval / radix;
- r = uval - (n * radix);
- uval /= radix;
- if (r > 9)
- {
- *stringPtr++ = r + 87;
- }
- else
- {
- *stringPtr++ = r + 48;
- }
- }
- if (10 == radix && value < 0)
- {
- *stringPtr++ = '-';
- ++length;
- }
- *stringPtr = 0; /* end the string */
-
- /* reverse the string */
- end = length - 1;
- while (start < end)
- {
- tempCh = string[start];
- string[start] = string[end];
- string[end] = tempCh;
- ++start;
- --end;
- }
-
- return string;
-}
-
-/*--
-Function:
- _itow
-
-16-bit wide character version of the ANSI tolower() function.
-
- --*/
-wchar_16 *
-__cdecl
-_itow(
- int value,
- wchar_16 *string,
- int radix)
-{
- wchar_16 *ret;
-
- PERF_ENTRY(_itow);
- ENTRY("_itow (value=%d, string=%p, radix=%d)\n",
- value, string, radix);
-
- ret = Internal_i64tow(value, string, radix, FALSE);
-
- LOGEXIT("_itow returns wchar_t* %p\n", ret);
- PERF_EXIT(_itow);
-
- return ret;
-}
-
-/*--
-Function:
- _i64tow
-
-See MSDN doc
---*/
-wchar_16 *
- __cdecl
-_i64tow(
- __int64 value,
- wchar_16 *string,
- int radix)
-{
- wchar_16 *ret;
-
- PERF_ENTRY(_i64tow);
- ENTRY("_i64tow (value=%ld, string=%p, radix=%d)\n",
- value, string, radix);
-
- ret = Internal_i64tow(value, string, radix, TRUE);
-
- LOGEXIT("_i64tow returns wchar_t* %p\n", ret);
- PERF_EXIT(_i64tow);
-
- return ret;
-}
-
-
/*--
Function:
_wtoi
@@ -1558,77 +1418,6 @@ PAL_wcstod( const wchar_16 * nptr, wchar_16 **endptr )
}
/*++
-Function :
-
- _ui64tow
-
-See MSDN for more details.
---*/
-wchar_16 *
-__cdecl
-_ui64tow( unsigned __int64 value , wchar_16 * string , int radix )
-{
- UINT ReversedIndex = 0;
- WCHAR ReversedString[ 65 ];
- LPWSTR lpString = string;
- UINT Index = 0;
-
- PERF_ENTRY(_ui64tow);
- ENTRY( "_ui64tow( value=%I64d, string=%p (%S), radix=%d )\n",
- value, string, string, radix );
-
- if ( !string )
- {
- ERROR( "string has to be a valid pointer.\n" );
- LOGEXIT( "_ui64tow returning NULL.\n" );
- PERF_EXIT(_ui64tow);
- return NULL;
- }
- if ( radix < 2 || radix > 36 )
- {
- ERROR( "radix has to be between 2 and 36.\n" );
- LOGEXIT( "_ui64tow returning NULL.\n" );
- PERF_EXIT(_ui64tow);
- return NULL;
- }
-
- if(0 == value)
- {
- ReversedString[0] = '0';
- Index++;
- }
- else while ( value )
- {
- int temp = value % radix;
- value /= radix;
-
- if ( temp < 10 )
- {
- ReversedString[ Index ] = temp + '0';
- Index++;
- }
- else
- {
- ReversedString[ Index ] = temp - 10 + 'a';
- Index++;
- }
- }
-
- /* Reverse the string. */
- ReversedIndex = Index;
- for ( Index = 0; ReversedIndex > 0; ReversedIndex--, Index++ )
- {
- string[ Index ] = ReversedString[ ReversedIndex - 1 ];
- }
-
- string[ Index ] = '\0';
- LOGEXIT( "_ui64tow returning %p (%S).\n", lpString , lpString );
- PERF_EXIT(_ui64tow);
- return lpString;
-}
-
-
-/*++
Function:
iswdigit