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 #include <limits.h> | 7 #include <limits.h> |
8 | 8 |
| 9 #include "../../../include/fpdfapi/fpdf_module.h" |
9 #include "../../../include/fpdfapi/fpdf_page.h" | 10 #include "../../../include/fpdfapi/fpdf_page.h" |
10 #include "../../../include/fpdfapi/fpdf_module.h" | 11 #include "../../../include/fxcrt/fx_safe_types.h" |
11 #include "../../../src/fxcrt/fx_safe_types.h" | |
12 #include "../../../third_party/base/numerics/safe_conversions_impl.h" | 12 #include "../../../third_party/base/numerics/safe_conversions_impl.h" |
13 #include "pageint.h" | 13 #include "pageint.h" |
14 | 14 |
15 class CPDF_PSEngine; | 15 class CPDF_PSEngine; |
16 typedef enum {PSOP_ADD, PSOP_SUB, PSOP_MUL, PSOP_DIV, PSOP_IDIV, PSOP_MOD, | 16 typedef enum {PSOP_ADD, PSOP_SUB, PSOP_MUL, PSOP_DIV, PSOP_IDIV, PSOP_MOD, |
17 PSOP_NEG, PSOP_ABS, PSOP_CEILING, PSOP_FLOOR, PSOP_ROUND, PSOP_TRU
NCATE, | 17 PSOP_NEG, PSOP_ABS, PSOP_CEILING, PSOP_FLOOR, PSOP_ROUND, PSOP_TRU
NCATE, |
18 PSOP_SQRT, PSOP_SIN, PSOP_COS, PSOP_ATAN, PSOP_EXP, PSOP_LN, PSOP_
LOG, | 18 PSOP_SQRT, PSOP_SIN, PSOP_COS, PSOP_ATAN, PSOP_EXP, PSOP_LN, PSOP_
LOG, |
19 PSOP_CVI, PSOP_CVR, PSOP_EQ, PSOP_NE, PSOP_GT, PSOP_GE, PSOP_LT, P
SOP_LE, | 19 PSOP_CVI, PSOP_CVR, PSOP_EQ, PSOP_NE, PSOP_GT, PSOP_GE, PSOP_LT, P
SOP_LE, |
20 PSOP_AND, PSOP_OR, PSOP_XOR, PSOP_NOT, PSOP_BITSHIFT, PSOP_TRUE, P
SOP_FALSE, | 20 PSOP_AND, PSOP_OR, PSOP_XOR, PSOP_NOT, PSOP_BITSHIFT, PSOP_TRUE, P
SOP_FALSE, |
21 PSOP_IF, PSOP_IFELSE, PSOP_POP, PSOP_EXCH, PSOP_DUP, PSOP_COPY, | 21 PSOP_IF, PSOP_IFELSE, PSOP_POP, PSOP_EXCH, PSOP_DUP, PSOP_COPY, |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 for (int i = 0; i < m_nOutputs; i ++) { | 896 for (int i = 0; i < m_nOutputs; i ++) { |
897 if (results[i] < m_pRanges[i * 2]) { | 897 if (results[i] < m_pRanges[i * 2]) { |
898 results[i] = m_pRanges[i * 2]; | 898 results[i] = m_pRanges[i * 2]; |
899 } else if (results[i] > m_pRanges[i * 2 + 1]) { | 899 } else if (results[i] > m_pRanges[i * 2 + 1]) { |
900 results[i] = m_pRanges[i * 2 + 1]; | 900 results[i] = m_pRanges[i * 2 + 1]; |
901 } | 901 } |
902 } | 902 } |
903 } | 903 } |
904 return TRUE; | 904 return TRUE; |
905 } | 905 } |
OLD | NEW |