summaryrefslogtreecommitdiff
path: root/xfa/fgas
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-08-11 11:24:11 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-11 11:24:11 -0700
commite0347a6408dc21b4fcf7a713de69aacb785c7230 (patch)
tree38ca627be5d72c7823926cfe0b5736888e5b4152 /xfa/fgas
parentc18ffca5a35ab4b2218fadcca4006b3ea09e7875 (diff)
downloadpdfium-e0347a6408dc21b4fcf7a713de69aacb785c7230.tar.xz
Remove fgas_system files.
The two methods in fgas_system also exist in core/fxcrt/include/fx_ext with the FXSYS_ prefix instead of FX_. Remove the fgas_system files and use the fx_ext versions instead. Review-Url: https://codereview.chromium.org/2233133002
Diffstat (limited to 'xfa/fgas')
-rw-r--r--xfa/fgas/crt/fgas_stream.cpp1
-rw-r--r--xfa/fgas/crt/fgas_system.cpp82
-rw-r--r--xfa/fgas/crt/fgas_system.h15
3 files changed, 0 insertions, 98 deletions
diff --git a/xfa/fgas/crt/fgas_stream.cpp b/xfa/fgas/crt/fgas_stream.cpp
index 25d8514257..74c19eab32 100644
--- a/xfa/fgas/crt/fgas_stream.cpp
+++ b/xfa/fgas/crt/fgas_stream.cpp
@@ -15,7 +15,6 @@
#include <memory>
#include "xfa/fgas/crt/fgas_codepage.h"
-#include "xfa/fgas/crt/fgas_system.h"
namespace {
diff --git a/xfa/fgas/crt/fgas_system.cpp b/xfa/fgas/crt/fgas_system.cpp
deleted file mode 100644
index b5cabedec5..0000000000
--- a/xfa/fgas/crt/fgas_system.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "xfa/fgas/crt/fgas_system.h"
-
-#include <algorithm>
-
-#include "core/fxcrt/include/fx_system.h"
-
-namespace {
-
-inline FX_BOOL FX_isupper(int32_t ch) {
- return ch >= 'A' && ch <= 'Z';
-}
-
-inline int32_t FX_tolower(int32_t ch) {
- return FX_isupper(ch) ? (ch + 0x20) : ch;
-}
-
-} // namespace
-
-int32_t FX_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count) {
- ASSERT(s1 && s2 && count > 0);
- FX_WCHAR wch1 = 0;
- FX_WCHAR wch2 = 0;
- while (count-- > 0) {
- wch1 = (FX_WCHAR)FX_tolower(*s1++);
- wch2 = (FX_WCHAR)FX_tolower(*s2++);
- if (wch1 != wch2) {
- break;
- }
- }
- return wch1 - wch2;
-}
-
-FX_FLOAT FX_wcstof(const FX_WCHAR* pwsStr, int32_t iLength, int32_t* pUsedLen) {
- ASSERT(pwsStr);
- if (iLength < 0) {
- iLength = FXSYS_wcslen(pwsStr);
- }
- if (iLength == 0) {
- return 0.0f;
- }
- int32_t iUsedLen = 0;
- FX_BOOL bNegtive = FALSE;
- switch (pwsStr[iUsedLen]) {
- case '-':
- bNegtive = TRUE;
- case '+':
- iUsedLen++;
- break;
- }
- FX_FLOAT fValue = 0.0f;
- while (iUsedLen < iLength) {
- FX_WCHAR wch = pwsStr[iUsedLen];
- if (wch >= L'0' && wch <= L'9') {
- fValue = fValue * 10.0f + (wch - L'0');
- } else {
- break;
- }
- iUsedLen++;
- }
- if (iUsedLen < iLength && pwsStr[iUsedLen] == L'.') {
- FX_FLOAT fPrecise = 0.1f;
- while (++iUsedLen < iLength) {
- FX_WCHAR wch = pwsStr[iUsedLen];
- if (wch >= L'0' && wch <= L'9') {
- fValue += (wch - L'0') * fPrecise;
- fPrecise *= 0.1f;
- } else {
- break;
- }
- }
- }
- if (pUsedLen) {
- *pUsedLen = iUsedLen;
- }
- return bNegtive ? -fValue : fValue;
-}
diff --git a/xfa/fgas/crt/fgas_system.h b/xfa/fgas/crt/fgas_system.h
deleted file mode 100644
index 6cf628f9d4..0000000000
--- a/xfa/fgas/crt/fgas_system.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef XFA_FGAS_CRT_FGAS_SYSTEM_H_
-#define XFA_FGAS_CRT_FGAS_SYSTEM_H_
-
-#include "core/fxcrt/include/fx_system.h"
-
-FX_FLOAT FX_wcstof(const FX_WCHAR* pwsStr, int32_t iLength, int32_t* pUsedLen);
-int32_t FX_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count);
-
-#endif // XFA_FGAS_CRT_FGAS_SYSTEM_H_