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

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

Issue 1834553002: Remove strange integral constants for "true", "false", "%PDF". (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months 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
« no previous file with comments | « core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp ('k') | core/fxge/win32/fx_win32_device.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_FXCRT_INCLUDE_FX_SYSTEM_H_ 7 #ifndef CORE_FXCRT_INCLUDE_FX_SYSTEM_H_
8 #define CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ 8 #define CORE_FXCRT_INCLUDE_FX_SYSTEM_H_
9 9
10 #include <assert.h> 10 #include <assert.h>
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 #define FXSYS_atan2(a, b) (FX_FLOAT) atan2(a, b) 246 #define FXSYS_atan2(a, b) (FX_FLOAT) atan2(a, b)
247 #define FXSYS_ceil(a) (FX_FLOAT) ceil(a) 247 #define FXSYS_ceil(a) (FX_FLOAT) ceil(a)
248 #define FXSYS_floor(a) (FX_FLOAT) floor(a) 248 #define FXSYS_floor(a) (FX_FLOAT) floor(a)
249 #define FXSYS_cos(a) (FX_FLOAT) cos(a) 249 #define FXSYS_cos(a) (FX_FLOAT) cos(a)
250 #define FXSYS_acos(a) (FX_FLOAT) acos(a) 250 #define FXSYS_acos(a) (FX_FLOAT) acos(a)
251 #define FXSYS_sin(a) (FX_FLOAT) sin(a) 251 #define FXSYS_sin(a) (FX_FLOAT) sin(a)
252 #define FXSYS_log(a) (FX_FLOAT) log(a) 252 #define FXSYS_log(a) (FX_FLOAT) log(a)
253 #define FXSYS_log10(a) (FX_FLOAT) log10(a) 253 #define FXSYS_log10(a) (FX_FLOAT) log10(a)
254 #define FXSYS_fmod(a, b) (FX_FLOAT) fmod(a, b) 254 #define FXSYS_fmod(a, b) (FX_FLOAT) fmod(a, b)
255 #define FXSYS_abs abs 255 #define FXSYS_abs abs
256 #define FXDWORD_FROM_LSBFIRST(i) (i)
257 #define FXDWORD_FROM_MSBFIRST(i) \
258 (((uint8_t)(i) << 24) | ((uint8_t)((i) >> 8) << 16) | \
259 ((uint8_t)((i) >> 16) << 8) | (uint8_t)((i) >> 24))
260 #define FXDWORD_GET_LSBFIRST(p) \ 256 #define FXDWORD_GET_LSBFIRST(p) \
261 ((static_cast<FX_DWORD>(p[3]) << 24) | (static_cast<FX_DWORD>(p[2]) << 16) | \ 257 ((static_cast<FX_DWORD>(p[3]) << 24) | (static_cast<FX_DWORD>(p[2]) << 16) | \
262 (static_cast<FX_DWORD>(p[1]) << 8) | (static_cast<FX_DWORD>(p[0]))) 258 (static_cast<FX_DWORD>(p[1]) << 8) | (static_cast<FX_DWORD>(p[0])))
263 #define FXDWORD_GET_MSBFIRST(p) \ 259 #define FXDWORD_GET_MSBFIRST(p) \
264 ((static_cast<FX_DWORD>(p[0]) << 24) | (static_cast<FX_DWORD>(p[1]) << 16) | \ 260 ((static_cast<FX_DWORD>(p[0]) << 24) | (static_cast<FX_DWORD>(p[1]) << 16) | \
265 (static_cast<FX_DWORD>(p[2]) << 8) | (static_cast<FX_DWORD>(p[3]))) 261 (static_cast<FX_DWORD>(p[2]) << 8) | (static_cast<FX_DWORD>(p[3])))
266 #define FXSYS_HIBYTE(word) ((uint8_t)((word) >> 8)) 262 #define FXSYS_HIBYTE(word) ((uint8_t)((word) >> 8))
267 #define FXSYS_LOBYTE(word) ((uint8_t)(word)) 263 #define FXSYS_LOBYTE(word) ((uint8_t)(word))
268 #define FXSYS_HIWORD(dword) ((uint16_t)((dword) >> 16)) 264 #define FXSYS_HIWORD(dword) ((uint16_t)((dword) >> 16))
269 #define FXSYS_LOWORD(dword) ((uint16_t)(dword)) 265 #define FXSYS_LOWORD(dword) ((uint16_t)(dword))
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 307
312 // Prevent a function from ever being inlined, typically because we'd 308 // Prevent a function from ever being inlined, typically because we'd
313 // like it to appear in stack traces. 309 // like it to appear in stack traces.
314 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 310 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
315 #define NEVER_INLINE __declspec(noinline) 311 #define NEVER_INLINE __declspec(noinline)
316 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 312 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
317 #define NEVER_INLINE __attribute__((__noinline__)) 313 #define NEVER_INLINE __attribute__((__noinline__))
318 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 314 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
319 315
320 #endif // CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ 316 #endif // CORE_FXCRT_INCLUDE_FX_SYSTEM_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp ('k') | core/fxge/win32/fx_win32_device.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698