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_FXCRT_INCLUDE_FX_EXT_H_ | 7 #ifndef CORE_FXCRT_INCLUDE_FX_EXT_H_ |
8 #define CORE_FXCRT_INCLUDE_FX_EXT_H_ | 8 #define CORE_FXCRT_INCLUDE_FX_EXT_H_ |
9 | 9 |
10 #include <cctype> | 10 #include <cctype> |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 | 69 |
70 inline int FXSYS_toDecimalDigit(const FX_CHAR c) { | 70 inline int FXSYS_toDecimalDigit(const FX_CHAR c) { |
71 return std::isdigit(c) ? c - '0' : 0; | 71 return std::isdigit(c) ? c - '0' : 0; |
72 } | 72 } |
73 | 73 |
74 inline int FXSYS_toDecimalDigit(const FX_WCHAR c) { | 74 inline int FXSYS_toDecimalDigit(const FX_WCHAR c) { |
75 return std::iswdigit(c) ? c - L'0' : 0; | 75 return std::iswdigit(c) ? c - L'0' : 0; |
76 } | 76 } |
77 | 77 |
78 FX_DWORD FX_HashCode_String_GetA(const FX_CHAR* pStr, | 78 uint32_t FX_HashCode_String_GetA(const FX_CHAR* pStr, |
79 int32_t iLength, | 79 int32_t iLength, |
80 FX_BOOL bIgnoreCase = FALSE); | 80 FX_BOOL bIgnoreCase = FALSE); |
81 FX_DWORD FX_HashCode_String_GetW(const FX_WCHAR* pStr, | 81 uint32_t FX_HashCode_String_GetW(const FX_WCHAR* pStr, |
82 int32_t iLength, | 82 int32_t iLength, |
83 FX_BOOL bIgnoreCase = FALSE); | 83 FX_BOOL bIgnoreCase = FALSE); |
84 | 84 |
85 void* FX_Random_MT_Start(FX_DWORD dwSeed); | 85 void* FX_Random_MT_Start(uint32_t dwSeed); |
86 | 86 |
87 FX_DWORD FX_Random_MT_Generate(void* pContext); | 87 uint32_t FX_Random_MT_Generate(void* pContext); |
88 | 88 |
89 void FX_Random_MT_Close(void* pContext); | 89 void FX_Random_MT_Close(void* pContext); |
90 | 90 |
91 void FX_Random_GenerateBase(FX_DWORD* pBuffer, int32_t iCount); | 91 void FX_Random_GenerateBase(uint32_t* pBuffer, int32_t iCount); |
92 | 92 |
93 void FX_Random_GenerateMT(FX_DWORD* pBuffer, int32_t iCount); | 93 void FX_Random_GenerateMT(uint32_t* pBuffer, int32_t iCount); |
94 | 94 |
95 void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount); | 95 void FX_Random_GenerateCrypto(uint32_t* pBuffer, int32_t iCount); |
96 | 96 |
97 #ifdef PDF_ENABLE_XFA | 97 #ifdef PDF_ENABLE_XFA |
98 typedef struct FX_GUID { | 98 typedef struct FX_GUID { |
99 FX_DWORD data1; | 99 uint32_t data1; |
100 uint16_t data2; | 100 uint16_t data2; |
101 uint16_t data3; | 101 uint16_t data3; |
102 uint8_t data4[8]; | 102 uint8_t data4[8]; |
103 } FX_GUID, *FX_LPGUID; | 103 } FX_GUID, *FX_LPGUID; |
104 typedef FX_GUID const* FX_LPCGUID; | 104 typedef FX_GUID const* FX_LPCGUID; |
105 void FX_GUID_CreateV4(FX_LPGUID pGUID); | 105 void FX_GUID_CreateV4(FX_LPGUID pGUID); |
106 void FX_GUID_ToString(FX_LPCGUID pGUID, | 106 void FX_GUID_ToString(FX_LPCGUID pGUID, |
107 CFX_ByteString& bsStr, | 107 CFX_ByteString& bsStr, |
108 FX_BOOL bSeparator = TRUE); | 108 FX_BOOL bSeparator = TRUE); |
109 #endif // PDF_ENABLE_XFA | 109 #endif // PDF_ENABLE_XFA |
(...skipping 15 matching lines...) Expand all Loading... |
125 j -= gap; | 125 j -= gap; |
126 } | 126 } |
127 pArray[j + gap] = v1; | 127 pArray[j + gap] = v1; |
128 } | 128 } |
129 gap >>= 1; | 129 gap >>= 1; |
130 } | 130 } |
131 } | 131 } |
132 }; | 132 }; |
133 | 133 |
134 #endif // CORE_FXCRT_INCLUDE_FX_EXT_H_ | 134 #endif // CORE_FXCRT_INCLUDE_FX_EXT_H_ |
OLD | NEW |