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/fxcrt/fx_basic.h" | 7 #include "../../include/fxcrt/fx_basic.h" |
8 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 8 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 #include <dirent.h> | 10 #include <dirent.h> |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 CFX_ByteString rURI; | 266 CFX_ByteString rURI; |
267 int nLength = bsURI.GetLength(); | 267 int nLength = bsURI.GetLength(); |
268 for (int i = 0; i < nLength; i++) { | 268 for (int i = 0; i < nLength; i++) { |
269 if (i < nLength - 2 && bsURI[i] == '%' && FX_IsXDigit(bsURI[i + 1]) && F
X_IsXDigit(bsURI[i + 2])) { | 269 if (i < nLength - 2 && bsURI[i] == '%' && FX_IsXDigit(bsURI[i + 1]) && F
X_IsXDigit(bsURI[i + 2])) { |
270 rURI += (FX_HexToI(bsURI[i + 1]) << 4 | FX_HexToI(bsURI[i + 2])); | 270 rURI += (FX_HexToI(bsURI[i + 1]) << 4 | FX_HexToI(bsURI[i + 2])); |
271 i += 2; | 271 i += 2; |
272 } else { | 272 } else { |
273 rURI += bsURI[i]; | 273 rURI += bsURI[i]; |
274 } | 274 } |
275 } | 275 } |
276 return CFX_WideString::FromUTF8(rURI); | 276 return CFX_WideString::FromUTF8(rURI, rURI.GetLength()); |
277 } | 277 } |
278 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 278 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
279 class CFindFileData : public CFX_Object | 279 class CFindFileData : public CFX_Object |
280 { | 280 { |
281 public: | 281 public: |
282 virtual ~CFindFileData() {} | 282 virtual ~CFindFileData() {} |
283 HANDLE m_Handle; | 283 HANDLE m_Handle; |
284 FX_BOOL m_bEnd; | 284 FX_BOOL m_bEnd; |
285 }; | 285 }; |
286 class CFindFileDataA : public CFindFileData | 286 class CFindFileDataA : public CFindFileData |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 #endif | 435 #endif |
436 } | 436 } |
437 FX_WCHAR FX_GetFolderSeparator() | 437 FX_WCHAR FX_GetFolderSeparator() |
438 { | 438 { |
439 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 439 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
440 return '\\'; | 440 return '\\'; |
441 #else | 441 #else |
442 return '/'; | 442 return '/'; |
443 #endif | 443 #endif |
444 } | 444 } |
OLD | NEW |