Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: core/include/fxcrt/fx_ext.h

Issue 1398383002: core/ difference with XFA (for information only). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: After bidi Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifdef PDF_ENABLE_XFA
11 #include "fx_string.h"
12 #endif
10 #include "fx_system.h" 13 #include "fx_system.h"
11 14
12 #ifdef __cplusplus 15 #ifdef __cplusplus
13 extern "C" { 16 extern "C" {
14 #endif 17 #endif
15 18
16 FX_FLOAT FXSYS_tan(FX_FLOAT a); 19 FX_FLOAT FXSYS_tan(FX_FLOAT a);
17 FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x); 20 FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x);
18 FX_FLOAT FXSYS_strtof(const FX_CHAR* pcsStr, 21 FX_FLOAT FXSYS_strtof(const FX_CHAR* pcsStr,
19 int32_t iLength = -1, 22 int32_t iLength = -1,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void FX_Random_MT_Close(void* pContext); 62 void FX_Random_MT_Close(void* pContext);
60 63
61 void FX_Random_GenerateBase(FX_DWORD* pBuffer, int32_t iCount); 64 void FX_Random_GenerateBase(FX_DWORD* pBuffer, int32_t iCount);
62 65
63 void FX_Random_GenerateMT(FX_DWORD* pBuffer, int32_t iCount); 66 void FX_Random_GenerateMT(FX_DWORD* pBuffer, int32_t iCount);
64 67
65 void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount); 68 void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount);
66 #ifdef __cplusplus 69 #ifdef __cplusplus
67 } 70 }
68 #endif 71 #endif
72 #ifdef PDF_ENABLE_XFA
73 #ifdef __cplusplus
74 extern "C" {
75 #endif
76
77 typedef struct FX_GUID {
78 FX_DWORD data1;
79 FX_WORD data2;
80 FX_WORD data3;
81 uint8_t data4[8];
82 } FX_GUID, *FX_LPGUID;
83 typedef FX_GUID const* FX_LPCGUID;
84
85 void FX_GUID_CreateV4(FX_LPGUID pGUID);
86
87 void FX_GUID_ToString(FX_LPCGUID pGUID,
88 CFX_ByteString& bsStr,
89 FX_BOOL bSeparator = TRUE);
90 #ifdef __cplusplus
91 }
92 #endif
93 #endif
69 template <class baseType> 94 template <class baseType>
70 class CFX_SSortTemplate { 95 class CFX_SSortTemplate {
71 public: 96 public:
72 void ShellSort(baseType* pArray, int32_t iCount) { 97 void ShellSort(baseType* pArray, int32_t iCount) {
73 FXSYS_assert(pArray != NULL && iCount > 0); 98 FXSYS_assert(pArray != NULL && iCount > 0);
74 int32_t i, j, gap; 99 int32_t i, j, gap;
75 baseType v1, v2; 100 baseType v1, v2;
76 gap = iCount >> 1; 101 gap = iCount >> 1;
77 while (gap > 0) { 102 while (gap > 0) {
78 for (i = gap; i < iCount; i++) { 103 for (i = gap; i < iCount; i++) {
79 j = i - gap; 104 j = i - gap;
80 v1 = pArray[i]; 105 v1 = pArray[i];
81 while (j > -1 && (v2 = pArray[j]) > v1) { 106 while (j > -1 && (v2 = pArray[j]) > v1) {
82 pArray[j + gap] = v2; 107 pArray[j + gap] = v2;
83 j -= gap; 108 j -= gap;
84 } 109 }
85 pArray[j + gap] = v1; 110 pArray[j + gap] = v1;
86 } 111 }
87 gap >>= 1; 112 gap >>= 1;
88 } 113 }
89 } 114 }
90 }; 115 };
91 116
92 #endif // CORE_INCLUDE_FXCRT_FX_EXT_H_ 117 #endif // CORE_INCLUDE_FXCRT_FX_EXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698