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

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

Issue 1755273002: Fix parsing of object numbers > 16,777,216. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master 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
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_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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 ((uint8_t)((i) >> 16) << 8) | (uint8_t)((i) >> 24)) 257 ((uint8_t)((i) >> 16) << 8) | (uint8_t)((i) >> 24))
258 #define FXDWORD_GET_LSBFIRST(p) \ 258 #define FXDWORD_GET_LSBFIRST(p) \
259 ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0])) 259 ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0]))
260 #define FXDWORD_GET_MSBFIRST(p) \ 260 #define FXDWORD_GET_MSBFIRST(p) \
261 ((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | (p[3])) 261 ((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | (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 uint32_t FXSYS_atoui(const FX_CHAR* str);
267 int32_t FXSYS_wtoi(const FX_WCHAR* str); 268 int32_t FXSYS_wtoi(const FX_WCHAR* str);
268 int64_t FXSYS_atoi64(const FX_CHAR* str); 269 int64_t FXSYS_atoi64(const FX_CHAR* str);
269 int64_t FXSYS_wtoi64(const FX_WCHAR* str); 270 int64_t FXSYS_wtoi64(const FX_WCHAR* str);
270 const FX_CHAR* FXSYS_i64toa(int64_t value, FX_CHAR* str, int radix); 271 const FX_CHAR* FXSYS_i64toa(int64_t value, FX_CHAR* str, int radix);
271 int FXSYS_round(FX_FLOAT f); 272 int FXSYS_round(FX_FLOAT f);
272 #define FXSYS_sqrt2(a, b) (FX_FLOAT) FXSYS_sqrt((a) * (a) + (b) * (b)) 273 #define FXSYS_sqrt2(a, b) (FX_FLOAT) FXSYS_sqrt((a) * (a) + (b) * (b))
273 #ifdef __cplusplus 274 #ifdef __cplusplus
274 }; 275 };
275 #endif 276 #endif
276 277
(...skipping 29 matching lines...) Expand all
306 307
307 // Prevent a function from ever being inlined, typically because we'd 308 // Prevent a function from ever being inlined, typically because we'd
308 // like it to appear in stack traces. 309 // like it to appear in stack traces.
309 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 310 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
310 #define NEVER_INLINE __declspec(noinline) 311 #define NEVER_INLINE __declspec(noinline)
311 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 312 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
312 #define NEVER_INLINE __attribute__((__noinline__)) 313 #define NEVER_INLINE __attribute__((__noinline__))
313 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 314 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
314 315
315 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ 316 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_
OLDNEW
« no previous file with comments | « core/include/fpdfapi/fpdf_parser.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698