summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_ext.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-20 13:13:04 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-20 17:49:41 +0000
commitcfb1944e245e20fe2ce0e94feebc06526db34fa1 (patch)
tree6728e3ebca9e53dc97a18e1f5f37c3d53d9bb404 /core/fxcrt/fx_ext.h
parent6864bf8c4fbcac0833a77d044f17f4100d504f2a (diff)
downloadpdfium-cfb1944e245e20fe2ce0e94feebc06526db34fa1.tar.xz
Cleanup the fx_extension code.
This CL cleans up the fx_extension file. The stream code was moved to fx_stream. IFX_FileAccess was removed and CFX_CRTFileAccess split to its own file. Code shuffled from header to cpp file. Change-Id: I700fdfcc9797cf4e8050cd9ba010ad8854feefbf Reviewed-on: https://pdfium-review.googlesource.com/4371 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_ext.h')
-rw-r--r--core/fxcrt/fx_ext.h108
1 files changed, 0 insertions, 108 deletions
diff --git a/core/fxcrt/fx_ext.h b/core/fxcrt/fx_ext.h
deleted file mode 100644
index 8224087d88..0000000000
--- a/core/fxcrt/fx_ext.h
+++ /dev/null
@@ -1,108 +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 CORE_FXCRT_FX_EXT_H_
-#define CORE_FXCRT_FX_EXT_H_
-
-#include <cctype>
-#include <cwctype>
-#include <memory>
-
-#include "core/fxcrt/fx_basic.h"
-
-#define FX_INVALID_OFFSET static_cast<uint32_t>(-1)
-
-float FXSYS_strtof(const char* pcsStr,
- int32_t iLength = -1,
- int32_t* pUsedLen = nullptr);
-float FXSYS_wcstof(const wchar_t* pwsStr,
- int32_t iLength = -1,
- int32_t* pUsedLen = nullptr);
-wchar_t* FXSYS_wcsncpy(wchar_t* dstStr, const wchar_t* srcStr, size_t count);
-int32_t FXSYS_wcsnicmp(const wchar_t* s1, const wchar_t* s2, size_t count);
-int32_t FXSYS_strnicmp(const char* s1, const char* s2, size_t count);
-
-inline bool FXSYS_islower(int32_t ch) {
- return ch >= 'a' && ch <= 'z';
-}
-
-inline bool FXSYS_isupper(int32_t ch) {
- return ch >= 'A' && ch <= 'Z';
-}
-
-inline int32_t FXSYS_tolower(int32_t ch) {
- return ch < 'A' || ch > 'Z' ? ch : (ch + 0x20);
-}
-
-inline int32_t FXSYS_toupper(int32_t ch) {
- return ch < 'a' || ch > 'z' ? ch : (ch - 0x20);
-}
-
-inline bool FXSYS_iswalpha(wchar_t wch) {
- return (wch >= L'A' && wch <= L'Z') || (wch >= L'a' && wch <= L'z');
-}
-
-inline bool FXSYS_iswdigit(wchar_t wch) {
- return wch >= L'0' && wch <= L'9';
-}
-
-inline bool FXSYS_iswalnum(wchar_t wch) {
- return FXSYS_iswalpha(wch) || FXSYS_iswdigit(wch);
-}
-
-inline bool FXSYS_iswspace(wchar_t c) {
- return (c == 0x20) || (c == 0x0d) || (c == 0x0a) || (c == 0x09);
-}
-
-inline bool FXSYS_isHexDigit(const char c) {
- return !((c & 0x80) || !std::isxdigit(c));
-}
-
-inline int FXSYS_toHexDigit(const char c) {
- if (!FXSYS_isHexDigit(c))
- return 0;
- char upchar = std::toupper(c);
- return upchar > '9' ? upchar - 'A' + 10 : upchar - '0';
-}
-
-inline bool FXSYS_isDecimalDigit(const char c) {
- return !((c & 0x80) || !std::isdigit(c));
-}
-
-inline bool FXSYS_isDecimalDigit(const wchar_t c) {
- return !!std::iswdigit(c);
-}
-
-inline int FXSYS_toDecimalDigit(const char c) {
- return FXSYS_isDecimalDigit(c) ? c - '0' : 0;
-}
-
-inline int FXSYS_toDecimalDigit(const wchar_t c) {
- return std::iswdigit(c) ? c - L'0' : 0;
-}
-
-float FXSYS_FractionalScale(size_t scale_factor, int value);
-int FXSYS_FractionalScaleCount();
-
-void* FX_Random_MT_Start(uint32_t dwSeed);
-void FX_Random_MT_Close(void* pContext);
-uint32_t FX_Random_MT_Generate(void* pContext);
-void FX_Random_GenerateBase(uint32_t* pBuffer, int32_t iCount);
-void FX_Random_GenerateMT(uint32_t* pBuffer, int32_t iCount);
-void FX_Random_GenerateCrypto(uint32_t* pBuffer, int32_t iCount);
-
-#ifdef PDF_ENABLE_XFA
-struct FX_GUID {
- uint32_t data1;
- uint16_t data2;
- uint16_t data3;
- uint8_t data4[8];
-};
-void FX_GUID_CreateV4(FX_GUID* pGUID);
-CFX_ByteString FX_GUID_ToString(const FX_GUID* pGUID, bool bSeparator = true);
-#endif // PDF_ENABLE_XFA
-
-#endif // CORE_FXCRT_FX_EXT_H_