| 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 #ifndef CORE_INCLUDE_FXCRT_FX_EXT_H_ | 7 #ifndef CORE_INCLUDE_FXCRT_FX_EXT_H_ |
| 8 #define CORE_INCLUDE_FXCRT_FX_EXT_H_ | 8 #define CORE_INCLUDE_FXCRT_FX_EXT_H_ |
| 9 | 9 |
| 10 #include "fx_system.h" | 10 #include "fx_system.h" |
| 11 | 11 |
| 12 #ifdef __cplusplus | 12 #ifdef __cplusplus |
| 13 extern "C" { | 13 extern "C" { |
| 14 #endif | 14 #endif |
| 15 | 15 |
| 16 FX_FLOAT FXSYS_tan(FX_FLOAT a); | 16 FX_FLOAT FXSYS_tan(FX_FLOAT a); |
| 17 FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x); | 17 FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x); |
| 18 FX_FLOAT FXSYS_strtof(const FX_CHAR* pcsStr, int32_t iLength = -1
, int32_t *pUsedLen = NULL); | 18 FX_FLOAT FXSYS_strtof(const FX_CHAR* pcsStr, int32_t iLength = -1
, int32_t *pUsedLen = NULL); |
| 19 FX_FLOAT FXSYS_wcstof(const FX_WCHAR* pwsStr, int32_t iLength = -
1, int32_t *pUsedLen = NULL); | 19 FX_FLOAT FXSYS_wcstof(const FX_WCHAR* pwsStr, int32_t iLength = -
1, int32_t *pUsedLen = NULL); |
| 20 FX_WCHAR* FXSYS_wcsncpy(FX_WCHAR* dstStr, const FX_WCHAR* srcStr,
size_t count); | 20 FX_WCHAR* FXSYS_wcsncpy(FX_WCHAR* dstStr, const FX_WCHAR* srcStr,
size_t count); |
| 21 int32_t FXSYS_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t co
unt); | 21 int32_t FXSYS_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t co
unt); |
| 22 int32_t FXSYS_strnicmp(const FX_CHAR* s1, const FX_CHAR* s2, size_t coun
t); | 22 int32_t FXSYS_strnicmp(const FX_CHAR* s1, const FX_CHAR* s2, size_t coun
t); |
| 23 | 23 |
| 24 inline FX_BOOL» FXSYS_islower(int32_t ch) | 24 inline bool» FXSYS_islower(int32_t ch) |
| 25 { | 25 { |
| 26 return ch >= 'a' && ch <= 'z'; | 26 return ch >= 'a' && ch <= 'z'; |
| 27 } | 27 } |
| 28 inline FX_BOOL» FXSYS_isupper(int32_t ch) | 28 inline bool» FXSYS_isupper(int32_t ch) |
| 29 { | 29 { |
| 30 return ch >= 'A' && ch <= 'Z'; | 30 return ch >= 'A' && ch <= 'Z'; |
| 31 } | 31 } |
| 32 inline int32_t FXSYS_tolower(int32_t ch) | 32 inline int32_t FXSYS_tolower(int32_t ch) |
| 33 { | 33 { |
| 34 return ch < 'A' || ch > 'Z' ? ch : (ch + 0x20); | 34 return ch < 'A' || ch > 'Z' ? ch : (ch + 0x20); |
| 35 } | 35 } |
| 36 inline int32_t FXSYS_toupper(int32_t ch) | 36 inline int32_t FXSYS_toupper(int32_t ch) |
| 37 { | 37 { |
| 38 return ch < 'a' || ch > 'z' ? ch : (ch - 0x20); | 38 return ch < 'a' || ch > 'z' ? ch : (ch - 0x20); |
| 39 } | 39 } |
| 40 | 40 |
| 41 FX_DWORD» FX_HashCode_String_GetA(const FX_CHAR* pStr, int32_t iLength, FX
_BOOL bIgnoreCase = FALSE); | 41 FX_DWORD» FX_HashCode_String_GetA(const FX_CHAR* pStr, int32_t iLength, bo
ol bIgnoreCase = false); |
| 42 FX_DWORD» FX_HashCode_String_GetW(const FX_WCHAR* pStr, int32_t iLength, F
X_BOOL bIgnoreCase = FALSE); | 42 FX_DWORD» FX_HashCode_String_GetW(const FX_WCHAR* pStr, int32_t iLength, b
ool bIgnoreCase = false); |
| 43 | 43 |
| 44 #ifdef __cplusplus | 44 #ifdef __cplusplus |
| 45 } | 45 } |
| 46 #endif | 46 #endif |
| 47 #ifdef __cplusplus | 47 #ifdef __cplusplus |
| 48 extern "C" { | 48 extern "C" { |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 void* FX_Random_MT_Start(FX_DWORD dwSeed); | 51 void* FX_Random_MT_Start(FX_DWORD dwSeed); |
| 52 | 52 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 81 j -= gap; | 81 j -= gap; |
| 82 } | 82 } |
| 83 pArray[j + gap] = v1; | 83 pArray[j + gap] = v1; |
| 84 } | 84 } |
| 85 gap >>= 1; | 85 gap >>= 1; |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 #endif // CORE_INCLUDE_FXCRT_FX_EXT_H_ | 90 #endif // CORE_INCLUDE_FXCRT_FX_EXT_H_ |
| OLD | NEW |