| 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 <cctype> | 7 #include <cctype> |
| 8 #include <cwctype> | 8 #include <cwctype> |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 131 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
| 132 #ifdef __cplusplus | 132 #ifdef __cplusplus |
| 133 extern "C" { | 133 extern "C" { |
| 134 #endif | 134 #endif |
| 135 FXSYS_FILE* FXSYS_wfopen(const FX_WCHAR* filename, const FX_WCHAR* mode) { | 135 FXSYS_FILE* FXSYS_wfopen(const FX_WCHAR* filename, const FX_WCHAR* mode) { |
| 136 return FXSYS_fopen(CFX_ByteString::FromUnicode(filename).c_str(), | 136 return FXSYS_fopen(CFX_ByteString::FromUnicode(filename).c_str(), |
| 137 CFX_ByteString::FromUnicode(mode).c_str()); | 137 CFX_ByteString::FromUnicode(mode).c_str()); |
| 138 } | 138 } |
| 139 char* FXSYS_strlwr(char* str) { | 139 char* FXSYS_strlwr(char* str) { |
| 140 if (!str) { | 140 if (!str) { |
| 141 return NULL; | 141 return nullptr; |
| 142 } | 142 } |
| 143 char* s = str; | 143 char* s = str; |
| 144 while (*str) { | 144 while (*str) { |
| 145 *str = FXSYS_tolower(*str); | 145 *str = FXSYS_tolower(*str); |
| 146 str++; | 146 str++; |
| 147 } | 147 } |
| 148 return s; | 148 return s; |
| 149 } | 149 } |
| 150 char* FXSYS_strupr(char* str) { | 150 char* FXSYS_strupr(char* str) { |
| 151 if (!str) { | 151 if (!str) { |
| 152 return NULL; | 152 return nullptr; |
| 153 } | 153 } |
| 154 char* s = str; | 154 char* s = str; |
| 155 while (*str) { | 155 while (*str) { |
| 156 *str = FXSYS_toupper(*str); | 156 *str = FXSYS_toupper(*str); |
| 157 str++; | 157 str++; |
| 158 } | 158 } |
| 159 return s; | 159 return s; |
| 160 } | 160 } |
| 161 FX_WCHAR* FXSYS_wcslwr(FX_WCHAR* str) { | 161 FX_WCHAR* FXSYS_wcslwr(FX_WCHAR* str) { |
| 162 if (!str) { | 162 if (!str) { |
| 163 return NULL; | 163 return nullptr; |
| 164 } | 164 } |
| 165 FX_WCHAR* s = str; | 165 FX_WCHAR* s = str; |
| 166 while (*str) { | 166 while (*str) { |
| 167 *str = FXSYS_tolower(*str); | 167 *str = FXSYS_tolower(*str); |
| 168 str++; | 168 str++; |
| 169 } | 169 } |
| 170 return s; | 170 return s; |
| 171 } | 171 } |
| 172 FX_WCHAR* FXSYS_wcsupr(FX_WCHAR* str) { | 172 FX_WCHAR* FXSYS_wcsupr(FX_WCHAR* str) { |
| 173 if (!str) { | 173 if (!str) { |
| 174 return NULL; | 174 return nullptr; |
| 175 } | 175 } |
| 176 FX_WCHAR* s = str; | 176 FX_WCHAR* s = str; |
| 177 while (*str) { | 177 while (*str) { |
| 178 *str = FXSYS_toupper(*str); | 178 *str = FXSYS_toupper(*str); |
| 179 str++; | 179 str++; |
| 180 } | 180 } |
| 181 return s; | 181 return s; |
| 182 } | 182 } |
| 183 int FXSYS_stricmp(const char* dst, const char* src) { | 183 int FXSYS_stricmp(const char* dst, const char* src) { |
| 184 int f, l; | 184 int f, l; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 buf[wlen] = bstr[i]; | 245 buf[wlen] = bstr[i]; |
| 246 } | 246 } |
| 247 wlen++; | 247 wlen++; |
| 248 } | 248 } |
| 249 return wlen; | 249 return wlen; |
| 250 } | 250 } |
| 251 #ifdef __cplusplus | 251 #ifdef __cplusplus |
| 252 } | 252 } |
| 253 #endif | 253 #endif |
| 254 #endif | 254 #endif |
| OLD | NEW |