| 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 _FXCRT_EXTENSION_ | 7 #ifndef _FXCRT_EXTENSION_ |
| 8 #define _FXCRT_EXTENSION_ | 8 #define _FXCRT_EXTENSION_ |
| 9 #ifndef _FX_BASIC_H_ | 9 |
| 10 #include "fx_arb.h" |
| 10 #include "fx_basic.h" | 11 #include "fx_basic.h" |
| 11 #endif | |
| 12 #ifndef _FXCRT_COORDINATES_ | |
| 13 #include "fx_coordinates.h" | 12 #include "fx_coordinates.h" |
| 14 #endif | 13 #include "fx_ucd.h" |
| 15 #ifndef _FX_XML_H_ | |
| 16 #include "fx_xml.h" | 14 #include "fx_xml.h" |
| 17 #endif | 15 |
| 18 #ifndef _FX_UNICODE_ | |
| 19 #include "fx_ucd.h" | |
| 20 #endif | |
| 21 #ifndef _FX_ARABIC_ | |
| 22 #include "fx_arb.h" | |
| 23 #endif | |
| 24 #ifdef __cplusplus | 16 #ifdef __cplusplus |
| 25 extern "C" { | 17 extern "C" { |
| 26 #endif | 18 #endif |
| 27 | 19 |
| 28 | |
| 29 FX_FLOAT FXSYS_tan(FX_FLOAT a); | 20 FX_FLOAT FXSYS_tan(FX_FLOAT a); |
| 30 FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x); | 21 FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x); |
| 31 FX_FLOAT FXSYS_strtof(FX_LPCSTR pcsStr, FX_INT32 iLength = -1, FX
_INT32 *pUsedLen = NULL); | 22 FX_FLOAT FXSYS_strtof(FX_LPCSTR pcsStr, FX_INT32 iLength = -1, FX
_INT32 *pUsedLen = NULL); |
| 32 FX_FLOAT FXSYS_wcstof(FX_LPCWSTR pwsStr, FX_INT32 iLength = -1, F
X_INT32 *pUsedLen = NULL); | 23 FX_FLOAT FXSYS_wcstof(FX_LPCWSTR pwsStr, FX_INT32 iLength = -1, F
X_INT32 *pUsedLen = NULL); |
| 33 FX_LPWSTR FXSYS_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_
t count); | 24 FX_LPWSTR FXSYS_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_
t count); |
| 34 FX_INT32 FXSYS_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t coun
t); | 25 FX_INT32 FXSYS_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t coun
t); |
| 35 FX_INT32 FXSYS_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count)
; | 26 FX_INT32 FXSYS_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count)
; |
| 27 |
| 36 inline FX_BOOL FXSYS_islower(FX_INT32 ch) | 28 inline FX_BOOL FXSYS_islower(FX_INT32 ch) |
| 37 { | 29 { |
| 38 return ch >= 'a' && ch <= 'z'; | 30 return ch >= 'a' && ch <= 'z'; |
| 39 } | 31 } |
| 40 inline FX_BOOL FXSYS_isupper(FX_INT32 ch) | 32 inline FX_BOOL FXSYS_isupper(FX_INT32 ch) |
| 41 { | 33 { |
| 42 return ch >= 'A' && ch <= 'Z'; | 34 return ch >= 'A' && ch <= 'Z'; |
| 43 } | 35 } |
| 44 inline FX_INT32 FXSYS_tolower(FX_INT32 ch) | 36 inline FX_INT32 FXSYS_tolower(FX_INT32 ch) |
| 45 { | 37 { |
| 46 return ch < 'A' || ch > 'Z' ? ch : (ch + 0x20); | 38 return ch < 'A' || ch > 'Z' ? ch : (ch + 0x20); |
| 47 } | 39 } |
| 48 inline FX_INT32 FXSYS_toupper(FX_INT32 ch) | 40 inline FX_INT32 FXSYS_toupper(FX_INT32 ch) |
| 49 { | 41 { |
| 50 return ch < 'a' || ch > 'z' ? ch : (ch - 0x20); | 42 return ch < 'a' || ch > 'z' ? ch : (ch - 0x20); |
| 51 } | 43 } |
| 52 | 44 |
| 53 | |
| 54 | |
| 55 FX_DWORD FX_HashCode_String_GetA(FX_LPCSTR pStr, FX_INT32 iLength, FX_BOO
L bIgnoreCase = FALSE); | 45 FX_DWORD FX_HashCode_String_GetA(FX_LPCSTR pStr, FX_INT32 iLength, FX_BOO
L bIgnoreCase = FALSE); |
| 56 FX_DWORD FX_HashCode_String_GetW(FX_LPCWSTR pStr, FX_INT32 iLength, FX_BO
OL bIgnoreCase = FALSE); | 46 FX_DWORD FX_HashCode_String_GetW(FX_LPCWSTR pStr, FX_INT32 iLength, FX_BO
OL bIgnoreCase = FALSE); |
| 57 | 47 |
| 58 #ifdef __cplusplus | 48 #ifdef __cplusplus |
| 59 } | 49 } |
| 60 #endif | 50 #endif |
| 61 #ifdef __cplusplus | 51 #ifdef __cplusplus |
| 62 extern "C" { | 52 extern "C" { |
| 63 #endif | 53 #endif |
| 64 | 54 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 94 pArray[j + gap] = v2; | 84 pArray[j + gap] = v2; |
| 95 j -= gap; | 85 j -= gap; |
| 96 } | 86 } |
| 97 pArray[j + gap] = v1; | 87 pArray[j + gap] = v1; |
| 98 } | 88 } |
| 99 gap >>= 1; | 89 gap >>= 1; |
| 100 } | 90 } |
| 101 } | 91 } |
| 102 }; | 92 }; |
| 103 #endif | 93 #endif |
| OLD | NEW |