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 "../../../include/fpdfapi/fpdf_module.h" | 7 #include "../../../include/fpdfapi/fpdf_module.h" |
8 #include "../../../include/fpdfapi/fpdf_resource.h" | 8 #include "../../../include/fpdfapi/fpdf_resource.h" |
9 #include "../../../include/fxcodec/fx_codec.h" | 9 #include "../../../include/fxcodec/fx_codec.h" |
10 #include "font_int.h" | 10 #include "font_int.h" |
11 #ifndef _FPDFAPI_MINI_ | |
12 typedef struct { | 11 typedef struct { |
13 FXSYS_FILE* m_pFile; | 12 FXSYS_FILE* m_pFile; |
14 int m_nFiles; | 13 int m_nFiles; |
15 int m_IndexSize; | 14 int m_IndexSize; |
16 int m_IndexOffset; | 15 int m_IndexOffset; |
17 } FXFC_PACKAGE; | 16 } FXFC_PACKAGE; |
18 FX_LPVOID FXFC_LoadPackage(FX_LPCSTR name) | 17 FX_LPVOID FXFC_LoadPackage(FX_LPCSTR name) |
19 { | 18 { |
20 FXSYS_FILE* file = FXSYS_fopen(name, (FX_LPCSTR)"rb"); | 19 FXSYS_FILE* file = FXSYS_fopen(name, (FX_LPCSTR)"rb"); |
21 if (file == NULL) { | 20 if (file == NULL) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 FX_LPBYTE CPDF_FXMP::GetRecord(FX_DWORD index) | 85 FX_LPBYTE CPDF_FXMP::GetRecord(FX_DWORD index) |
87 { | 86 { |
88 if (m_pTable == NULL) { | 87 if (m_pTable == NULL) { |
89 return NULL; | 88 return NULL; |
90 } | 89 } |
91 if ((int)index < (int)m_pHeader->dwStartIndex || index > m_pHeader->dwEndInd
ex) { | 90 if ((int)index < (int)m_pHeader->dwStartIndex || index > m_pHeader->dwEndInd
ex) { |
92 return NULL; | 91 return NULL; |
93 } | 92 } |
94 return m_pTable + (index - m_pHeader->dwStartIndex) * m_pHeader->dwRecordSiz
e; | 93 return m_pTable + (index - m_pHeader->dwStartIndex) * m_pHeader->dwRecordSiz
e; |
95 } | 94 } |
96 #endif | |
OLD | NEW |