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_SYSTEM_H_ | 7 #ifndef CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ |
8 #define CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ | 8 #define CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ |
9 | 9 |
10 #include <assert.h> | 10 #include <assert.h> |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 (((uint8_t*)(p))[2] << 8) | (((uint8_t*)(p))[3])) | 261 (((uint8_t*)(p))[2] << 8) | (((uint8_t*)(p))[3])) |
262 #define FXSYS_HIBYTE(word) ((uint8_t)((word) >> 8)) | 262 #define FXSYS_HIBYTE(word) ((uint8_t)((word) >> 8)) |
263 #define FXSYS_LOBYTE(word) ((uint8_t)(word)) | 263 #define FXSYS_LOBYTE(word) ((uint8_t)(word)) |
264 #define FXSYS_HIWORD(dword) ((FX_WORD)((dword) >> 16)) | 264 #define FXSYS_HIWORD(dword) ((FX_WORD)((dword) >> 16)) |
265 #define FXSYS_LOWORD(dword) ((FX_WORD)(dword)) | 265 #define FXSYS_LOWORD(dword) ((FX_WORD)(dword)) |
266 int32_t FXSYS_atoi(const FX_CHAR* str); | 266 int32_t FXSYS_atoi(const FX_CHAR* str); |
267 int32_t FXSYS_wtoi(const FX_WCHAR* str); | 267 int32_t FXSYS_wtoi(const FX_WCHAR* str); |
268 int64_t FXSYS_atoi64(const FX_CHAR* str); | 268 int64_t FXSYS_atoi64(const FX_CHAR* str); |
269 int64_t FXSYS_wtoi64(const FX_WCHAR* str); | 269 int64_t FXSYS_wtoi64(const FX_WCHAR* str); |
270 const FX_CHAR* FXSYS_i64toa(int64_t value, FX_CHAR* str, int radix); | 270 const FX_CHAR* FXSYS_i64toa(int64_t value, FX_CHAR* str, int radix); |
271 const FX_WCHAR* FXSYS_i64tow(int64_t value, FX_WCHAR* str, int radix); | |
272 int FXSYS_round(FX_FLOAT f); | 271 int FXSYS_round(FX_FLOAT f); |
273 #define FXSYS_Mul(a, b) ((a) * (b)) | 272 #define FXSYS_Mul(a, b) ((a) * (b)) |
274 #define FXSYS_Div(a, b) ((a) / (b)) | 273 #define FXSYS_Div(a, b) ((a) / (b)) |
275 #define FXSYS_MulDiv(a, b, c) ((a) * (b) / (c)) | 274 #define FXSYS_MulDiv(a, b, c) ((a) * (b) / (c)) |
276 #define FXSYS_sqrt2(a, b) (FX_FLOAT) FXSYS_sqrt((a) * (a) + (b) * (b)) | 275 #define FXSYS_sqrt2(a, b) (FX_FLOAT) FXSYS_sqrt((a) * (a) + (b) * (b)) |
277 #ifdef __cplusplus | 276 #ifdef __cplusplus |
278 }; | 277 }; |
279 #endif | 278 #endif |
280 | 279 |
281 // To print a size_t value in a portable way: | 280 // To print a size_t value in a portable way: |
(...skipping 28 matching lines...) Expand all Loading... |
310 | 309 |
311 // Prevent a function from ever being inlined, typically because we'd | 310 // Prevent a function from ever being inlined, typically because we'd |
312 // like it to appear in stack traces. | 311 // like it to appear in stack traces. |
313 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 312 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
314 #define NEVER_INLINE __declspec(noinline) | 313 #define NEVER_INLINE __declspec(noinline) |
315 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 314 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
316 #define NEVER_INLINE __attribute__((__noinline__)) | 315 #define NEVER_INLINE __attribute__((__noinline__)) |
317 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 316 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
318 | 317 |
319 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ | 318 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ |
OLD | NEW |