summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-03 15:05:11 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-03 20:39:56 +0000
commit1c5d0b48ec7a6443ba72fec2a58a65fc6d694aca (patch)
tree315955cce6b29093dcddfc48c0811957a172bedf /core/fpdfapi
parent2ae80f52cec81c080515724f99deb06b2fee3cc9 (diff)
downloadpdfium-1c5d0b48ec7a6443ba72fec2a58a65fc6d694aca.tar.xz
Drop FXSYS_ from mem methods
This Cl drops the FXSYS_ from mem methods which are the same on all platforms. Bug: pdfium:694 Change-Id: I9d5ae905997dbaaec5aa0b2ae4c07358ed9c6236 Reviewed-on: https://pdfium-review.googlesource.com/3613 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/edit/fpdf_edit_create.cpp6
-rw-r--r--core/fpdfapi/font/cpdf_fontencoding.cpp7
-rw-r--r--core/fpdfapi/font/cpdf_simplefont.cpp6
-rw-r--r--core/fpdfapi/font/cpdf_type1font.cpp12
-rw-r--r--core/fpdfapi/font/cpdf_type3font.cpp2
-rw-r--r--core/fpdfapi/font/fpdf_font.cpp4
-rw-r--r--core/fpdfapi/font/fpdf_font_cid.cpp10
-rw-r--r--core/fpdfapi/page/cpdf_color.cpp6
-rw-r--r--core/fpdfapi/page/cpdf_contentparser.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_image.cpp6
-rw-r--r--core/fpdfapi/page/cpdf_meshstream.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp4
-rw-r--r--core/fpdfapi/page/cpdf_streamparser.cpp6
-rw-r--r--core/fpdfapi/page/fpdf_page_colors.cpp3
-rw-r--r--core/fpdfapi/page/fpdf_page_func.cpp4
-rw-r--r--core/fpdfapi/parser/cpdf_crypto_handler.cpp31
-rw-r--r--core/fpdfapi/parser/cpdf_document.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_object_unittest.cpp4
-rw-r--r--core/fpdfapi/parser/cpdf_parser.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_security_handler.cpp46
-rw-r--r--core/fpdfapi/parser/cpdf_stream.cpp6
-rw-r--r--core/fpdfapi/parser/cpdf_stream_acc.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_syntax_parser.cpp11
-rw-r--r--core/fpdfapi/parser/fpdf_parser_decode.cpp8
-rw-r--r--core/fpdfapi/render/cpdf_dibsource.cpp10
-rw-r--r--core/fpdfapi/render/cpdf_docrenderdata.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp18
27 files changed, 109 insertions, 113 deletions
diff --git a/core/fpdfapi/edit/fpdf_edit_create.cpp b/core/fpdfapi/edit/fpdf_edit_create.cpp
index e6fe6b4a59..59d3de35a9 100644
--- a/core/fpdfapi/edit/fpdf_edit_create.cpp
+++ b/core/fpdfapi/edit/fpdf_edit_create.cpp
@@ -778,7 +778,7 @@ bool CPDF_XRefStream::GenerateXRefStream(CPDF_Creator* pCreator, bool bEOF) {
return false;
}
char offset_buf[20];
- FXSYS_memset(offset_buf, 0, sizeof(offset_buf));
+ memset(offset_buf, 0, sizeof(offset_buf));
FXSYS_i64toa(m_PrevOffset, offset_buf, 10);
int32_t offset_len = (int32_t)FXSYS_strlen(offset_buf);
if (pFile->AppendBlock(offset_buf, offset_len) < 0) {
@@ -1715,7 +1715,7 @@ int32_t CPDF_Creator::WriteDoc_Stage4(IFX_Pause* pPause) {
return -1;
char offset_buf[20];
- FXSYS_memset(offset_buf, 0, sizeof(offset_buf));
+ memset(offset_buf, 0, sizeof(offset_buf));
FXSYS_i64toa(prev, offset_buf, 10);
if (m_File.AppendBlock(offset_buf, FXSYS_strlen(offset_buf)) < 0)
return -1;
@@ -1785,7 +1785,7 @@ int32_t CPDF_Creator::WriteDoc_Stage4(IFX_Pause* pPause) {
return -1;
char offset_buf[20];
- FXSYS_memset(offset_buf, 0, sizeof(offset_buf));
+ memset(offset_buf, 0, sizeof(offset_buf));
FXSYS_i64toa(m_XrefStart, offset_buf, 10);
if (m_File.AppendBlock(offset_buf, FXSYS_strlen(offset_buf)) < 0)
return -1;
diff --git a/core/fpdfapi/font/cpdf_fontencoding.cpp b/core/fpdfapi/font/cpdf_fontencoding.cpp
index be4eaff13b..2cc6445ab2 100644
--- a/core/fpdfapi/font/cpdf_fontencoding.cpp
+++ b/core/fpdfapi/font/cpdf_fontencoding.cpp
@@ -1646,7 +1646,7 @@ uint32_t PDF_FindCode(const uint16_t* pCodes, uint16_t unicode) {
} // namespace
CPDF_FontEncoding::CPDF_FontEncoding() {
- FXSYS_memset(m_Unicodes, 0, sizeof(m_Unicodes));
+ memset(m_Unicodes, 0, sizeof(m_Unicodes));
}
int CPDF_FontEncoding::CharCodeFromUnicode(wchar_t unicode) const {
@@ -1660,7 +1660,7 @@ int CPDF_FontEncoding::CharCodeFromUnicode(wchar_t unicode) const {
CPDF_FontEncoding::CPDF_FontEncoding(int PredefinedEncoding) {
const uint16_t* pSrc = PDF_UnicodesForPredefinedCharSet(PredefinedEncoding);
if (!pSrc) {
- FXSYS_memset(m_Unicodes, 0, sizeof(m_Unicodes));
+ memset(m_Unicodes, 0, sizeof(m_Unicodes));
} else {
for (int i = 0; i < 256; i++)
m_Unicodes[i] = pSrc[i];
@@ -1668,8 +1668,7 @@ CPDF_FontEncoding::CPDF_FontEncoding(int PredefinedEncoding) {
}
bool CPDF_FontEncoding::IsIdentical(CPDF_FontEncoding* pAnother) const {
- return FXSYS_memcmp(m_Unicodes, pAnother->m_Unicodes, sizeof(m_Unicodes)) ==
- 0;
+ return memcmp(m_Unicodes, pAnother->m_Unicodes, sizeof(m_Unicodes)) == 0;
}
std::unique_ptr<CPDF_Object> CPDF_FontEncoding::Realize(
diff --git a/core/fpdfapi/font/cpdf_simplefont.cpp b/core/fpdfapi/font/cpdf_simplefont.cpp
index 94a690f221..a3597824bd 100644
--- a/core/fpdfapi/font/cpdf_simplefont.cpp
+++ b/core/fpdfapi/font/cpdf_simplefont.cpp
@@ -13,9 +13,9 @@
#include "third_party/base/numerics/safe_math.h"
CPDF_SimpleFont::CPDF_SimpleFont() : m_BaseEncoding(PDFFONT_ENCODING_BUILTIN) {
- FXSYS_memset(m_CharWidth, 0xff, sizeof(m_CharWidth));
- FXSYS_memset(m_GlyphIndex, 0xff, sizeof(m_GlyphIndex));
- FXSYS_memset(m_ExtGID, 0xff, sizeof(m_ExtGID));
+ memset(m_CharWidth, 0xff, sizeof(m_CharWidth));
+ memset(m_GlyphIndex, 0xff, sizeof(m_GlyphIndex));
+ memset(m_ExtGID, 0xff, sizeof(m_ExtGID));
for (size_t i = 0; i < FX_ArraySize(m_CharBBox); ++i)
m_CharBBox[i] = FX_RECT(-1, -1, -1, -1);
}
diff --git a/core/fpdfapi/font/cpdf_type1font.cpp b/core/fpdfapi/font/cpdf_type1font.cpp
index a264a780c3..e3d96dad37 100644
--- a/core/fpdfapi/font/cpdf_type1font.cpp
+++ b/core/fpdfapi/font/cpdf_type1font.cpp
@@ -151,7 +151,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
if (bGotOne) {
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if (!bCoreText)
- FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256);
+ memcpy(m_ExtGID, m_GlyphIndex, 256);
#endif
return;
}
@@ -182,7 +182,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if (!bCoreText)
- FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256);
+ memcpy(m_ExtGID, m_GlyphIndex, 256);
#endif
return;
}
@@ -207,7 +207,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
FT_UnicodeFromCharCode(PDFFONT_ENCODING_STANDARD, charcode);
}
char name_glyph[256];
- FXSYS_memset(name_glyph, 0, sizeof(name_glyph));
+ memset(name_glyph, 0, sizeof(name_glyph));
FXFT_Get_Glyph_Name(m_Font.GetFace(), m_GlyphIndex[charcode],
name_glyph, 256);
name_glyph[255] = 0;
@@ -272,7 +272,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
FT_UnicodeFromCharCode(PDFFONT_ENCODING_STANDARD, charcode);
if (unicode == 0) {
char name_glyph[256];
- FXSYS_memset(name_glyph, 0, sizeof(name_glyph));
+ memset(name_glyph, 0, sizeof(name_glyph));
FXFT_Get_Glyph_Name(m_Font.GetFace(), m_GlyphIndex[charcode],
name_glyph, 256);
name_glyph[255] = 0;
@@ -286,7 +286,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if (!bCoreText)
- FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256);
+ memcpy(m_ExtGID, m_GlyphIndex, 256);
#endif
return;
@@ -315,7 +315,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if (!bCoreText)
- FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256);
+ memcpy(m_ExtGID, m_GlyphIndex, 256);
#endif
}
diff --git a/core/fpdfapi/font/cpdf_type3font.cpp b/core/fpdfapi/font/cpdf_type3font.cpp
index 59702aed6a..da3b183c13 100644
--- a/core/fpdfapi/font/cpdf_type3font.cpp
+++ b/core/fpdfapi/font/cpdf_type3font.cpp
@@ -24,7 +24,7 @@ CPDF_Type3Font::CPDF_Type3Font()
m_pPageResources(nullptr),
m_pFontResources(nullptr),
m_CharLoadingDepth(0) {
- FXSYS_memset(m_CharWidthL, 0, sizeof(m_CharWidthL));
+ memset(m_CharWidthL, 0, sizeof(m_CharWidthL));
}
CPDF_Type3Font::~CPDF_Type3Font() {}
diff --git a/core/fpdfapi/font/fpdf_font.cpp b/core/fpdfapi/font/fpdf_font.cpp
index 706ae62cd9..23b46759d8 100644
--- a/core/fpdfapi/font/fpdf_font.cpp
+++ b/core/fpdfapi/font/fpdf_font.cpp
@@ -71,8 +71,8 @@ CPDF_Font* CFX_StockFontArray::SetFont(uint32_t index,
}
CPDF_FontGlobals::CPDF_FontGlobals() {
- FXSYS_memset(m_EmbeddedCharsets, 0, sizeof(m_EmbeddedCharsets));
- FXSYS_memset(m_EmbeddedToUnicodes, 0, sizeof(m_EmbeddedToUnicodes));
+ memset(m_EmbeddedCharsets, 0, sizeof(m_EmbeddedCharsets));
+ memset(m_EmbeddedToUnicodes, 0, sizeof(m_EmbeddedToUnicodes));
}
CPDF_FontGlobals::~CPDF_FontGlobals() {}
diff --git a/core/fpdfapi/font/fpdf_font_cid.cpp b/core/fpdfapi/font/fpdf_font_cid.cpp
index ddc0c12b7d..64b041738e 100644
--- a/core/fpdfapi/font/fpdf_font_cid.cpp
+++ b/core/fpdfapi/font/fpdf_font_cid.cpp
@@ -413,8 +413,8 @@ void CPDF_CMapParser::ParseWord(const CFX_ByteStringC& word) {
FX_Free(m_pCMap->m_pLeadingBytes);
m_pCMap->m_pLeadingBytes =
FX_Alloc2D(uint8_t, nSegs, sizeof(CMap_CodeRange));
- FXSYS_memcpy(m_pCMap->m_pLeadingBytes, m_CodeRanges.data(),
- nSegs * sizeof(CMap_CodeRange));
+ memcpy(m_pCMap->m_pLeadingBytes, m_CodeRanges.data(),
+ nSegs * sizeof(CMap_CodeRange));
} else if (nSegs == 1) {
m_pCMap->m_CodingScheme = (m_CodeRanges[0].m_CharSize == 2)
? CPDF_CMap::TwoBytes
@@ -577,8 +577,8 @@ void CPDF_CMap::LoadEmbedded(const uint8_t* pData, uint32_t size) {
if (m_CodingScheme == MixedFourBytes && parser.m_AddMaps.GetSize()) {
m_pAddMapping = FX_Alloc(uint8_t, parser.m_AddMaps.GetSize() + 4);
*(uint32_t*)m_pAddMapping = parser.m_AddMaps.GetSize() / 8;
- FXSYS_memcpy(m_pAddMapping + 4, parser.m_AddMaps.GetBuffer(),
- parser.m_AddMaps.GetSize());
+ memcpy(m_pAddMapping + 4, parser.m_AddMaps.GetBuffer(),
+ parser.m_AddMaps.GetSize());
FXSYS_qsort(m_pAddMapping + 4, parser.m_AddMaps.GetSize() / 8, 8,
CompareDWORD);
}
@@ -720,7 +720,7 @@ int CPDF_CMap::AppendChar(char* str, uint32_t charcode) const {
iSize = 1;
}
if (iSize > 1) {
- FXSYS_memset(str, 0, sizeof(uint8_t) * iSize);
+ memset(str, 0, sizeof(uint8_t) * iSize);
}
str[iSize - 1] = (uint8_t)charcode;
return iSize;
diff --git a/core/fpdfapi/page/cpdf_color.cpp b/core/fpdfapi/page/cpdf_color.cpp
index 46771513f4..f0e433c243 100644
--- a/core/fpdfapi/page/cpdf_color.cpp
+++ b/core/fpdfapi/page/cpdf_color.cpp
@@ -71,7 +71,7 @@ void CPDF_Color::SetValue(float* comps) {
if (!m_pBuffer)
return;
if (m_pCS->GetFamily() != PDFCS_PATTERN)
- FXSYS_memcpy(m_pBuffer, comps, m_pCS->CountComponents() * sizeof(float));
+ memcpy(m_pBuffer, comps, m_pCS->CountComponents() * sizeof(float));
}
void CPDF_Color::SetValue(CPDF_Pattern* pPattern, float* comps, int ncomps) {
@@ -94,7 +94,7 @@ void CPDF_Color::SetValue(CPDF_Pattern* pPattern, float* comps, int ncomps) {
pvalue->m_nComps = ncomps;
pvalue->m_pPattern = pPattern;
if (ncomps)
- FXSYS_memcpy(pvalue->m_Comps, comps, ncomps * sizeof(float));
+ memcpy(pvalue->m_Comps, comps, ncomps * sizeof(float));
pvalue->m_pCountedPattern = nullptr;
if (pPattern && pPattern->document()) {
@@ -120,7 +120,7 @@ void CPDF_Color::Copy(const CPDF_Color* pSrc) {
return;
m_pBuffer = m_pCS->CreateBuf();
- FXSYS_memcpy(m_pBuffer, pSrc->m_pBuffer, m_pCS->GetBufSize());
+ memcpy(m_pBuffer, pSrc->m_pBuffer, m_pCS->GetBufSize());
if (m_pCS->GetFamily() != PDFCS_PATTERN)
return;
diff --git a/core/fpdfapi/page/cpdf_contentparser.cpp b/core/fpdfapi/page/cpdf_contentparser.cpp
index 7ceb509348..46e2c52c75 100644
--- a/core/fpdfapi/page/cpdf_contentparser.cpp
+++ b/core/fpdfapi/page/cpdf_contentparser.cpp
@@ -142,7 +142,7 @@ void CPDF_ContentParser::Continue(IFX_Pause* pPause) {
m_pData = FX_Alloc(uint8_t, m_Size);
uint32_t pos = 0;
for (const auto& stream : m_StreamArray) {
- FXSYS_memcpy(m_pData + pos, stream->GetData(), stream->GetSize());
+ memcpy(m_pData + pos, stream->GetData(), stream->GetSize());
pos += stream->GetSize();
m_pData[pos++] = ' ';
}
diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp
index 4fc1c344ef..da49fab8b1 100644
--- a/core/fpdfapi/page/cpdf_image.cpp
+++ b/core/fpdfapi/page/cpdf_image.cpp
@@ -269,8 +269,8 @@ void CPDF_Image::SetImage(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) {
mask_buf.reset(FX_Alloc2D(uint8_t, maskHeight, maskWidth));
mask_size = maskHeight * maskWidth; // Safe since checked alloc returned.
for (int32_t a = 0; a < maskHeight; a++) {
- FXSYS_memcpy(mask_buf.get() + a * maskWidth,
- pMaskBitmap->GetScanline(a), maskWidth);
+ memcpy(mask_buf.get() + a * maskWidth, pMaskBitmap->GetScanline(a),
+ maskWidth);
}
}
pMaskDict->SetNewFor<CPDF_Number>("Length", mask_size);
@@ -288,7 +288,7 @@ void CPDF_Image::SetImage(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap) {
uint8_t* pDest = dest_buf;
if (bCopyWithoutAlpha) {
for (int32_t i = 0; i < BitmapHeight; i++) {
- FXSYS_memcpy(pDest, src_buf, dest_pitch);
+ memcpy(pDest, src_buf, dest_pitch);
pDest += dest_pitch;
src_buf += src_pitch;
}
diff --git a/core/fpdfapi/page/cpdf_meshstream.cpp b/core/fpdfapi/page/cpdf_meshstream.cpp
index c0074f84cc..b0a21c627a 100644
--- a/core/fpdfapi/page/cpdf_meshstream.cpp
+++ b/core/fpdfapi/page/cpdf_meshstream.cpp
@@ -210,7 +210,7 @@ std::tuple<float, float, float> CPDF_MeshStream::ReadColor() {
}
float result[kMaxComponents];
- FXSYS_memset(result, 0, sizeof(result));
+ memset(result, 0, sizeof(result));
int nResults;
for (const auto& func : m_funcs) {
if (func && func->CountOutputs() <= kMaxComponents)
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 59de3c50cb..30686133c2 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -326,11 +326,11 @@ void CPDF_StreamContentParser::AddNameParam(const CFX_ByteStringC& bsName) {
} else {
param.m_Type = ContentParam::NAME;
if (bsName.Find('#') == -1) {
- FXSYS_memcpy(param.m_Name.m_Buffer, bsName.raw_str(), bsName.GetLength());
+ memcpy(param.m_Name.m_Buffer, bsName.raw_str(), bsName.GetLength());
param.m_Name.m_Len = bsName.GetLength();
} else {
CFX_ByteString str = PDF_NameDecode(bsName);
- FXSYS_memcpy(param.m_Name.m_Buffer, str.c_str(), str.GetLength());
+ memcpy(param.m_Name.m_Buffer, str.c_str(), str.GetLength());
param.m_Name.m_Len = str.GetLength();
}
}
diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp
index f3a04fb117..3c4e534116 100644
--- a/core/fpdfapi/page/cpdf_streamparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamparser.cpp
@@ -53,7 +53,7 @@ uint32_t DecodeAllScanlines(std::unique_ptr<CCodec_ScanlineDecoder> pDecoder,
if (!pLine)
break;
- FXSYS_memcpy(dest_buf + row * pitch, pLine, pitch);
+ memcpy(dest_buf + row * pitch, pLine, pitch);
}
return pDecoder->GetSrcOffset();
}
@@ -184,7 +184,7 @@ std::unique_ptr<CPDF_Stream> CPDF_StreamParser::ReadInlineStream(
if (OrigSize > m_Size - m_Pos)
OrigSize = m_Size - m_Pos;
pData.reset(FX_Alloc(uint8_t, OrigSize));
- FXSYS_memcpy(pData.get(), m_pBuf + m_Pos, OrigSize);
+ memcpy(pData.get(), m_pBuf + m_Pos, OrigSize);
dwStreamSize = OrigSize;
m_Pos += OrigSize;
} else {
@@ -217,7 +217,7 @@ std::unique_ptr<CPDF_Stream> CPDF_StreamParser::ReadInlineStream(
}
m_Pos = dwSavePos;
pData.reset(FX_Alloc(uint8_t, dwStreamSize));
- FXSYS_memcpy(pData.get(), m_pBuf + m_Pos, dwStreamSize);
+ memcpy(pData.get(), m_pBuf + m_Pos, dwStreamSize);
m_Pos += dwStreamSize;
}
pDict->SetNewFor<CPDF_Number>("Length", (int)dwStreamSize);
diff --git a/core/fpdfapi/page/fpdf_page_colors.cpp b/core/fpdfapi/page/fpdf_page_colors.cpp
index adee5ff84b..ffb8da3a10 100644
--- a/core/fpdfapi/page/fpdf_page_colors.cpp
+++ b/core/fpdfapi/page/fpdf_page_colors.cpp
@@ -27,8 +27,7 @@ float NormalizeChannel(float fVal) {
}
bool DetectSRGB(const uint8_t* pData, uint32_t dwSize) {
- return dwSize == 3144 &&
- FXSYS_memcmp(pData + 0x190, "sRGB IEC61966-2.1", 17) == 0;
+ return dwSize == 3144 && memcmp(pData + 0x190, "sRGB IEC61966-2.1", 17) == 0;
}
} // namespace
diff --git a/core/fpdfapi/page/fpdf_page_func.cpp b/core/fpdfapi/page/fpdf_page_func.cpp
index 8ea4194eaa..9be1edb7ff 100644
--- a/core/fpdfapi/page/fpdf_page_func.cpp
+++ b/core/fpdfapi/page/fpdf_page_func.cpp
@@ -801,8 +801,8 @@ bool CPDF_Function::Init(CPDF_Object* pObj) {
if (m_pRanges && m_nOutputs > old_outputs) {
m_pRanges = FX_Realloc(float, m_pRanges, m_nOutputs * 2);
if (m_pRanges) {
- FXSYS_memset(m_pRanges + (old_outputs * 2), 0,
- sizeof(float) * (m_nOutputs - old_outputs) * 2);
+ memset(m_pRanges + (old_outputs * 2), 0,
+ sizeof(float) * (m_nOutputs - old_outputs) * 2);
}
}
return true;
diff --git a/core/fpdfapi/parser/cpdf_crypto_handler.cpp b/core/fpdfapi/parser/cpdf_crypto_handler.cpp
index 61f78c4ee5..4fc7b3039b 100644
--- a/core/fpdfapi/parser/cpdf_crypto_handler.cpp
+++ b/core/fpdfapi/parser/cpdf_crypto_handler.cpp
@@ -21,7 +21,7 @@ void CPDF_CryptoHandler::CryptBlock(bool bEncrypt,
uint8_t* dest_buf,
uint32_t& dest_size) {
if (m_Cipher == FXCIPHER_NONE) {
- FXSYS_memcpy(dest_buf, src_buf, src_size);
+ memcpy(dest_buf, src_buf, src_size);
return;
}
uint8_t realkey[16];
@@ -31,7 +31,7 @@ void CPDF_CryptoHandler::CryptBlock(bool bEncrypt,
PopulateKey(objnum, gennum, key1);
if (m_Cipher == FXCIPHER_AES) {
- FXSYS_memcpy(key1 + m_KeyLen + 5, "sAlT", 4);
+ memcpy(key1 + m_KeyLen + 5, "sAlT", 4);
}
CRYPT_MD5Generate(
key1, m_Cipher == FXCIPHER_AES ? m_KeyLen + 9 : m_KeyLen + 5, realkey);
@@ -49,13 +49,12 @@ void CPDF_CryptoHandler::CryptBlock(bool bEncrypt,
iv[i] = (uint8_t)rand();
}
CRYPT_AESSetIV(m_pAESContext, iv);
- FXSYS_memcpy(dest_buf, iv, 16);
+ memcpy(dest_buf, iv, 16);
int nblocks = src_size / 16;
CRYPT_AESEncrypt(m_pAESContext, dest_buf + 16, src_buf, nblocks * 16);
uint8_t padding[16];
- FXSYS_memcpy(padding, src_buf + nblocks * 16, src_size % 16);
- FXSYS_memset(padding + src_size % 16, 16 - src_size % 16,
- 16 - src_size % 16);
+ memcpy(padding, src_buf + nblocks * 16, src_size % 16);
+ memset(padding + src_size % 16, 16 - src_size % 16, 16 - src_size % 16);
CRYPT_AESEncrypt(m_pAESContext, dest_buf + nblocks * 16 + 16, padding,
16);
dest_size = 32 + nblocks * 16;
@@ -68,7 +67,7 @@ void CPDF_CryptoHandler::CryptBlock(bool bEncrypt,
} else {
ASSERT(dest_size == src_size);
if (dest_buf != src_buf) {
- FXSYS_memcpy(dest_buf, src_buf, src_size);
+ memcpy(dest_buf, src_buf, src_size);
}
CRYPT_ArcFourCryptBlock(dest_buf, dest_size, realkey, realkeylen);
}
@@ -104,7 +103,7 @@ void* CPDF_CryptoHandler::CryptStart(uint32_t objnum,
PopulateKey(objnum, gennum, key1);
if (m_Cipher == FXCIPHER_AES) {
- FXSYS_memcpy(key1 + m_KeyLen + 5, "sAlT", 4);
+ memcpy(key1 + m_KeyLen + 5, "sAlT", 4);
}
uint8_t realkey[16];
CRYPT_MD5Generate(
@@ -162,8 +161,8 @@ bool CPDF_CryptoHandler::CryptStream(void* context,
if (copy_size > src_left) {
copy_size = src_left;
}
- FXSYS_memcpy(pContext->m_Block + pContext->m_BlockOffset, src_buf + src_off,
- copy_size);
+ memcpy(pContext->m_Block + pContext->m_BlockOffset, src_buf + src_off,
+ copy_size);
src_off += copy_size;
src_left -= copy_size;
pContext->m_BlockOffset += copy_size;
@@ -212,9 +211,9 @@ bool CPDF_CryptoHandler::CryptFinish(void* context,
dest_buf.AppendBlock(block_buf, 16);
pContext->m_BlockOffset = 0;
}
- FXSYS_memset(pContext->m_Block + pContext->m_BlockOffset,
- (uint8_t)(16 - pContext->m_BlockOffset),
- 16 - pContext->m_BlockOffset);
+ memset(pContext->m_Block + pContext->m_BlockOffset,
+ (uint8_t)(16 - pContext->m_BlockOffset),
+ 16 - pContext->m_BlockOffset);
CRYPT_AESEncrypt(pContext->m_Context, block_buf, pContext->m_Block, 16);
dest_buf.AppendBlock(block_buf, 16);
} else if (pContext->m_BlockOffset == 16) {
@@ -255,7 +254,7 @@ bool CPDF_CryptoHandler::Init(CPDF_Dictionary* pEncryptDict,
return false;
}
if (m_Cipher != FXCIPHER_NONE) {
- FXSYS_memcpy(m_EncryptKey, key, m_KeyLen);
+ memcpy(m_EncryptKey, key, m_KeyLen);
}
if (m_Cipher == FXCIPHER_AES) {
m_pAESContext = FX_Alloc(uint8_t, 2048);
@@ -288,7 +287,7 @@ bool CPDF_CryptoHandler::Init(int cipher, const uint8_t* key, int keylen) {
}
m_Cipher = cipher;
m_KeyLen = keylen;
- FXSYS_memcpy(m_EncryptKey, key, keylen);
+ memcpy(m_EncryptKey, key, keylen);
if (m_Cipher == FXCIPHER_AES) {
m_pAESContext = FX_Alloc(uint8_t, 2048);
}
@@ -333,7 +332,7 @@ CPDF_CryptoHandler::~CPDF_CryptoHandler() {
void CPDF_CryptoHandler::PopulateKey(uint32_t objnum,
uint32_t gennum,
uint8_t* key) {
- FXSYS_memcpy(key, m_EncryptKey, m_KeyLen);
+ memcpy(key, m_EncryptKey, m_KeyLen);
key[m_KeyLen + 0] = (uint8_t)objnum;
key[m_KeyLen + 1] = (uint8_t)(objnum >> 8);
key[m_KeyLen + 2] = (uint8_t)(objnum >> 16);
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp
index 975592d044..b336acaf84 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -961,7 +961,7 @@ CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTW* pLogFont,
bool bVert,
bool bTranslateName) {
LOGFONTA lfa;
- FXSYS_memcpy(&lfa, pLogFont, (char*)lfa.lfFaceName - (char*)&lfa);
+ memcpy(&lfa, pLogFont, (char*)lfa.lfFaceName - (char*)&lfa);
CFX_ByteString face = CFX_ByteString::FromUnicode(pLogFont->lfFaceName);
if (face.GetLength() >= LF_FACESIZE)
return nullptr;
diff --git a/core/fpdfapi/parser/cpdf_object_unittest.cpp b/core/fpdfapi/parser/cpdf_object_unittest.cpp
index 3b5374b637..1923992d7a 100644
--- a/core/fpdfapi/parser/cpdf_object_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_object_unittest.cpp
@@ -162,8 +162,8 @@ class PDFObjectsTest : public testing::Test {
// streams need to be handled.
if (!stream1->IsMemoryBased() || !stream2->IsMemoryBased())
return false;
- return FXSYS_memcmp(stream1->GetRawData(), stream2->GetRawData(),
- stream1->GetRawSize()) == 0;
+ return memcmp(stream1->GetRawData(), stream2->GetRawData(),
+ stream1->GetRawSize()) == 0;
}
case CPDF_Object::REFERENCE:
return obj1->AsReference()->GetRefObjNum() ==
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp
index 323f91779c..cac678762d 100644
--- a/core/fpdfapi/parser/cpdf_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_parser.cpp
@@ -1217,7 +1217,7 @@ void CPDF_Parser::GetIndirectBinary(uint32_t objnum,
}
pBuffer = FX_Alloc(uint8_t, size);
- FXSYS_memcpy(pBuffer, pData + thisoff + offset, size);
+ memcpy(pBuffer, pData + thisoff + offset, size);
return;
}
return;
diff --git a/core/fpdfapi/parser/cpdf_security_handler.cpp b/core/fpdfapi/parser/cpdf_security_handler.cpp
index cfc51350d9..44042cb47c 100644
--- a/core/fpdfapi/parser/cpdf_security_handler.cpp
+++ b/core/fpdfapi/parser/cpdf_security_handler.cpp
@@ -66,8 +66,8 @@ void CalcEncryptKey(CPDF_Dictionary* pEncrypt,
CRYPT_MD5Generate(digest, copy_len, digest);
}
}
- FXSYS_memset(key, 0, keylen);
- FXSYS_memcpy(key, digest, copy_len);
+ memset(key, 0, keylen);
+ memcpy(key, digest, copy_len);
}
} // namespace
@@ -303,7 +303,7 @@ void Revision6_Hash(const uint8_t* password,
}
FX_Free(aes);
if (hash) {
- FXSYS_memcpy(hash, input, 32);
+ memcpy(hash, input, 32);
}
}
@@ -337,7 +337,7 @@ bool CPDF_SecurityHandler::AES256_CheckPassword(const uint8_t* password,
CRYPT_SHA256Finish(&sha, digest);
}
- if (FXSYS_memcmp(digest, pkey, 32) != 0)
+ if (memcmp(digest, pkey, 32) != 0)
return false;
if (!key)
@@ -364,7 +364,7 @@ bool CPDF_SecurityHandler::AES256_CheckPassword(const uint8_t* password,
std::vector<uint8_t> aes(2048);
CRYPT_AESSetKey(aes.data(), 16, digest, 32, false);
uint8_t iv[16];
- FXSYS_memset(iv, 0, 16);
+ memset(iv, 0, 16);
CRYPT_AESSetIV(aes.data(), iv);
CRYPT_AESDecrypt(aes.data(), key, ekey.raw_str(), 32);
CRYPT_AESSetKey(aes.data(), 16, key, 32, false);
@@ -374,10 +374,10 @@ bool CPDF_SecurityHandler::AES256_CheckPassword(const uint8_t* password,
return false;
uint8_t perms_buf[16];
- FXSYS_memset(perms_buf, 0, sizeof(perms_buf));
+ memset(perms_buf, 0, sizeof(perms_buf));
size_t copy_len =
std::min(sizeof(perms_buf), static_cast<size_t>(perms.GetLength()));
- FXSYS_memcpy(perms_buf, perms.raw_str(), copy_len);
+ memcpy(perms_buf, perms.raw_str(), copy_len);
uint8_t buf[16];
CRYPT_AESDecrypt(aes.data(), buf, perms_buf, 16);
if (buf[9] != 'a' || buf[10] != 'd' || buf[11] != 'b')
@@ -425,7 +425,7 @@ bool CPDF_SecurityHandler::CheckUserPassword(const uint8_t* password,
}
uint8_t ukeybuf[32];
if (m_Revision == 2) {
- FXSYS_memcpy(ukeybuf, defpasscode, 32);
+ memcpy(ukeybuf, defpasscode, 32);
CRYPT_ArcFourCryptBlock(ukeybuf, 32, key, key_len);
} else {
uint8_t test[32], tmpkey[32];
@@ -433,9 +433,9 @@ bool CPDF_SecurityHandler::CheckUserPassword(const uint8_t* password,
if (copy_len > (uint32_t)ukey.GetLength()) {
copy_len = ukey.GetLength();
}
- FXSYS_memset(test, 0, sizeof(test));
- FXSYS_memset(tmpkey, 0, sizeof(tmpkey));
- FXSYS_memcpy(test, ukey.c_str(), copy_len);
+ memset(test, 0, sizeof(test));
+ memset(tmpkey, 0, sizeof(tmpkey));
+ memcpy(test, ukey.c_str(), copy_len);
for (int32_t i = 19; i >= 0; i--) {
for (int j = 0; j < key_len; j++)
tmpkey[j] = key[j] ^ static_cast<uint8_t>(i);
@@ -450,9 +450,9 @@ bool CPDF_SecurityHandler::CheckUserPassword(const uint8_t* password,
CRYPT_MD5Update(&md5, (uint8_t*)id.c_str(), id.GetLength());
}
CRYPT_MD5Finish(&md5, ukeybuf);
- return FXSYS_memcmp(test, ukeybuf, 16) == 0;
+ return memcmp(test, ukeybuf, 16) == 0;
}
- if (FXSYS_memcmp((void*)ukey.c_str(), ukeybuf, 16) == 0) {
+ if (memcmp((void*)ukey.c_str(), ukeybuf, 16) == 0) {
return true;
}
return false;
@@ -473,25 +473,25 @@ CFX_ByteString CPDF_SecurityHandler::GetUserPassword(const uint8_t* owner_pass,
}
}
uint8_t enckey[32];
- FXSYS_memset(enckey, 0, sizeof(enckey));
+ memset(enckey, 0, sizeof(enckey));
uint32_t copy_len = key_len;
if (copy_len > sizeof(digest)) {
copy_len = sizeof(digest);
}
- FXSYS_memcpy(enckey, digest, copy_len);
+ memcpy(enckey, digest, copy_len);
int okeylen = okey.GetLength();
if (okeylen > 32) {
okeylen = 32;
}
uint8_t okeybuf[64];
- FXSYS_memset(okeybuf, 0, sizeof(okeybuf));
- FXSYS_memcpy(okeybuf, okey.c_str(), okeylen);
+ memset(okeybuf, 0, sizeof(okeybuf));
+ memcpy(okeybuf, okey.c_str(), okeylen);
if (m_Revision == 2) {
CRYPT_ArcFourCryptBlock(okeybuf, okeylen, enckey, key_len);
} else {
for (int32_t i = 19; i >= 0; i--) {
uint8_t tempkey[32];
- FXSYS_memset(tempkey, 0, sizeof(tempkey));
+ memset(tempkey, 0, sizeof(tempkey));
for (int j = 0; j < m_KeyLen; j++)
tempkey[j] = enckey[j] ^ static_cast<uint8_t>(i);
CRYPT_ArcFourCryptBlock(okeybuf, okeylen, tempkey, key_len);
@@ -567,7 +567,7 @@ void CPDF_SecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict,
CRYPT_MD5Generate(digest, 16, digest);
}
uint8_t enckey[32];
- FXSYS_memcpy(enckey, digest, key_len);
+ memcpy(enckey, digest, key_len);
for (uint32_t i = 0; i < 32; i++) {
passcode[i] = i < user_size ? user_pass[i] : defpasscode[i - user_size];
}
@@ -587,7 +587,7 @@ void CPDF_SecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict,
key_len, false, pIdArray);
if (m_Revision < 3) {
uint8_t tempbuf[32];
- FXSYS_memcpy(tempbuf, defpasscode, 32);
+ memcpy(tempbuf, defpasscode, 32);
CRYPT_ArcFourCryptBlock(tempbuf, 32, m_EncryptKey, key_len);
pEncryptDict->SetNewFor<CPDF_String>("U", CFX_ByteString(tempbuf, 32),
false);
@@ -660,7 +660,7 @@ void CPDF_SecurityHandler::AES256_SetPassword(CPDF_Dictionary* pEncryptDict,
}
CRYPT_SHA256Finish(&sha2, digest1);
}
- FXSYS_memcpy(digest1 + 32, digest, 16);
+ memcpy(digest1 + 32, digest, 16);
pEncryptDict->SetNewFor<CPDF_String>(bOwner ? "O" : "U",
CFX_ByteString(digest1, 48), false);
if (m_Revision >= 6) {
@@ -678,7 +678,7 @@ void CPDF_SecurityHandler::AES256_SetPassword(CPDF_Dictionary* pEncryptDict,
uint8_t* aes = FX_Alloc(uint8_t, 2048);
CRYPT_AESSetKey(aes, 16, digest1, 32, true);
uint8_t iv[16];
- FXSYS_memset(iv, 0, 16);
+ memset(iv, 0, 16);
CRYPT_AESSetIV(aes, iv);
CRYPT_AESEncrypt(aes, digest1, key, 32);
FX_Free(aes);
@@ -706,7 +706,7 @@ void CPDF_SecurityHandler::AES256_SetPerms(CPDF_Dictionary* pEncryptDict,
uint8_t* aes = FX_Alloc(uint8_t, 2048);
CRYPT_AESSetKey(aes, 16, key, 32, true);
uint8_t iv[16], buf1[16];
- FXSYS_memset(iv, 0, 16);
+ memset(iv, 0, 16);
CRYPT_AESSetIV(aes, iv);
CRYPT_AESEncrypt(aes, buf1, buf, 16);
FX_Free(aes);
diff --git a/core/fpdfapi/parser/cpdf_stream.cpp b/core/fpdfapi/parser/cpdf_stream.cpp
index d62b45641b..532fd753f8 100644
--- a/core/fpdfapi/parser/cpdf_stream.cpp
+++ b/core/fpdfapi/parser/cpdf_stream.cpp
@@ -57,7 +57,7 @@ void CPDF_Stream::InitStream(const uint8_t* pData,
m_pFile = nullptr;
m_pDataBuf.reset(FX_Alloc(uint8_t, size));
if (pData)
- FXSYS_memcpy(m_pDataBuf.get(), pData, size);
+ memcpy(m_pDataBuf.get(), pData, size);
m_dwSize = size;
if (m_pDict)
m_pDict->SetNewFor<CPDF_Number>("Length", static_cast<int>(m_dwSize));
@@ -101,7 +101,7 @@ void CPDF_Stream::SetData(const uint8_t* pData, uint32_t size) {
m_bMemoryBased = true;
m_pDataBuf.reset(FX_Alloc(uint8_t, size));
if (pData)
- FXSYS_memcpy(m_pDataBuf.get(), pData, size);
+ memcpy(m_pDataBuf.get(), pData, size);
m_dwSize = size;
if (!m_pDict)
m_pDict = pdfium::MakeUnique<CPDF_Dictionary>();
@@ -117,7 +117,7 @@ bool CPDF_Stream::ReadRawData(FX_FILESIZE offset,
return m_pFile->ReadBlock(buf, offset, size);
if (m_pDataBuf)
- FXSYS_memcpy(buf, m_pDataBuf.get() + offset, size);
+ memcpy(buf, m_pDataBuf.get() + offset, size);
return true;
}
diff --git a/core/fpdfapi/parser/cpdf_stream_acc.cpp b/core/fpdfapi/parser/cpdf_stream_acc.cpp
index 423de7c571..59ac289b7c 100644
--- a/core/fpdfapi/parser/cpdf_stream_acc.cpp
+++ b/core/fpdfapi/parser/cpdf_stream_acc.cpp
@@ -82,6 +82,6 @@ std::unique_ptr<uint8_t, FxFreeDeleter> CPDF_StreamAcc::DetachData() {
return p;
}
std::unique_ptr<uint8_t, FxFreeDeleter> p(FX_Alloc(uint8_t, m_dwSize));
- FXSYS_memcpy(p.get(), m_pData, m_dwSize);
+ memcpy(p.get(), m_pData, m_dwSize);
return p;
}
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index 54fb89a48b..67c0977cfe 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -645,13 +645,13 @@ std::unique_ptr<CPDF_Stream> CPDF_SyntaxParser::ReadStream(
m_Pos = pos.ValueOrDie();
m_Pos += ReadEOLMarkers(m_Pos);
- FXSYS_memset(m_WordBuffer, 0, kEndStreamStr.GetLength() + 1);
+ memset(m_WordBuffer, 0, kEndStreamStr.GetLength() + 1);
GetNextWordInternal(nullptr);
// Earlier version of PDF specification doesn't require EOL marker before
// 'endstream' keyword. If keyword 'endstream' follows the bytes in
// specified length, it signals the end of stream.
- if (FXSYS_memcmp(m_WordBuffer, kEndStreamStr.raw_str(),
- kEndStreamStr.GetLength()) == 0) {
+ if (memcmp(m_WordBuffer, kEndStreamStr.raw_str(),
+ kEndStreamStr.GetLength()) == 0) {
bSearchForKeyword = false;
}
}
@@ -750,14 +750,13 @@ std::unique_ptr<CPDF_Stream> CPDF_SyntaxParser::ReadStream(
auto pStream =
pdfium::MakeUnique<CPDF_Stream>(std::move(pData), len, std::move(pDict));
streamStartPos = m_Pos;
- FXSYS_memset(m_WordBuffer, 0, kEndObjStr.GetLength() + 1);
+ memset(m_WordBuffer, 0, kEndObjStr.GetLength() + 1);
GetNextWordInternal(nullptr);
int numMarkers = ReadEOLMarkers(m_Pos);
if (m_WordSize == static_cast<unsigned int>(kEndObjStr.GetLength()) &&
numMarkers != 0 &&
- FXSYS_memcmp(m_WordBuffer, kEndObjStr.raw_str(),
- kEndObjStr.GetLength()) == 0) {
+ memcmp(m_WordBuffer, kEndObjStr.raw_str(), kEndObjStr.GetLength()) == 0) {
m_Pos = streamStartPos;
}
return pStream;
diff --git a/core/fpdfapi/parser/fpdf_parser_decode.cpp b/core/fpdfapi/parser/fpdf_parser_decode.cpp
index af1f452afd..a1698aedde 100644
--- a/core/fpdfapi/parser/fpdf_parser_decode.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_decode.cpp
@@ -114,7 +114,7 @@ uint32_t A85Decode(const uint8_t* src_buf,
continue;
if (ch == 'z') {
- FXSYS_memset(dest_buf + dest_size, 0, 4);
+ memset(dest_buf + dest_size, 0, 4);
state = 0;
res = 0;
dest_size += 4;
@@ -226,9 +226,9 @@ uint32_t RunLengthDecode(const uint8_t* src_buf,
if (buf_left < copy_len) {
uint32_t delta = copy_len - buf_left;
copy_len = buf_left;
- FXSYS_memset(dest_buf + dest_count + copy_len, '\0', delta);
+ memset(dest_buf + dest_count + copy_len, '\0', delta);
}
- FXSYS_memcpy(dest_buf + dest_count, src_buf + i + 1, copy_len);
+ memcpy(dest_buf + dest_count, src_buf + i + 1, copy_len);
dest_count += src_buf[i] + 1;
i += src_buf[i] + 2;
} else {
@@ -236,7 +236,7 @@ uint32_t RunLengthDecode(const uint8_t* src_buf,
if (i < src_size - 1) {
fill = src_buf[i + 1];
}
- FXSYS_memset(dest_buf + dest_count, fill, 257 - src_buf[i]);
+ memset(dest_buf + dest_count, fill, 257 - src_buf[i]);
dest_count += 257 - src_buf[i];
i += 2;
}
diff --git a/core/fpdfapi/render/cpdf_dibsource.cpp b/core/fpdfapi/render/cpdf_dibsource.cpp
index cb8e9c9eee..12bfadb19d 100644
--- a/core/fpdfapi/render/cpdf_dibsource.cpp
+++ b/core/fpdfapi/render/cpdf_dibsource.cpp
@@ -999,7 +999,7 @@ const uint8_t* CPDF_DIBSource::GetScanline(int line) const {
}
if (!pSrcLine) {
uint8_t* pLineBuf = m_pMaskedLine ? m_pMaskedLine : m_pLineBuf;
- FXSYS_memset(pLineBuf, 0xFF, m_Pitch);
+ memset(pLineBuf, 0xFF, m_Pitch);
return pLineBuf;
}
if (m_bpc * m_nComponents == 1) {
@@ -1030,13 +1030,13 @@ const uint8_t* CPDF_DIBSource::GetScanline(int line) const {
}
return m_pMaskedLine;
} else {
- FXSYS_memcpy(m_pLineBuf, pSrcLine, src_pitch_value);
+ memcpy(m_pLineBuf, pSrcLine, src_pitch_value);
}
return m_pLineBuf;
}
if (m_bpc * m_nComponents <= 8) {
if (m_bpc == 8) {
- FXSYS_memcpy(m_pLineBuf, pSrcLine, src_pitch_value);
+ memcpy(m_pLineBuf, pSrcLine, src_pitch_value);
} else {
uint64_t src_bit_pos = 0;
for (int col = 0; col < m_Width; col++) {
@@ -1088,7 +1088,7 @@ const uint8_t* CPDF_DIBSource::GetScanline(int line) const {
: 0;
}
} else {
- FXSYS_memset(m_pMaskedLine, 0xFF, m_Pitch);
+ memset(m_pMaskedLine, 0xFF, m_Pitch);
}
}
if (m_pColorSpace) {
@@ -1149,7 +1149,7 @@ void CPDF_DIBSource::DownSampleScanline(int line,
int orig_Bpp = m_bpc * m_nComponents / 8;
int dest_Bpp = dest_bpp / 8;
if (!pSrcLine) {
- FXSYS_memset(dest_scan, 0xFF, dest_Bpp * clip_width);
+ memset(dest_scan, 0xFF, dest_Bpp * clip_width);
return;
}
diff --git a/core/fpdfapi/render/cpdf_docrenderdata.cpp b/core/fpdfapi/render/cpdf_docrenderdata.cpp
index 1c430e8f0f..b34fa2caef 100644
--- a/core/fpdfapi/render/cpdf_docrenderdata.cpp
+++ b/core/fpdfapi/render/cpdf_docrenderdata.cpp
@@ -110,7 +110,7 @@ CPDF_TransferFunc* CPDF_DocRenderData::GetTransferFunc(CPDF_Object* pObj) {
CPDF_TransferFunc* pTransfer = pTransferCounter->get();
m_TransferFuncMap[pObj] = pTransferCounter;
float output[kMaxOutputs];
- FXSYS_memset(output, 0, sizeof(output));
+ memset(output, 0, sizeof(output));
float input;
int noutput;
for (int v = 0; v < 256; ++v) {
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index f2d888bdeb..97bb0ac4a2 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -137,7 +137,7 @@ void DrawAxialShading(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
std::max(CountOutputs(funcs), pCS->CountComponents());
CFX_FixedBufGrow<float, 16> result_array(total_results);
float* pResults = result_array;
- FXSYS_memset(pResults, 0, total_results * sizeof(float));
+ memset(pResults, 0, total_results * sizeof(float));
uint32_t rgb_array[SHADING_STEPS];
for (int i = 0; i < SHADING_STEPS; i++) {
float input = (t_max - t_min) * i / SHADING_STEPS + t_min;
@@ -220,7 +220,7 @@ void DrawRadialShading(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
std::max(CountOutputs(funcs), pCS->CountComponents());
CFX_FixedBufGrow<float, 16> result_array(total_results);
float* pResults = result_array;
- FXSYS_memset(pResults, 0, total_results * sizeof(float));
+ memset(pResults, 0, total_results * sizeof(float));
uint32_t rgb_array[SHADING_STEPS];
for (int i = 0; i < SHADING_STEPS; i++) {
float input = (t_max - t_min) * i / SHADING_STEPS + t_min;
@@ -345,7 +345,7 @@ void DrawFuncShading(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
std::max(CountOutputs(funcs), pCS->CountComponents());
CFX_FixedBufGrow<float, 16> result_array(total_results);
float* pResults = result_array;
- FXSYS_memset(pResults, 0, total_results * sizeof(float));
+ memset(pResults, 0, total_results * sizeof(float));
for (int row = 0; row < height; row++) {
uint32_t* dib_buf = (uint32_t*)(pBitmap->GetBuffer() + row * pitch);
for (int column = 0; column < width; column++) {
@@ -487,7 +487,7 @@ void DrawFreeGouraudShading(
return;
CPDF_MeshVertex triangle[3];
- FXSYS_memset(triangle, 0, sizeof(triangle));
+ memset(triangle, 0, sizeof(triangle));
while (!stream.BitStream()->IsEOF()) {
CPDF_MeshVertex vertex;
@@ -685,7 +685,7 @@ int BiInterpolImpl(int c0,
}
struct Coon_Color {
- Coon_Color() { FXSYS_memset(comp, 0, sizeof(int) * 3); }
+ Coon_Color() { memset(comp, 0, sizeof(int) * 3); }
int comp[3];
void BiInterpol(Coon_Color colors[4],
@@ -848,11 +848,11 @@ void DrawCoonPatchMeshes(
for (i = 0; i < 4; i++) {
tempCoords[i] = coords[(flag * 3 + i) % 12];
}
- FXSYS_memcpy(coords, tempCoords, sizeof(tempCoords));
+ memcpy(coords, tempCoords, sizeof(tempCoords));
Coon_Color tempColors[2];
tempColors[0] = patch.patch_colors[flag];
tempColors[1] = patch.patch_colors[(flag + 1) % 4];
- FXSYS_memcpy(patch.patch_colors, tempColors, sizeof(Coon_Color) * 2);
+ memcpy(patch.patch_colors, tempColors, sizeof(Coon_Color) * 2);
}
for (i = iStartPoint; i < point_count; i++) {
if (!stream.CanReadCoords())
@@ -2586,7 +2586,7 @@ CFX_RetainPtr<CFX_DIBitmap> CPDF_RenderStatus::LoadSMask(
if (!num_floats.IsValid()) {
return nullptr;
}
- FXSYS_memset(pFloats, 0, num_floats.ValueOrDie());
+ memset(pFloats, 0, num_floats.ValueOrDie());
size_t count = pBC->GetCount() > 8 ? 8 : pBC->GetCount();
for (size_t i = 0; i < count; i++) {
pFloats[i] = pBC->GetNumberAt(i);
@@ -2651,7 +2651,7 @@ CFX_RetainPtr<CFX_DIBitmap> CPDF_RenderStatus::LoadSMask(
dest_buf[i] = transfers[src_buf[i]];
}
} else {
- FXSYS_memcpy(dest_buf, src_buf, dest_pitch * height);
+ memcpy(dest_buf, src_buf, dest_pitch * height);
}
return pMask;
}