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

Side by Side Diff: core/src/fxcrt/fx_basic_gcc.cpp

Issue 1253603002: Fix FX_BOOL type mismatches. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Public API Created 5 years, 5 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/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp ('k') | core/src/fxge/ge/fx_ge_fontmap.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 #include <limits> 7 #include <limits>
8 8
9 #include "../../include/fxcrt/fx_ext.h" 9 #include "../../include/fxcrt/fx_ext.h"
10 #include "../../include/fxcrt/fx_string.h" 10 #include "../../include/fxcrt/fx_string.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 #ifdef __cplusplus 202 #ifdef __cplusplus
203 } 203 }
204 #endif 204 #endif
205 #endif 205 #endif
206 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ 206 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
207 #ifdef __cplusplus 207 #ifdef __cplusplus
208 extern "C" { 208 extern "C" {
209 #endif 209 #endif
210 int FXSYS_WideCharToMultiByte(FX_DWORD codepage, FX_DWORD dwFlags, const FX_WCHA R* wstr, int wlen, 210 int FXSYS_WideCharToMultiByte(FX_DWORD codepage, FX_DWORD dwFlags, const FX_WCHA R* wstr, int wlen,
211 FX_CHAR* buf, int buflen, const FX_CHAR* default_s tr, FX_BOOL* pUseDefault) 211 FX_CHAR* buf, int buflen, const FX_CHAR* default_s tr, int* pUseDefault)
212 { 212 {
213 int len = 0; 213 int len = 0;
214 for (int i = 0; i < wlen; i ++) { 214 for (int i = 0; i < wlen; i ++) {
215 if (wstr[i] < 0x100) { 215 if (wstr[i] < 0x100) {
216 if (buf && len < buflen) { 216 if (buf && len < buflen) {
217 buf[len] = (FX_CHAR)wstr[i]; 217 buf[len] = (FX_CHAR)wstr[i];
218 } 218 }
219 len ++; 219 len ++;
220 } 220 }
221 } 221 }
222 return len; 222 return len;
223 } 223 }
224 int FXSYS_MultiByteToWideChar(FX_DWORD codepage, FX_DWORD dwFlags, const FX_CHAR * bstr, int blen, 224 int FXSYS_MultiByteToWideChar(FX_DWORD codepage, FX_DWORD dwFlags, const FX_CHAR * bstr, int blen,
225 FX_WCHAR* buf, int buflen) 225 FX_WCHAR* buf, int buflen)
226 { 226 {
227 int wlen = 0; 227 int wlen = 0;
228 for (int i = 0; i < blen; i ++) { 228 for (int i = 0; i < blen; i ++) {
229 if (buf && wlen < buflen) { 229 if (buf && wlen < buflen) {
230 buf[wlen] = bstr[i]; 230 buf[wlen] = bstr[i];
231 } 231 }
232 wlen ++; 232 wlen ++;
233 } 233 }
234 return wlen; 234 return wlen;
235 } 235 }
236 #ifdef __cplusplus 236 #ifdef __cplusplus
237 } 237 }
238 #endif 238 #endif
239 #endif 239 #endif
OLDNEW
« no previous file with comments | « core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp ('k') | core/src/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698