OLD | NEW |
1 /* | 1 /* |
2 ******************************************************************************** | 2 ******************************************************************************** |
3 * Copyright (C) 2005-2013, International Business Machines | 3 * Copyright (C) 2005-2013, International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 ******************************************************************************** | 5 ******************************************************************************** |
6 * | 6 * |
7 * File WINNMFMT.CPP | 7 * File WINNMFMT.CPP |
8 * | 8 * |
9 ******************************************************************************** | 9 ******************************************************************************** |
10 */ | 10 */ |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 fFractionDigitsSet = TRUE; | 235 fFractionDigitsSet = TRUE; |
236 NumberFormat::setMaximumFractionDigits(newValue); | 236 NumberFormat::setMaximumFractionDigits(newValue); |
237 } | 237 } |
238 | 238 |
239 void Win32NumberFormat::setMinimumFractionDigits(int32_t newValue) | 239 void Win32NumberFormat::setMinimumFractionDigits(int32_t newValue) |
240 { | 240 { |
241 fFractionDigitsSet = TRUE; | 241 fFractionDigitsSet = TRUE; |
242 NumberFormat::setMinimumFractionDigits(newValue); | 242 NumberFormat::setMinimumFractionDigits(newValue); |
243 } | 243 } |
244 | 244 |
245 UnicodeString &Win32NumberFormat::format(int32_t numDigits, UnicodeString &appen
dTo, wchar_t *fmt, ...) const | 245 UnicodeString &Win32NumberFormat::format(int32_t numDigits, UnicodeString &appen
dTo, const wchar_t *fmt, ...) const |
246 { | 246 { |
247 wchar_t nStackBuffer[STACK_BUFFER_SIZE]; | 247 wchar_t nStackBuffer[STACK_BUFFER_SIZE]; |
248 wchar_t *nBuffer = nStackBuffer; | 248 wchar_t *nBuffer = nStackBuffer; |
249 va_list args; | 249 va_list args; |
250 int result; | 250 int result; |
251 | 251 |
252 nBuffer[0] = 0x0000; | 252 nBuffer[0] = 0x0000; |
253 | 253 |
254 /* Due to the arguments causing a result to be <= 23 characters (+2 for NULL
and minus), | 254 /* Due to the arguments causing a result to be <= 23 characters (+2 for NULL
and minus), |
255 we don't need to reallocate the buffer. */ | 255 we don't need to reallocate the buffer. */ |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 }*/ | 352 }*/ |
353 | 353 |
354 return appendTo; | 354 return appendTo; |
355 } | 355 } |
356 | 356 |
357 U_NAMESPACE_END | 357 U_NAMESPACE_END |
358 | 358 |
359 #endif /* #if !UCONFIG_NO_FORMATTING */ | 359 #endif /* #if !UCONFIG_NO_FORMATTING */ |
360 | 360 |
361 #endif // U_PLATFORM_USES_ONLY_WIN32_API | 361 #endif // U_PLATFORM_USES_ONLY_WIN32_API |
OLD | NEW |