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 _FX_ALGORITHM | 7 #ifndef XFA_SRC_FGAS_INCLUDE_FX_ALG_H_ |
8 #define _FX_ALGORITHM | 8 #define XFA_SRC_FGAS_INCLUDE_FX_ALG_H_ |
| 9 |
9 #define FX_IsOdd(a) ((a)&1) | 10 #define FX_IsOdd(a) ((a)&1) |
10 #ifdef __cplusplus | 11 #ifdef __cplusplus |
11 extern "C" { | 12 extern "C" { |
12 #endif | 13 #endif |
13 int32_t FX_Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst); | 14 int32_t FX_Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst); |
14 int32_t FX_Base64DecodeA(const FX_CHAR* pSrc, int32_t iSrcLen, uint8_t* pDst); | 15 int32_t FX_Base64DecodeA(const FX_CHAR* pSrc, int32_t iSrcLen, uint8_t* pDst); |
15 int32_t FX_Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* pDst); | 16 int32_t FX_Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* pDst); |
16 uint8_t FX_Hex2Dec(uint8_t hexHigh, uint8_t hexLow); | 17 uint8_t FX_Hex2Dec(uint8_t hexHigh, uint8_t hexLow); |
17 int32_t FX_SeparateStringW(const FX_WCHAR* pStr, | 18 int32_t FX_SeparateStringW(const FX_WCHAR* pStr, |
18 int32_t iStrLen, | 19 int32_t iStrLen, |
(...skipping 18 matching lines...) Expand all Loading... |
37 return iMid; | 38 return iMid; |
38 } else if (find < v) { | 39 } else if (find < v) { |
39 iEnd = iMid - 1; | 40 iEnd = iMid - 1; |
40 } else { | 41 } else { |
41 iStart = iMid + 1; | 42 iStart = iMid + 1; |
42 } | 43 } |
43 } while (iStart <= iEnd); | 44 } while (iStart <= iEnd); |
44 return -1; | 45 return -1; |
45 } | 46 } |
46 }; | 47 }; |
47 #endif | 48 |
| 49 #endif // XFA_SRC_FGAS_INCLUDE_FX_ALG_H_ |
OLD | NEW |