| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <cctype> | 10 #include <cctype> |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 StringData::Create(m_pData->m_String + nCopyIndex, nCopyLen)); | 400 StringData::Create(m_pData->m_String + nCopyIndex, nCopyLen)); |
| 401 dest.m_pData.Swap(pNewData); | 401 dest.m_pData.Swap(pNewData); |
| 402 } | 402 } |
| 403 | 403 |
| 404 #define FORCE_ANSI 0x10000 | 404 #define FORCE_ANSI 0x10000 |
| 405 #define FORCE_UNICODE 0x20000 | 405 #define FORCE_UNICODE 0x20000 |
| 406 #define FORCE_INT64 0x40000 | 406 #define FORCE_INT64 0x40000 |
| 407 | 407 |
| 408 CFX_ByteString CFX_ByteString::FormatInteger(int i, uint32_t flags) { | 408 CFX_ByteString CFX_ByteString::FormatInteger(int i, uint32_t flags) { |
| 409 char buf[32]; | 409 char buf[32]; |
| 410 return CFX_ByteStringC(buf, Buffer_itoa(buf, i, flags)); | 410 return CFX_ByteString(buf, Buffer_itoa(buf, i, flags)); |
| 411 } | 411 } |
| 412 | 412 |
| 413 void CFX_ByteString::FormatV(const FX_CHAR* pFormat, va_list argList) { | 413 void CFX_ByteString::FormatV(const FX_CHAR* pFormat, va_list argList) { |
| 414 va_list argListSave; | 414 va_list argListSave; |
| 415 #if defined(__ARMCC_VERSION) || \ | 415 #if defined(__ARMCC_VERSION) || \ |
| 416 (!defined(_MSC_VER) && (_FX_CPU_ == _FX_X64_ || _FX_CPU_ == _FX_IA64_ || \ | 416 (!defined(_MSC_VER) && (_FX_CPU_ == _FX_X64_ || _FX_CPU_ == _FX_IA64_ || \ |
| 417 _FX_CPU_ == _FX_ARM64_)) || \ | 417 _FX_CPU_ == _FX_ARM64_)) || \ |
| 418 defined(__native_client__) | 418 defined(__native_client__) |
| 419 va_copy(argListSave, argList); | 419 va_copy(argListSave, argList); |
| 420 #else | 420 #else |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 fraction %= scale; | 995 fraction %= scale; |
| 996 scale /= 10; | 996 scale /= 10; |
| 997 } | 997 } |
| 998 return buf_size; | 998 return buf_size; |
| 999 } | 999 } |
| 1000 CFX_ByteString CFX_ByteString::FormatFloat(FX_FLOAT d, int precision) { | 1000 CFX_ByteString CFX_ByteString::FormatFloat(FX_FLOAT d, int precision) { |
| 1001 FX_CHAR buf[32]; | 1001 FX_CHAR buf[32]; |
| 1002 FX_STRSIZE len = FX_ftoa(d, buf); | 1002 FX_STRSIZE len = FX_ftoa(d, buf); |
| 1003 return CFX_ByteString(buf, len); | 1003 return CFX_ByteString(buf, len); |
| 1004 } | 1004 } |
| OLD | NEW |