From 1c9ad7ec7353cccabb6881fd22b116daa3dcbb84 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 5 Sep 2017 11:19:50 -0400 Subject: Split fx_guid from fx_extension This CL splits the GUID code out of fx_extension into an fx_guid.h file. Change-Id: I915538ff98601efb07595264eff6435729193177 Reviewed-on: https://pdfium-review.googlesource.com/13090 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- core/fxcrt/fx_extension.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'core/fxcrt/fx_extension.cpp') diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp index 35a8442f40..7f73a4ccad 100644 --- a/core/fxcrt/fx_extension.cpp +++ b/core/fxcrt/fx_extension.cpp @@ -9,8 +9,6 @@ #include #include -#include "core/fxcrt/fx_rand.h" - float FXSYS_wcstof(const wchar_t* pwsStr, int32_t iLength, int32_t* pUsedLen) { ASSERT(pwsStr); if (iLength < 0) @@ -124,28 +122,6 @@ size_t FXSYS_ToUTF16BE(uint32_t unicode, char* buf) { return 8; } -#ifdef PDF_ENABLE_XFA -void FX_GUID_CreateV4(FX_GUID* pGUID) { - FX_Random_GenerateMT((uint32_t*)pGUID, 4); - uint8_t& b = ((uint8_t*)pGUID)[6]; - b = (b & 0x0F) | 0x40; -} - -CFX_ByteString FX_GUID_ToString(const FX_GUID* pGUID, bool bSeparator) { - CFX_ByteString bsStr; - char* pBuf = bsStr.GetBuffer(40); - for (int32_t i = 0; i < 16; i++) { - uint8_t b = reinterpret_cast(pGUID)[i]; - FXSYS_IntToTwoHexChars(b, pBuf); - pBuf += 2; - if (bSeparator && (i == 3 || i == 5 || i == 7 || i == 9)) - *pBuf++ = L'-'; - } - bsStr.ReleaseBuffer(bSeparator ? 36 : 32); - return bsStr; -} -#endif // PDF_ENABLE_XFA - uint32_t GetBits32(const uint8_t* pData, int bitpos, int nbits) { ASSERT(0 < nbits && nbits <= 32); const uint8_t* dataPtr = &pData[bitpos / 8]; -- cgit v1.2.3