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

Side by Side Diff: xfa/fgas/crt/fgas_system.cpp

Issue 1842633004: Fix CData parsing in CFDE_XMLSyntaxParser. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix windows xfa Created 4 years, 8 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 | « xfa/fgas/crt/fgas_stream.cpp ('k') | no next file » | 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 "xfa/fgas/crt/fgas_system.h" 7 #include "xfa/fgas/crt/fgas_system.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 inline int32_t FX_tolower(int32_t ch) { 26 inline int32_t FX_tolower(int32_t ch) {
27 return FX_isupper(ch) ? (ch + 0x20) : ch; 27 return FX_isupper(ch) ? (ch + 0x20) : ch;
28 } 28 }
29 29
30 } // namespace 30 } // namespace
31 31
32 int32_t FX_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count) { 32 int32_t FX_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count) {
33 FXSYS_assert(s1 != NULL && s2 != NULL && count > 0); 33 FXSYS_assert(s1 != NULL && s2 != NULL && count > 0);
34 FX_WCHAR wch1 = 0, wch2 = 0; 34 FX_WCHAR wch1 = 0;
35 FX_WCHAR wch2 = 0;
35 while (count-- > 0) { 36 while (count-- > 0) {
36 wch1 = (FX_WCHAR)FX_tolower(*s1++); 37 wch1 = (FX_WCHAR)FX_tolower(*s1++);
37 wch2 = (FX_WCHAR)FX_tolower(*s2++); 38 wch2 = (FX_WCHAR)FX_tolower(*s2++);
38 if (wch1 != wch2) { 39 if (wch1 != wch2) {
39 break; 40 break;
40 } 41 }
41 } 42 }
42 return wch1 - wch2; 43 return wch1 - wch2;
43 } 44 }
44 45
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } else { 109 } else {
109 break; 110 break;
110 } 111 }
111 } 112 }
112 } 113 }
113 if (pUsedLen) { 114 if (pUsedLen) {
114 *pUsedLen = iUsedLen; 115 *pUsedLen = iUsedLen;
115 } 116 }
116 return bNegtive ? -fValue : fValue; 117 return bNegtive ? -fValue : fValue;
117 } 118 }
OLDNEW
« no previous file with comments | « xfa/fgas/crt/fgas_stream.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698