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

Unified Diff: xfa/fgas/crt/fgas_system.cpp

Issue 1992033002: fgas/ code cleanup. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: xfa/fgas/crt/fgas_system.cpp
diff --git a/xfa/fgas/crt/fgas_system.cpp b/xfa/fgas/crt/fgas_system.cpp
index 3ab39268efdf98d6c76498adb85bb348fcbdfee9..43d55b108a433840dc4cbd977cf7f0f88e7c5498 100644
--- a/xfa/fgas/crt/fgas_system.cpp
+++ b/xfa/fgas/crt/fgas_system.cpp
@@ -10,13 +10,6 @@
#include "core/fxcrt/include/fx_system.h"
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN32_MOBILE_ || \
- _FX_OS_ == _FX_WIN64_
-#include <io.h>
-#elif _FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_LINUX_Mini_
-#include <sys/times.h>
-#endif
-
namespace {
inline FX_BOOL FX_isupper(int32_t ch) {
@@ -43,35 +36,6 @@ int32_t FX_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count) {
return wch1 - wch2;
}
-int32_t FX_filelength(FXSYS_FILE* file) {
- ASSERT(file != NULL);
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_
- return _filelength(_fileno(file));
-#else
- int32_t iPos = FXSYS_ftell(file);
- FXSYS_fseek(file, 0, FXSYS_SEEK_END);
- int32_t iLen = FXSYS_ftell(file);
- FXSYS_fseek(file, iPos, FXSYS_SEEK_SET);
- return iLen;
-#endif
-}
-
-FX_BOOL FX_fsetsize(FXSYS_FILE* file, int32_t size) {
- ASSERT(file != NULL);
-#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_
- return _chsize(_fileno(file), size) == 0;
-#elif _FX_OS_ == _FX_WIN32_MOBILE_
- HANDLE hFile = _fileno(file);
- uint32_t dwPos = ::SetFilePointer(hFile, 0, 0, FILE_CURRENT);
- ::SetFilePointer(hFile, size, 0, FILE_BEGIN);
- FX_BOOL bRet = ::SetEndOfFile(hFile);
- ::SetFilePointer(hFile, (int32_t)dwPos, 0, FILE_BEGIN);
- return bRet;
-#else
- return FALSE;
-#endif
-}
-
FX_FLOAT FX_wcstof(const FX_WCHAR* pwsStr, int32_t iLength, int32_t* pUsedLen) {
ASSERT(pwsStr != NULL);
if (iLength < 0) {

Powered by Google App Engine
This is Rietveld 408576698