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>
diff --git a/core/fdrm/crypto/fx_crypt.cpp b/core/fdrm/crypto/fx_crypt.cpp
index 4010ff4..d1a1aae 100644
--- a/core/fdrm/crypto/fx_crypt.cpp
+++ b/core/fdrm/crypto/fx_crypt.cpp
@@ -204,7 +204,7 @@
ctx->total[0] &= 0xFFFFFFFF;
ctx->total[1] += ctx->total[0] < length << 3;
if (left && length >= fill) {
- FXSYS_memcpy((void*)(ctx->buffer + left), (void*)input, fill);
+ memcpy((void*)(ctx->buffer + left), (void*)input, fill);
md5_process(ctx, ctx->buffer);
length -= fill;
input += fill;
@@ -216,7 +216,7 @@
input += 64;
}
if (length) {
- FXSYS_memcpy((void*)(ctx->buffer + left), (void*)input, length);
+ memcpy((void*)(ctx->buffer + left), (void*)input, length);
}
}
diff --git a/core/fdrm/crypto/fx_crypt_aes.cpp b/core/fdrm/crypto/fx_crypt_aes.cpp
index 8484b6f..e900dbd 100644
--- a/core/fdrm/crypto/fx_crypt_aes.cpp
+++ b/core/fdrm/crypto/fx_crypt_aes.cpp
@@ -762,7 +762,7 @@
unsigned int iv[4], x[4], ct[4];
int i;
ASSERT((len & 15) == 0);
- FXSYS_memcpy(iv, ctx->iv, sizeof(iv));
+ memcpy(iv, ctx->iv, sizeof(iv));
while (len > 0) {
for (i = 0; i < 4; i++) {
x[i] = ct[i] = GET_32BIT_MSB_FIRST(src + 4 * i);
@@ -776,7 +776,7 @@
src += 16;
len -= 16;
}
- FXSYS_memcpy(ctx->iv, iv, sizeof(iv));
+ memcpy(ctx->iv, iv, sizeof(iv));
}
static void aes_encrypt(AESContext* ctx, unsigned int* block) {
ctx->encrypt(ctx, block);
@@ -788,7 +788,7 @@
unsigned int iv[4];
int i;
ASSERT((len & 15) == 0);
- FXSYS_memcpy(iv, ctx->iv, sizeof(iv));
+ memcpy(iv, ctx->iv, sizeof(iv));
while (len > 0) {
for (i = 0; i < 4; i++) {
iv[i] ^= GET_32BIT_MSB_FIRST(src + 4 * i);
@@ -801,7 +801,7 @@
src += 16;
len -= 16;
}
- FXSYS_memcpy(ctx->iv, iv, sizeof(iv));
+ memcpy(ctx->iv, iv, sizeof(iv));
}
void CRYPT_AESSetKey(void* context,
uint32_t blocklen,
diff --git a/core/fdrm/crypto/fx_crypt_sha.cpp b/core/fdrm/crypto/fx_crypt_sha.cpp
index 51f9588..f79b831 100644
--- a/core/fdrm/crypto/fx_crypt_sha.cpp
+++ b/core/fdrm/crypto/fx_crypt_sha.cpp
@@ -90,11 +90,11 @@
s->lenlo += lenw;
s->lenhi += (s->lenlo < lenw);
if (s->blkused && s->blkused + len < 64) {
- FXSYS_memcpy(s->block + s->blkused, q, len);
+ memcpy(s->block + s->blkused, q, len);
s->blkused += len;
} else {
while (s->blkused + len >= 64) {
- FXSYS_memcpy(s->block + s->blkused, q, 64 - s->blkused);
+ memcpy(s->block + s->blkused, q, 64 - s->blkused);
q += 64 - s->blkused;
len -= 64 - s->blkused;
for (i = 0; i < 16; i++) {
@@ -106,7 +106,7 @@
SHATransform(s->h, wordblock);
s->blkused = 0;
}
- FXSYS_memcpy(s->block, q, len);
+ memcpy(s->block, q, len);
s->blkused = len;
}
}
@@ -123,7 +123,7 @@
}
lenhi = (s->lenhi << 3) | (s->lenlo >> (32 - 3));
lenlo = (s->lenlo << 3);
- FXSYS_memset(c, 0, pad);
+ memset(c, 0, pad);
c[0] = 0x80;
CRYPT_SHA1Update(s, c, pad);
c[0] = (lenhi >> 24) & 0xFF;
@@ -307,7 +307,7 @@
ctx->total[1]++;
}
if (left && length >= fill) {
- FXSYS_memcpy((void*)(ctx->buffer + left), (void*)input, fill);
+ memcpy((void*)(ctx->buffer + left), (void*)input, fill);
sha256_process(ctx, ctx->buffer);
length -= fill;
input += fill;
@@ -319,7 +319,7 @@
input += 64;
}
if (length) {
- FXSYS_memcpy((void*)(ctx->buffer + left), (void*)input, length);
+ memcpy((void*)(ctx->buffer + left), (void*)input, length);
}
}
@@ -385,7 +385,7 @@
if (!ctx)
return;
- FXSYS_memset(ctx, 0, sizeof(CRYPT_sha384_context));
+ memset(ctx, 0, sizeof(CRYPT_sha384_context));
ctx->state[0] = FX_ato64i("cbbb9d5dc1059ed8");
ctx->state[1] = FX_ato64i("629a292a367cd507");
ctx->state[2] = FX_ato64i("9159015a3070dd17");
@@ -556,7 +556,7 @@
ctx->total[1]++;
}
if (left && length >= fill) {
- FXSYS_memcpy((void*)(ctx->buffer + left), (void*)input, fill);
+ memcpy((void*)(ctx->buffer + left), (void*)input, fill);
sha384_process(ctx, ctx->buffer);
length -= fill;
input += fill;
@@ -568,14 +568,14 @@
input += 128;
}
if (length) {
- FXSYS_memcpy((void*)(ctx->buffer + left), (void*)input, length);
+ memcpy((void*)(ctx->buffer + left), (void*)input, length);
}
}
void CRYPT_SHA384Finish(CRYPT_sha384_context* ctx, uint8_t digest[48]) {
uint32_t last, padn;
uint8_t msglen[16];
- FXSYS_memset(msglen, 0, 16);
+ memset(msglen, 0, 16);
uint64_t high, low;
high = (ctx->total[0] >> 29) | (ctx->total[1] << 3);
low = (ctx->total[0] << 3);
@@ -607,7 +607,7 @@
return;
}
CRYPT_sha384_context* ctx = (CRYPT_sha384_context*)context;
- FXSYS_memset(ctx, 0, sizeof(CRYPT_sha384_context));
+ memset(ctx, 0, sizeof(CRYPT_sha384_context));
ctx->state[0] = FX_ato64i("6a09e667f3bcc908");
ctx->state[1] = FX_ato64i("bb67ae8584caa73b");
ctx->state[2] = FX_ato64i("3c6ef372fe94f82b");
@@ -627,7 +627,7 @@
CRYPT_sha384_context* ctx = (CRYPT_sha384_context*)context;
uint32_t last, padn;
uint8_t msglen[16];
- FXSYS_memset(msglen, 0, 16);
+ memset(msglen, 0, 16);
uint64_t high, low;
high = (ctx->total[0] >> 29) | (ctx->total[1] << 3);
low = (ctx->total[0] << 3);
diff --git a/core/fpdfapi/edit/fpdf_edit_create.cpp b/core/fpdfapi/edit/fpdf_edit_create.cpp
index e6fe6b4..59d3de3 100644
--- a/core/fpdfapi/edit/fpdf_edit_create.cpp
+++ b/core/fpdfapi/edit/fpdf_edit_create.cpp
@@ -778,7 +778,7 @@
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 @@
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 @@
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 be4eaff..2cc6445 100644
--- a/core/fpdfapi/font/cpdf_fontencoding.cpp
+++ b/core/fpdfapi/font/cpdf_fontencoding.cpp
@@ -1646,7 +1646,7 @@
} // 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 @@
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 @@
}
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 94a690f..a359782 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 a264a78..e3d96da 100644
--- a/core/fpdfapi/font/cpdf_type1font.cpp
+++ b/core/fpdfapi/font/cpdf_type1font.cpp
@@ -151,7 +151,7 @@
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 @@
}
#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 @@
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 @@
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 @@
}
#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 @@
}
#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 59702ae..da3b183 100644
--- a/core/fpdfapi/font/cpdf_type3font.cpp
+++ b/core/fpdfapi/font/cpdf_type3font.cpp
@@ -24,7 +24,7 @@
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 706ae62..23b4675 100644
--- a/core/fpdfapi/font/fpdf_font.cpp
+++ b/core/fpdfapi/font/fpdf_font.cpp
@@ -71,8 +71,8 @@
}
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 ddc0c12..64b0417 100644
--- a/core/fpdfapi/font/fpdf_font_cid.cpp
+++ b/core/fpdfapi/font/fpdf_font_cid.cpp
@@ -413,8 +413,8 @@
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 @@
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 @@
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 4677151..f0e433c 100644
--- a/core/fpdfapi/page/cpdf_color.cpp
+++ b/core/fpdfapi/page/cpdf_color.cpp
@@ -71,7 +71,7 @@
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 @@
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 @@
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 7ceb509..46e2c52 100644
--- a/core/fpdfapi/page/cpdf_contentparser.cpp
+++ b/core/fpdfapi/page/cpdf_contentparser.cpp
@@ -142,7 +142,7 @@
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 4fc1c34..da49fab 100644
--- a/core/fpdfapi/page/cpdf_image.cpp
+++ b/core/fpdfapi/page/cpdf_image.cpp
@@ -269,8 +269,8 @@
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 @@
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 c0074f8..b0a21c6 100644
--- a/core/fpdfapi/page/cpdf_meshstream.cpp
+++ b/core/fpdfapi/page/cpdf_meshstream.cpp
@@ -210,7 +210,7 @@
}
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 59de3c5..3068613 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -326,11 +326,11 @@
} 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 f3a04fb..3c4e534 100644
--- a/core/fpdfapi/page/cpdf_streamparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamparser.cpp
@@ -53,7 +53,7 @@
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 @@
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 @@
}
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 adee5ff..ffb8da3 100644
--- a/core/fpdfapi/page/fpdf_page_colors.cpp
+++ b/core/fpdfapi/page/fpdf_page_colors.cpp
@@ -27,8 +27,7 @@
}
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 8ea4194..9be1edb 100644
--- a/core/fpdfapi/page/fpdf_page_func.cpp
+++ b/core/fpdfapi/page/fpdf_page_func.cpp
@@ -801,8 +801,8 @@
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 61f78c4..4fc7b30 100644
--- a/core/fpdfapi/parser/cpdf_crypto_handler.cpp
+++ b/core/fpdfapi/parser/cpdf_crypto_handler.cpp
@@ -21,7 +21,7 @@
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 @@
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 @@
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 @@
} 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 @@
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 @@
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 @@
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 @@
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 @@
}
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 @@
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 975592d..b336aca 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -961,7 +961,7 @@
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 3b5374b..1923992 100644
--- a/core/fpdfapi/parser/cpdf_object_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_object_unittest.cpp
@@ -162,8 +162,8 @@
// 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 323f917..cac6787 100644
--- a/core/fpdfapi/parser/cpdf_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_parser.cpp
@@ -1217,7 +1217,7 @@
}
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 cfc5135..44042cb 100644
--- a/core/fpdfapi/parser/cpdf_security_handler.cpp
+++ b/core/fpdfapi/parser/cpdf_security_handler.cpp
@@ -66,8 +66,8 @@
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 @@
}
FX_Free(aes);
if (hash) {
- FXSYS_memcpy(hash, input, 32);
+ memcpy(hash, input, 32);
}
}
@@ -337,7 +337,7 @@
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 @@
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 @@
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 @@
}
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 @@
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 @@
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 @@
}
}
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 @@
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 @@
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 @@
}
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 @@
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 @@
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 d62b456..532fd75 100644
--- a/core/fpdfapi/parser/cpdf_stream.cpp
+++ b/core/fpdfapi/parser/cpdf_stream.cpp
@@ -57,7 +57,7 @@
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 @@
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 @@
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 423de7c..59ac289 100644
--- a/core/fpdfapi/parser/cpdf_stream_acc.cpp
+++ b/core/fpdfapi/parser/cpdf_stream_acc.cpp
@@ -82,6 +82,6 @@
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 54fb89a..67c0977 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -645,13 +645,13 @@
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 @@
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 af1f452..a1698ae 100644
--- a/core/fpdfapi/parser/fpdf_parser_decode.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_decode.cpp
@@ -114,7 +114,7 @@
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 @@
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 @@
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 cb8e9c9..12bfadb 100644
--- a/core/fpdfapi/render/cpdf_dibsource.cpp
+++ b/core/fpdfapi/render/cpdf_dibsource.cpp
@@ -999,7 +999,7 @@
}
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 @@
}
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 @@
: 0;
}
} else {
- FXSYS_memset(m_pMaskedLine, 0xFF, m_Pitch);
+ memset(m_pMaskedLine, 0xFF, m_Pitch);
}
}
if (m_pColorSpace) {
@@ -1149,7 +1149,7 @@
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 1c430e8..b34fa2c 100644
--- a/core/fpdfapi/render/cpdf_docrenderdata.cpp
+++ b/core/fpdfapi/render/cpdf_docrenderdata.cpp
@@ -110,7 +110,7 @@
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 f2d888b..97bb0ac 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -137,7 +137,7 @@
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 @@
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 @@
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 @@
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 @@
}
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 @@
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 @@
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 @@
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;
}
diff --git a/core/fpdftext/cpdf_textpagefind.cpp b/core/fpdftext/cpdf_textpagefind.cpp
index e268975..7eaac35 100644
--- a/core/fpdftext/cpdf_textpagefind.cpp
+++ b/core/fpdftext/cpdf_textpagefind.cpp
@@ -381,7 +381,7 @@
int nLen = lpchEnd ? (int)(lpchEnd - lpszFullString)
: (int)FXSYS_wcslen(lpszFullString);
ASSERT(nLen >= 0);
- FXSYS_memcpy(rString.GetBuffer(nLen), lpszFullString, nLen * sizeof(wchar_t));
+ memcpy(rString.GetBuffer(nLen), lpszFullString, nLen * sizeof(wchar_t));
rString.ReleaseBuffer();
return true;
}
diff --git a/core/fxcodec/codec/ccodec_bmpmodule.cpp b/core/fxcodec/codec/ccodec_bmpmodule.cpp
index d891a37..660e89c 100644
--- a/core/fxcodec/codec/ccodec_bmpmodule.cpp
+++ b/core/fxcodec/codec/ccodec_bmpmodule.cpp
@@ -56,7 +56,7 @@
if (!p)
return nullptr;
- FXSYS_memset(p, 0, sizeof(FXBMP_Context));
+ memset(p, 0, sizeof(FXBMP_Context));
if (!p)
return nullptr;
diff --git a/core/fxcodec/codec/ccodec_gifmodule.cpp b/core/fxcodec/codec/ccodec_gifmodule.cpp
index b7352ba..caa21e1 100644
--- a/core/fxcodec/codec/ccodec_gifmodule.cpp
+++ b/core/fxcodec/codec/ccodec_gifmodule.cpp
@@ -88,7 +88,7 @@
if (!p)
return nullptr;
- FXSYS_memset(p, 0, sizeof(FXGIF_Context));
+ memset(p, 0, sizeof(FXGIF_Context));
p->m_AllocFunc = gif_alloc_func;
p->m_FreeFunc = gif_free_func;
p->gif_ptr = nullptr;
@@ -177,7 +177,7 @@
buf += size;
size = *buf++;
if (size == 20) {
- FXSYS_memcpy(pAttribute->m_strTime, buf, size);
+ memcpy(pAttribute->m_strTime, buf, size);
}
}
}
diff --git a/core/fxcodec/codec/ccodec_pngmodule.cpp b/core/fxcodec/codec/ccodec_pngmodule.cpp
index 2b8f957..ae34b53 100644
--- a/core/fxcodec/codec/ccodec_pngmodule.cpp
+++ b/core/fxcodec/codec/ccodec_pngmodule.cpp
@@ -55,7 +55,7 @@
png_timep t = nullptr;
png_get_tIME(png_ptr, info_ptr, &t);
if (t) {
- FXSYS_memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
+ memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
FXSYS_snprintf((char*)pAttribute->m_strTime,
sizeof(pAttribute->m_strTime), "%4u:%2u:%2u %2u:%2u:%2u",
t->year, t->month, t->day, t->hour, t->minute, t->second);
@@ -73,16 +73,16 @@
for (i = 0; i < num_text; i++) {
len = FXSYS_strlen(text[i].key);
buf = "Time";
- if (!FXSYS_memcmp(buf, text[i].key, std::min(len, FXSYS_strlen(buf)))) {
+ if (!memcmp(buf, text[i].key, std::min(len, FXSYS_strlen(buf)))) {
if (!bTime) {
- FXSYS_memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
- FXSYS_memcpy(
+ memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
+ memcpy(
pAttribute->m_strTime, text[i].text,
std::min(sizeof(pAttribute->m_strTime) - 1, text[i].text_length));
}
} else {
buf = "Author";
- if (!FXSYS_memcmp(buf, text[i].key, std::min(len, FXSYS_strlen(buf)))) {
+ if (!memcmp(buf, text[i].key, std::min(len, FXSYS_strlen(buf)))) {
pAttribute->m_strAuthor =
CFX_ByteString(reinterpret_cast<uint8_t*>(text[i].text),
static_cast<FX_STRSIZE>(text[i].text_length));
diff --git a/core/fxcodec/codec/ccodec_tiffmodule.cpp b/core/fxcodec/codec/ccodec_tiffmodule.cpp
index 0a0b56c..cc51677 100644
--- a/core/fxcodec/codec/ccodec_tiffmodule.cpp
+++ b/core/fxcodec/codec/ccodec_tiffmodule.cpp
@@ -74,15 +74,15 @@
}
void _TIFFmemset(void* ptr, int val, tmsize_t size) {
- FXSYS_memset(ptr, val, (size_t)size);
+ memset(ptr, val, (size_t)size);
}
void _TIFFmemcpy(void* des, const void* src, tmsize_t size) {
- FXSYS_memcpy(des, src, (size_t)size);
+ memcpy(des, src, (size_t)size);
}
int _TIFFmemcmp(const void* ptr1, const void* ptr2, tmsize_t size) {
- return FXSYS_memcmp(ptr1, ptr2, (size_t)size);
+ return memcmp(ptr1, ptr2, (size_t)size);
}
int _TIFFIfMultiplicationOverflow(tmsize_t op1, tmsize_t op2) {
@@ -199,7 +199,7 @@
return;
FX_STRSIZE size = FXSYS_strlen(buf);
uint8_t* ptr = FX_Alloc(uint8_t, size + 1);
- FXSYS_memcpy(ptr, buf, size);
+ memcpy(ptr, buf, size);
ptr[size] = 0;
pAttr->m_Exif[tag] = ptr;
}
diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp
index 0d886b4..900fed2 100644
--- a/core/fxcodec/codec/fx_codec.cpp
+++ b/core/fxcodec/codec/fx_codec.cpp
@@ -254,7 +254,7 @@
m_pGifLocalPalette(nullptr),
m_nGifLocalPalNum(0),
m_nBmpCompressType(0) {
- FXSYS_memset(m_strTime, 0, sizeof(m_strTime));
+ memset(m_strTime, 0, sizeof(m_strTime));
}
CFX_DIBAttribute::~CFX_DIBAttribute() {
for (const auto& pair : m_Exif)
@@ -361,7 +361,7 @@
return CheckDestSize();
}
bool CCodec_RLScanlineDecoder::v_Rewind() {
- FXSYS_memset(m_pScanline, 0, m_Pitch);
+ memset(m_pScanline, 0, m_Pitch);
m_SrcOffset = 0;
m_bEOD = false;
m_Operator = 0;
@@ -375,7 +375,7 @@
return nullptr;
}
}
- FXSYS_memset(m_pScanline, 0, m_Pitch);
+ memset(m_pScanline, 0, m_Pitch);
uint32_t col_pos = 0;
bool eol = false;
while (m_SrcOffset < m_SrcSize && !eol) {
@@ -389,7 +389,7 @@
copy_len = m_SrcSize - m_SrcOffset;
m_bEOD = true;
}
- FXSYS_memcpy(m_pScanline + col_pos, m_pSrcBuf + m_SrcOffset, copy_len);
+ memcpy(m_pScanline + col_pos, m_pSrcBuf + m_SrcOffset, copy_len);
col_pos += copy_len;
UpdateOperator((uint8_t)copy_len);
} else if (m_Operator > 128) {
@@ -402,7 +402,7 @@
duplicate_len = m_dwLineBytes - col_pos;
eol = true;
}
- FXSYS_memset(m_pScanline + col_pos, fill, duplicate_len);
+ memset(m_pScanline + col_pos, fill, duplicate_len);
col_pos += duplicate_len;
UpdateOperator((uint8_t)duplicate_len);
} else {
diff --git a/core/fxcodec/codec/fx_codec_fax.cpp b/core/fxcodec/codec/fx_codec_fax.cpp
index 7865da9..641e0fd 100644
--- a/core/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/fxcodec/codec/fx_codec_fax.cpp
@@ -123,7 +123,7 @@
dest_buf[last_byte] -= 1 << (7 - i);
if (last_byte > first_byte + 1)
- FXSYS_memset(dest_buf + first_byte + 1, 0, last_byte - first_byte - 1);
+ memset(dest_buf + first_byte + 1, 0, last_byte - first_byte - 1);
}
inline bool NextBit(const uint8_t* src_buf, int* bitpos) {
@@ -502,7 +502,7 @@
CCodec_FaxDecoder::~CCodec_FaxDecoder() {}
bool CCodec_FaxDecoder::v_Rewind() {
- FXSYS_memset(m_RefBuf.data(), 0xff, m_RefBuf.size());
+ memset(m_RefBuf.data(), 0xff, m_RefBuf.size());
m_bitpos = 0;
return true;
}
@@ -513,7 +513,7 @@
if (m_bitpos >= bitsize)
return nullptr;
- FXSYS_memset(m_ScanlineBuf.data(), 0xff, m_ScanlineBuf.size());
+ memset(m_ScanlineBuf.data(), 0xff, m_ScanlineBuf.size());
if (m_Encoding < 0) {
FaxG4GetRow(m_pSrcBuf, bitsize, &m_bitpos, m_ScanlineBuf.data(), m_RefBuf,
m_OrigWidth);
@@ -570,9 +570,9 @@
int bitpos = *pbitpos;
for (int iRow = 0; iRow < height; iRow++) {
uint8_t* line_buf = dest_buf + iRow * pitch;
- FXSYS_memset(line_buf, 0xff, pitch);
+ memset(line_buf, 0xff, pitch);
FaxG4GetRow(src_buf, src_size << 3, &bitpos, line_buf, ref_buf, width);
- FXSYS_memcpy(ref_buf.data(), line_buf, pitch);
+ memcpy(ref_buf.data(), line_buf, pitch);
}
*pbitpos = bitpos;
}
@@ -756,7 +756,7 @@
int pitch)
: m_Cols(width), m_Rows(height), m_Pitch(pitch), m_pSrcBuf(src_buf) {
m_RefLine.resize(m_Pitch);
- FXSYS_memset(m_RefLine.data(), 0xff, m_Pitch);
+ memset(m_RefLine.data(), 0xff, m_Pitch);
m_pLineBuf = FX_Alloc2D(uint8_t, m_Pitch, 8);
m_DestBuf.EstimateSize(0, 10240);
}
@@ -772,13 +772,13 @@
uint8_t last_byte = 0;
for (int i = 0; i < m_Rows; i++) {
const uint8_t* scan_line = m_pSrcBuf + i * m_Pitch;
- FXSYS_memset(m_pLineBuf, 0, m_Pitch * 8);
+ memset(m_pLineBuf, 0, m_Pitch * 8);
m_pLineBuf[0] = last_byte;
FaxEncode2DLine(m_pLineBuf, &dest_bitpos, scan_line, m_RefLine, m_Cols);
m_DestBuf.AppendBlock(m_pLineBuf, dest_bitpos / 8);
last_byte = m_pLineBuf[dest_bitpos / 8];
dest_bitpos %= 8;
- FXSYS_memcpy(m_RefLine.data(), scan_line, m_Pitch);
+ memcpy(m_RefLine.data(), scan_line, m_Pitch);
}
if (dest_bitpos)
m_DestBuf.AppendByte(last_byte);
diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp
index dd9c4c9..2ac3161 100644
--- a/core/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/fxcodec/codec/fx_codec_flate.cpp
@@ -52,7 +52,7 @@
void* FlateInit() {
z_stream* p = FX_Alloc(z_stream, 1);
- FXSYS_memset(p, 0, sizeof(z_stream));
+ memset(p, 0, sizeof(z_stream));
p->zalloc = my_alloc_func;
p->zfree = my_free_func;
inflateInit(p);
@@ -80,7 +80,7 @@
uint32_t written = post_pos - pre_pos;
if (written < dest_size)
- FXSYS_memset(dest_buf + written, '\0', dest_size - written);
+ memset(dest_buf + written, '\0', dest_size - written);
return ret;
}
@@ -290,7 +290,7 @@
int BytesPerPixel = (bpc * nColors + 7) / 8;
uint8_t tag = pSrcData[0];
if (tag == 0) {
- FXSYS_memmove(pDestData, pSrcData + 1, row_size);
+ memmove(pDestData, pSrcData + 1, row_size);
return;
}
for (int byte = 0; byte < row_size; byte++) {
@@ -372,7 +372,7 @@
if ((row + 1) * (move_size + 1) > (int)data_size) {
move_size = last_row_size - 1;
}
- FXSYS_memmove(pDestData, pSrcData + 1, move_size);
+ memmove(pDestData, pSrcData + 1, move_size);
pSrcData += move_size + 1;
pDestData += move_size;
byte_cnt += move_size;
@@ -603,7 +603,7 @@
tmp_buf_size = last_buf_size;
uint32_t cp_size = std::min(tmp_buf_size, remaining);
- FXSYS_memcpy(result_buf + result_pos, tmp_buf, cp_size);
+ memcpy(result_buf + result_pos, tmp_buf, cp_size);
result_pos += cp_size;
remaining -= cp_size;
@@ -736,7 +736,7 @@
FlateOutput(m_pFlate, m_pPredictRaw, m_PredictPitch + 1);
PNG_PredictLine(m_pScanline, m_pPredictRaw, m_pLastLine,
m_BitsPerComponent, m_Colors, m_Columns);
- FXSYS_memcpy(m_pLastLine, m_pScanline, m_PredictPitch);
+ memcpy(m_pLastLine, m_pScanline, m_PredictPitch);
} else {
FlateOutput(m_pFlate, m_pScanline, m_Pitch);
TIFF_PredictLine(m_pScanline, m_PredictPitch, m_bpc, m_nComps,
@@ -747,9 +747,8 @@
size_t read_leftover =
m_LeftOver > bytes_to_go ? bytes_to_go : m_LeftOver;
if (read_leftover) {
- FXSYS_memcpy(m_pScanline,
- m_pPredictBuffer + m_PredictPitch - m_LeftOver,
- read_leftover);
+ memcpy(m_pScanline, m_pPredictBuffer + m_PredictPitch - m_LeftOver,
+ read_leftover);
m_LeftOver -= read_leftover;
bytes_to_go -= read_leftover;
}
@@ -758,7 +757,7 @@
FlateOutput(m_pFlate, m_pPredictRaw, m_PredictPitch + 1);
PNG_PredictLine(m_pPredictBuffer, m_pPredictRaw, m_pLastLine,
m_BitsPerComponent, m_Colors, m_Columns);
- FXSYS_memcpy(m_pLastLine, m_pPredictBuffer, m_PredictPitch);
+ memcpy(m_pLastLine, m_pPredictBuffer, m_PredictPitch);
} else {
FlateOutput(m_pFlate, m_pPredictBuffer, m_PredictPitch);
TIFF_PredictLine(m_pPredictBuffer, m_PredictPitch, m_BitsPerComponent,
@@ -766,8 +765,8 @@
}
size_t read_bytes =
m_PredictPitch > bytes_to_go ? bytes_to_go : m_PredictPitch;
- FXSYS_memcpy(m_pScanline + m_Pitch - bytes_to_go, m_pPredictBuffer,
- read_bytes);
+ memcpy(m_pScanline + m_Pitch - bytes_to_go, m_pPredictBuffer,
+ read_bytes);
m_LeftOver += m_PredictPitch - read_bytes;
bytes_to_go -= read_bytes;
}
@@ -873,7 +872,7 @@
uint8_t** dest_buf,
uint32_t* dest_size) {
uint8_t* pSrcBuf = FX_Alloc(uint8_t, src_size);
- FXSYS_memcpy(pSrcBuf, src_buf, src_size);
+ memcpy(pSrcBuf, src_buf, src_size);
PNG_PredictorEncode(&pSrcBuf, &src_size);
bool ret = Encode(pSrcBuf, src_size, dest_buf, dest_size);
FX_Free(pSrcBuf);
diff --git a/core/fxcodec/codec/fx_codec_jbig.cpp b/core/fxcodec/codec/fx_codec_jbig.cpp
index 926541f..dc82305 100644
--- a/core/fxcodec/codec/fx_codec_jbig.cpp
+++ b/core/fxcodec/codec/fx_codec_jbig.cpp
@@ -62,7 +62,7 @@
pJbig2Context->m_dest_buf = dest_buf;
pJbig2Context->m_dest_pitch = dest_pitch;
pJbig2Context->m_pPause = pPause;
- FXSYS_memset(dest_buf, 0, height * dest_pitch);
+ memset(dest_buf, 0, height * dest_pitch);
pJbig2Context->m_pContext = pdfium::MakeUnique<CJBig2_Context>(
global_stream, src_stream, pJBig2DocumentContext->GetSymbolDictCache(),
pPause, false);
diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp
index 0431560..584148d 100644
--- a/core/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/fxcodec/codec/fx_codec_jpeg.cpp
@@ -185,9 +185,9 @@
m_pScanlineBuf = nullptr;
m_bStarted = false;
m_bInited = false;
- FXSYS_memset(&cinfo, 0, sizeof(cinfo));
- FXSYS_memset(&jerr, 0, sizeof(jerr));
- FXSYS_memset(&src, 0, sizeof(src));
+ memset(&cinfo, 0, sizeof(cinfo));
+ memset(&jerr, 0, sizeof(jerr));
+ memset(&src, 0, sizeof(src));
m_nDefaultScaleDenom = 1;
}
@@ -253,8 +253,7 @@
src.fill_input_buffer = _src_fill_buffer;
src.resync_to_restart = _src_resync;
m_bJpegTransform = ColorTransform;
- if (src_size > 1 &&
- FXSYS_memcmp(src_buf + src_size - 2, "\xFF\xD9", 2) != 0) {
+ if (src_size > 1 && memcmp(src_buf + src_size - 2, "\xFF\xD9", 2) != 0) {
((uint8_t*)src_buf)[src_size - 2] = 0xFF;
((uint8_t*)src_buf)[src_size - 1] = 0xD9;
}
diff --git a/core/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/fxcodec/codec/fx_codec_jpx_opj.cpp
index 4fc3d68..30e79de 100644
--- a/core/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -564,9 +564,9 @@
image->comps[1] = image->comps[0];
image->comps[2] = image->comps[0];
image->comps[1].data = FX_Alloc(int, (size_t)max);
- FXSYS_memset(image->comps[1].data, 0, sizeof(int) * (size_t)max);
+ memset(image->comps[1].data, 0, sizeof(int) * (size_t)max);
image->comps[2].data = FX_Alloc(int, (size_t)max);
- FXSYS_memset(image->comps[2].data, 0, sizeof(int) * (size_t)max);
+ memset(image->comps[2].data, 0, sizeof(int) * (size_t)max);
image->numcomps += 2;
r = image->comps[0].data;
for (int i = 0; i < max; ++i) {
@@ -707,7 +707,7 @@
opj_set_default_decoder_parameters(¶meters);
parameters.decod_format = 0;
parameters.cod_format = 3;
- if (FXSYS_memcmp(m_SrcData, szJP2Header, sizeof(szJP2Header)) == 0) {
+ if (memcmp(m_SrcData, szJP2Header, sizeof(szJP2Header)) == 0) {
l_codec = opj_create_decompress(OPJ_CODEC_JP2);
parameters.decod_format = 1;
} else {
@@ -788,7 +788,7 @@
if (pitch<(int)(image->comps[0].w * 8 * image->numcomps + 31)>> 5 << 2)
return false;
- FXSYS_memset(dest_buf, 0xff, image->y1 * pitch);
+ memset(dest_buf, 0xff, image->y1 * pitch);
std::vector<uint8_t*> channel_bufs(image->numcomps);
std::vector<int> adjust_comps(image->numcomps);
for (uint32_t i = 0; i < image->numcomps; i++) {
diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp
index e06c592..d8b123b 100644
--- a/core/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/fxcodec/codec/fx_codec_progress.cpp
@@ -331,7 +331,7 @@
} else {
uint32_t dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -593,7 +593,7 @@
} else {
uint32_t dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -682,7 +682,7 @@
case 3: {
uint8_t gray =
FXRGB2GRAY(FXARGB_R(argb), FXARGB_G(argb), FXARGB_B(argb));
- FXSYS_memset(pScanline, gray, sizeX);
+ memset(pScanline, gray, sizeX);
break;
}
case 8: {
@@ -724,11 +724,11 @@
if (m_GifTransIndex != -1 && m_pDeviceBitmap->HasAlpha()) {
pal_index = m_GifTransIndex;
}
- FXSYS_memset(m_pDecodeBuf, pal_index, m_SrcWidth);
+ memset(m_pDecodeBuf, pal_index, m_SrcWidth);
bool bLastPass = (row_num % 2) == 1;
int32_t line = row_num + m_GifFrameRect.top;
int32_t left = m_GifFrameRect.left;
- FXSYS_memcpy(m_pDecodeBuf + left, row_buf, img_width);
+ memcpy(m_pDecodeBuf + left, row_buf, img_width);
int src_top = m_clipBox.top;
int src_bottom = m_clipBox.bottom;
int des_top = m_startY;
@@ -762,7 +762,7 @@
uint8_t* scan_des =
(uint8_t*)pDIBitmap->GetScanline(cur_row) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memmove(scan_des, scan_src, size);
+ memmove(scan_des, scan_src, size);
}
}
if (bLastPass)
@@ -872,7 +872,7 @@
} else {
uint32_t dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -897,7 +897,7 @@
uint8_t* row_buf) {
CFX_RetainPtr<CFX_DIBitmap> pDIBitmap = m_pDeviceBitmap;
ASSERT(pDIBitmap);
- FXSYS_memcpy(m_pDecodeBuf, row_buf, m_ScanlineSize);
+ memcpy(m_pDecodeBuf, row_buf, m_ScanlineSize);
int src_top = m_clipBox.top;
int src_bottom = m_clipBox.bottom;
int des_top = m_startY;
@@ -941,7 +941,7 @@
uint8_t* scan_des =
(uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memmove(scan_des, scan_src, size);
+ memmove(scan_des, scan_src, size);
}
return;
}
@@ -1017,7 +1017,7 @@
}
FX_Free(m_pSrcBuf);
m_pSrcBuf = FX_Alloc(uint8_t, size);
- FXSYS_memset(m_pSrcBuf, 0, size);
+ memset(m_pSrcBuf, 0, size);
m_SrcSize = size;
switch (imageType) {
case FXCODEC_IMAGE_BMP: {
@@ -1059,8 +1059,8 @@
FX_Free(m_pSrcPalette);
if (m_SrcPaletteNumber) {
m_pSrcPalette = FX_Alloc(FX_ARGB, m_SrcPaletteNumber);
- FXSYS_memcpy(m_pSrcPalette, pPalette,
- m_SrcPaletteNumber * sizeof(uint32_t));
+ memcpy(m_pSrcPalette, pPalette,
+ m_SrcPaletteNumber * sizeof(uint32_t));
} else {
m_pSrcPalette = nullptr;
}
@@ -1150,7 +1150,7 @@
if (m_pSrcBuf && input_size > m_SrcSize) {
FX_Free(m_pSrcBuf);
m_pSrcBuf = FX_Alloc(uint8_t, input_size);
- FXSYS_memset(m_pSrcBuf, 0, input_size);
+ memset(m_pSrcBuf, 0, input_size);
m_SrcSize = input_size;
}
bResult = m_pFile->ReadBlock(m_pSrcBuf, m_offSet, input_size);
@@ -1531,7 +1531,7 @@
pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
des_g += pixel_weight * src_scan[j];
}
- FXSYS_memset(des_scan, (uint8_t)(des_g >> 16), 3);
+ memset(des_scan, (uint8_t)(des_g >> 16), 3);
des_scan += des_Bpp;
} break;
case 8: {
@@ -1664,7 +1664,7 @@
uint8_t* scan_des =
(uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memmove(scan_des, scan_src, size);
+ memmove(scan_des, scan_src, size);
}
}
return;
@@ -1739,7 +1739,7 @@
uint8_t* scan_des =
(uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memmove(scan_des, scan_src, size);
+ memmove(scan_des, scan_src, size);
}
}
return;
@@ -1755,7 +1755,7 @@
uint8_t* scan_des =
(uint8_t*)pDeviceBitmap->GetScanline(des_row + i) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memmove(scan_des, scan_src, size);
+ memmove(scan_des, scan_src, size);
}
}
}
@@ -1912,7 +1912,7 @@
scanline_size = (scanline_size * m_SrcComponents + 3) / 4 * 4;
FX_Free(m_pDecodeBuf);
m_pDecodeBuf = FX_Alloc(uint8_t, scanline_size);
- FXSYS_memset(m_pDecodeBuf, 0, scanline_size);
+ memset(m_pDecodeBuf, 0, scanline_size);
m_WeightHorz.Calc(m_sizeX, 0, m_sizeX, m_clipBox.Width(), 0,
m_clipBox.Width(), m_bInterpol);
m_WeightVert.Calc(m_sizeY, m_clipBox.Height());
@@ -1977,7 +1977,7 @@
int scanline_size = (m_SrcWidth * m_SrcComponents + 3) / 4 * 4;
FX_Free(m_pDecodeBuf);
m_pDecodeBuf = FX_Alloc(uint8_t, scanline_size);
- FXSYS_memset(m_pDecodeBuf, 0, scanline_size);
+ memset(m_pDecodeBuf, 0, scanline_size);
m_WeightHorzOO.Calc(m_sizeX, m_clipBox.Width(), m_bInterpol);
m_WeightVert.Calc(m_sizeY, m_clipBox.Height());
m_status = FXCODEC_STATUS_DECODE_TOBECONTINUE;
@@ -1996,7 +1996,7 @@
int scanline_size = (m_SrcWidth + 3) / 4 * 4;
FX_Free(m_pDecodeBuf);
m_pDecodeBuf = FX_Alloc(uint8_t, scanline_size);
- FXSYS_memset(m_pDecodeBuf, 0, scanline_size);
+ memset(m_pDecodeBuf, 0, scanline_size);
m_WeightHorz.Calc(m_sizeX, 0, m_sizeX, m_clipBox.Width(), 0,
m_clipBox.Width(), m_bInterpol);
m_WeightVert.Calc(m_sizeY, m_clipBox.Height());
@@ -2027,7 +2027,7 @@
m_ScanlineSize = (m_SrcWidth * m_SrcComponents + 3) / 4 * 4;
FX_Free(m_pDecodeBuf);
m_pDecodeBuf = FX_Alloc(uint8_t, m_ScanlineSize);
- FXSYS_memset(m_pDecodeBuf, 0, m_ScanlineSize);
+ memset(m_pDecodeBuf, 0, m_ScanlineSize);
m_WeightHorz.Calc(m_sizeX, 0, m_sizeX, m_clipBox.Width(), 0,
m_clipBox.Width(), m_bInterpol);
m_WeightVert.Calc(m_sizeY, m_clipBox.Height());
@@ -2102,7 +2102,7 @@
if (m_pSrcBuf && input_size > m_SrcSize) {
FX_Free(m_pSrcBuf);
m_pSrcBuf = FX_Alloc(uint8_t, input_size);
- FXSYS_memset(m_pSrcBuf, 0, input_size);
+ memset(m_pSrcBuf, 0, input_size);
m_SrcSize = input_size;
}
bool bResult = m_pFile->ReadBlock(m_pSrcBuf, m_offSet, input_size);
diff --git a/core/fxcodec/jbig2/JBig2_Define.h b/core/fxcodec/jbig2/JBig2_Define.h
index 86df248..2934de4 100644
--- a/core/fxcodec/jbig2/JBig2_Define.h
+++ b/core/fxcodec/jbig2/JBig2_Define.h
@@ -9,9 +9,9 @@
#include "core/fxcrt/fx_system.h"
-#define JBIG2_memset FXSYS_memset
-#define JBIG2_memcmp FXSYS_memcmp
-#define JBIG2_memcpy FXSYS_memcpy
+#define JBIG2_memset memset
+#define JBIG2_memcmp memcmp
+#define JBIG2_memcpy memcpy
#define JBIG2_OOB 1
struct JBig2RegionInfo {
diff --git a/core/fxcodec/lbmp/fx_bmp.cpp b/core/fxcodec/lbmp/fx_bmp.cpp
index 73a62d4..e4fa17d 100644
--- a/core/fxcodec/lbmp/fx_bmp.cpp
+++ b/core/fxcodec/lbmp/fx_bmp.cpp
@@ -47,7 +47,7 @@
}
bmp_decompress_struct_p bmp_create_decompress() {
bmp_decompress_struct_p bmp_ptr = FX_Alloc(bmp_decompress_struct, 1);
- FXSYS_memset(bmp_ptr, 0, sizeof(bmp_decompress_struct));
+ memset(bmp_ptr, 0, sizeof(bmp_decompress_struct));
bmp_ptr->decode_status = BMP_D_STATUS_HEADER;
bmp_ptr->bmp_header_ptr = FX_Alloc(BmpFileHeader, 1);
return bmp_ptr;
@@ -233,7 +233,7 @@
}
bmp_ptr->out_row_buffer = FX_Alloc(uint8_t, bmp_ptr->out_row_bytes);
- FXSYS_memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
bmp_save_decoding_status(bmp_ptr, BMP_D_STATUS_PAL);
}
if (bmp_ptr->decode_status == BMP_D_STATUS_PAL) {
@@ -388,7 +388,7 @@
case 8:
case 24:
case 32:
- FXSYS_memcpy(bmp_ptr->out_row_buffer, des_buf, bmp_ptr->src_row_bytes);
+ memcpy(bmp_ptr->out_row_buffer, des_buf, bmp_ptr->src_row_bytes);
break;
}
row_buf = bmp_ptr->out_row_buffer;
@@ -429,7 +429,7 @@
: (bmp_ptr->height - 1 - bmp_ptr->row_num++),
bmp_ptr->out_row_buffer);
bmp_ptr->col_num = 0;
- FXSYS_memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
bmp_save_decoding_status(bmp_ptr, BMP_D_STATUS_DATA);
continue;
}
@@ -458,7 +458,7 @@
return 0;
}
while (bmp_ptr->row_num < bmp_row_num_next) {
- FXSYS_memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
bmp_ptr->bmp_get_row_fn(
bmp_ptr, bmp_ptr->imgTB_flag
? bmp_ptr->row_num++
@@ -479,8 +479,8 @@
bmp_ptr->skip_size = skip_size_org;
return 2;
}
- FXSYS_memcpy(bmp_ptr->out_row_buffer + bmp_ptr->col_num,
- second_byte_ptr, *first_byte_ptr);
+ memcpy(bmp_ptr->out_row_buffer + bmp_ptr->col_num, second_byte_ptr,
+ *first_byte_ptr);
bmp_ptr->col_num += (int32_t)(*first_byte_ptr);
}
}
@@ -495,8 +495,8 @@
bmp_ptr->skip_size = skip_size_org;
return 2;
}
- FXSYS_memset(bmp_ptr->out_row_buffer + bmp_ptr->col_num,
- *second_byte_ptr, *first_byte_ptr);
+ memset(bmp_ptr->out_row_buffer + bmp_ptr->col_num, *second_byte_ptr,
+ *first_byte_ptr);
bmp_ptr->col_num += (int32_t)(*first_byte_ptr);
}
}
@@ -533,7 +533,7 @@
: (bmp_ptr->height - 1 - bmp_ptr->row_num++),
bmp_ptr->out_row_buffer);
bmp_ptr->col_num = 0;
- FXSYS_memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
bmp_save_decoding_status(bmp_ptr, BMP_D_STATUS_DATA);
continue;
}
@@ -562,7 +562,7 @@
return 0;
}
while (bmp_ptr->row_num < bmp_row_num_next) {
- FXSYS_memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
bmp_ptr->bmp_get_row_fn(
bmp_ptr, bmp_ptr->imgTB_flag
? bmp_ptr->row_num++
@@ -669,7 +669,7 @@
bmp_compress_struct_p bmp_ptr;
bmp_ptr = FX_Alloc(bmp_compress_struct, 1);
if (bmp_ptr) {
- FXSYS_memset(bmp_ptr, 0, sizeof(bmp_compress_struct));
+ memset(bmp_ptr, 0, sizeof(bmp_compress_struct));
}
return bmp_ptr;
}
@@ -734,7 +734,7 @@
dst_pos = bmp_ptr->file_header.bfOffBits;
dst_size += size;
dst_buf = FX_Realloc(uint8_t, dst_buf, dst_size);
- FXSYS_memset(&dst_buf[dst_pos], 0, size);
+ memset(&dst_buf[dst_pos], 0, size);
uint32_t mask_red;
uint32_t mask_green;
uint32_t mask_blue;
@@ -818,11 +818,10 @@
dst_pos = bmp_ptr->file_header.bfOffBits;
dst_size += size;
dst_buf = FX_Realloc(uint8_t, dst_buf, dst_size);
- FXSYS_memset(&dst_buf[dst_pos], 0, size);
+ memset(&dst_buf[dst_pos], 0, size);
for (int32_t row_num = bmp_ptr->src_row - 1; row_num > -1; row_num--) {
- FXSYS_memcpy(&dst_buf[dst_pos],
- &bmp_ptr->src_buf[row_num * bmp_ptr->src_pitch],
- bmp_ptr->src_pitch);
+ memcpy(&dst_buf[dst_pos], &bmp_ptr->src_buf[row_num * bmp_ptr->src_pitch],
+ bmp_ptr->src_pitch);
dst_pos += dst_pitch;
}
dst_size = dst_pos;
@@ -847,7 +846,7 @@
dst_pos = bmp_ptr->file_header.bfOffBits;
dst_size += size;
dst_buf = FX_Realloc(uint8_t, dst_buf, dst_size);
- FXSYS_memset(&dst_buf[dst_pos], 0, size);
+ memset(&dst_buf[dst_pos], 0, size);
for (int32_t row_num = bmp_ptr->src_row - 1, i = 0; row_num > -1;) {
index = row_num * bmp_ptr->src_pitch;
rle[0] = bmp_rle8_search(&bmp_ptr->src_buf[index + i], size - index - i);
@@ -892,7 +891,7 @@
dst_pos = bmp_ptr->file_header.bfOffBits;
dst_size += size;
dst_buf = FX_Realloc(uint8_t, dst_buf, dst_size);
- FXSYS_memset(&dst_buf[dst_pos], 0, size);
+ memset(&dst_buf[dst_pos], 0, size);
for (int32_t row_num = bmp_ptr->src_row - 1, i = 0; row_num > -1;
rle[1] = 0) {
index = row_num * bmp_ptr->src_pitch;
@@ -933,10 +932,10 @@
if (!dst_buf)
return false;
- FXSYS_memset(dst_buf, 0, dst_size);
+ memset(dst_buf, 0, dst_size);
bmp_ptr->file_header.bfOffBits = head_size;
if (bmp_ptr->pal_ptr && pal_size) {
- FXSYS_memcpy(&dst_buf[head_size], bmp_ptr->pal_ptr, pal_size);
+ memcpy(&dst_buf[head_size], bmp_ptr->pal_ptr, pal_size);
bmp_ptr->file_header.bfOffBits += pal_size;
}
WriteInfoHeader(&bmp_ptr->info_header, dst_buf);
diff --git a/core/fxcodec/lgif/fx_gif.cpp b/core/fxcodec/lgif/fx_gif.cpp
index 52cb81b..3d5d0e2 100644
--- a/core/fxcodec/lgif/fx_gif.cpp
+++ b/core/fxcodec/lgif/fx_gif.cpp
@@ -52,8 +52,8 @@
code_size_cur = code_size + 1;
code_next = code_end + 1;
code_old = (uint16_t)-1;
- FXSYS_memset(code_table, 0, sizeof(tag_Table) * GIF_MAX_LZW_CODE);
- FXSYS_memset(stack, 0, GIF_MAX_LZW_CODE);
+ memset(code_table, 0, sizeof(tag_Table) * GIF_MAX_LZW_CODE);
+ memset(stack, 0, GIF_MAX_LZW_CODE);
for (uint16_t i = 0; i < code_clear; i++) {
code_table[i].suffix = (uint8_t)i;
}
@@ -90,11 +90,11 @@
uint32_t i = 0;
if (stack_size != 0) {
if (des_size < stack_size) {
- FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size);
+ memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size);
stack_size -= (uint16_t)des_size;
return 3;
}
- FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
+ memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
des_buf += stack_size;
i += stack_size;
stack_size = 0;
@@ -161,13 +161,11 @@
}
code_old = code;
if (i + stack_size > des_size) {
- FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size],
- des_size - i);
+ memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size - i);
stack_size -= (uint16_t)(des_size - i);
return 3;
}
- FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size],
- stack_size);
+ memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
des_buf += stack_size;
i += stack_size;
stack_size = 0;
@@ -192,7 +190,7 @@
dst_len = size;
dst_buf = FX_Realloc(uint8_t, dst_buf, dst_len);
}
- FXSYS_memset(dst_buf + len_org, 0, dst_len - len_org);
+ memset(dst_buf + len_org, 0, dst_len - len_org);
return !!dst_buf;
}
return true;
@@ -229,7 +227,7 @@
return buf[offset++];
}
CGifLZWEncoder::CGifLZWEncoder() {
- FXSYS_memset(this, 0, sizeof(CGifLZWEncoder));
+ memset(this, 0, sizeof(CGifLZWEncoder));
}
CGifLZWEncoder::~CGifLZWEncoder() {}
void CGifLZWEncoder::ClearTable() {
@@ -272,9 +270,9 @@
longjmp(jmp, 1);
}
dst_buf[offset++] = index_buf_len;
- FXSYS_memcpy(&dst_buf[offset], index_buf, index_buf_len);
+ memcpy(&dst_buf[offset], index_buf, index_buf_len);
offset += index_buf_len;
- FXSYS_memset(index_buf, 0, GIF_DATA_BLOCK);
+ memset(index_buf, 0, GIF_DATA_BLOCK);
index_buf_len = 0;
}
void CGifLZWEncoder::EncodeString(uint32_t index,
@@ -391,7 +389,7 @@
}
gif_decompress_struct_p gif_create_decompress() {
gif_decompress_struct_p gif_ptr = FX_Alloc(gif_decompress_struct, 1);
- FXSYS_memset(gif_ptr, 0, sizeof(gif_decompress_struct));
+ memset(gif_ptr, 0, sizeof(gif_decompress_struct));
gif_ptr->decode_status = GIF_D_STATUS_SIG;
gif_ptr->img_ptr_arr_ptr = new std::vector<GifImage*>;
gif_ptr->cmt_data_ptr = new CFX_ByteString;
@@ -439,7 +437,7 @@
}
gif_compress_struct_p gif_create_compress() {
gif_compress_struct_p gif_ptr = FX_Alloc(gif_compress_struct, 1);
- FXSYS_memset(gif_ptr, 0, sizeof(gif_compress_struct));
+ memset(gif_ptr, 0, sizeof(gif_compress_struct));
gif_ptr->img_encoder_ptr = new CGifLZWEncoder;
gif_ptr->header_ptr = FX_Alloc(GifHeader, 1);
if (!gif_ptr->header_ptr) {
@@ -447,8 +445,8 @@
FX_Free(gif_ptr);
return nullptr;
}
- FXSYS_memcpy(gif_ptr->header_ptr->signature, GIF_SIGNATURE, 3);
- FXSYS_memcpy(gif_ptr->header_ptr->version, "89a", 3);
+ memcpy(gif_ptr->header_ptr->signature, GIF_SIGNATURE, 3);
+ memcpy(gif_ptr->header_ptr->version, "89a", 3);
gif_ptr->lsd_ptr = FX_Alloc(GifLSD, 1);
if (!gif_ptr->lsd_ptr) {
FX_Free(gif_ptr->header_ptr);
@@ -456,7 +454,7 @@
FX_Free(gif_ptr);
return nullptr;
}
- FXSYS_memset(gif_ptr->lsd_ptr, 0, sizeof(GifLSD));
+ memset(gif_ptr->lsd_ptr, 0, sizeof(GifLSD));
gif_ptr->image_info_ptr = FX_Alloc(GifImageInfo, 1);
if (!gif_ptr->image_info_ptr) {
FX_Free(gif_ptr->lsd_ptr);
@@ -465,7 +463,7 @@
FX_Free(gif_ptr);
return nullptr;
}
- FXSYS_memset(gif_ptr->image_info_ptr, 0, sizeof(GifImageInfo));
+ memset(gif_ptr->image_info_ptr, 0, sizeof(GifImageInfo));
gif_ptr->gce_ptr = FX_Alloc(GifGCE, 1);
if (!gif_ptr->gce_ptr) {
FX_Free(gif_ptr->image_info_ptr);
@@ -485,7 +483,7 @@
FX_Free(gif_ptr);
return nullptr;
}
- FXSYS_memset(gif_ptr->pte_ptr, 0, sizeof(GifPTE));
+ memset(gif_ptr->pte_ptr, 0, sizeof(GifPTE));
gif_ptr->pte_ptr->block_size = 12;
return gif_ptr;
}
@@ -548,7 +546,7 @@
((GifGF*)&gif_lsd_ptr->global_flag)->color_resolution;
FX_Free(gif_ptr->global_pal_ptr);
gif_ptr->global_pal_ptr = (GifPalette*)FX_Alloc(uint8_t, global_pal_size);
- FXSYS_memcpy(gif_ptr->global_pal_ptr, global_pal_ptr, global_pal_size);
+ memcpy(gif_ptr->global_pal_ptr, global_pal_ptr, global_pal_size);
}
gif_ptr->width = (int)GetWord_LSBFirst((uint8_t*)&gif_lsd_ptr->width);
gif_ptr->height = (int)GetWord_LSBFirst((uint8_t*)&gif_lsd_ptr->height);
@@ -690,7 +688,7 @@
return 2;
}
GifPlainText* gif_pt_ptr = FX_Alloc(GifPlainText, 1);
- FXSYS_memset(gif_pt_ptr, 0, sizeof(GifPlainText));
+ memset(gif_pt_ptr, 0, sizeof(GifPlainText));
gif_takeover_gce_ptr(gif_ptr, &gif_pt_ptr->gce_ptr);
gif_pt_ptr->pte_ptr = FX_Alloc(GifPTE, 1);
gif_pt_ptr->string_ptr = new CFX_ByteString;
@@ -781,7 +779,7 @@
return 2;
GifImage* gif_image_ptr = FX_Alloc(GifImage, 1);
- FXSYS_memset(gif_image_ptr, 0, sizeof(GifImage));
+ memset(gif_image_ptr, 0, sizeof(GifImage));
gif_image_ptr->image_info_ptr = FX_Alloc(GifImageInfo, 1);
gif_image_ptr->image_info_ptr->left =
GetWord_LSBFirst((uint8_t*)&gif_img_info_ptr->left);
@@ -819,8 +817,7 @@
gif_image_ptr->local_pal_ptr =
(GifPalette*)gif_ptr->gif_ask_buf_for_pal_fn(gif_ptr, loc_pal_size);
if (gif_image_ptr->local_pal_ptr) {
- FXSYS_memcpy((uint8_t*)gif_image_ptr->local_pal_ptr, loc_pal_ptr,
- loc_pal_size);
+ memcpy((uint8_t*)gif_image_ptr->local_pal_ptr, loc_pal_ptr, loc_pal_size);
}
}
uint8_t* code_size_ptr = nullptr;
@@ -1065,8 +1062,8 @@
if (!dst_buf)
return false;
- FXSYS_memset(dst_buf, 0, dst_len);
- FXSYS_memcpy(dst_buf, gif_ptr->header_ptr, sizeof(GifHeader));
+ memset(dst_buf, 0, dst_len);
+ memcpy(dst_buf, gif_ptr->header_ptr, sizeof(GifHeader));
gif_ptr->cur_offset += sizeof(GifHeader);
SetWord_LSBFirst(dst_buf + gif_ptr->cur_offset, gif_ptr->lsd_ptr->width);
gif_ptr->cur_offset += 2;
@@ -1080,7 +1077,7 @@
if (!gif_grow_buf(dst_buf, dst_len, gif_ptr->cur_offset + size)) {
return false;
}
- FXSYS_memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->global_pal, size);
+ memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->global_pal, size);
gif_ptr->cur_offset += size;
}
return true;
@@ -1101,13 +1098,13 @@
j = 3;
}
temp = FX_Alloc(uint8_t, pitch);
- FXSYS_memcpy(temp, &buf[pitch * row], pitch);
+ memcpy(temp, &buf[pitch * row], pitch);
pass[j].push_back(temp);
row++;
}
for (size_t i = 0, row = 0; i < 4; i++) {
for (size_t j = 0; j < pass[i].size(); j++, row++) {
- FXSYS_memcpy((uint8_t*)&buf[pitch * row], pass[i][j], pitch);
+ memcpy((uint8_t*)&buf[pitch * row], pass[i][j], pitch);
FX_Free(pass[i][j]);
}
}
@@ -1120,13 +1117,13 @@
uint32_t src_offset = 0;
while (src_len > GIF_DATA_BLOCK) {
dst_buf[dst_offset++] = GIF_DATA_BLOCK;
- FXSYS_memcpy(&dst_buf[dst_offset], &src_buf[src_offset], GIF_DATA_BLOCK);
+ memcpy(&dst_buf[dst_offset], &src_buf[src_offset], GIF_DATA_BLOCK);
dst_offset += GIF_DATA_BLOCK;
src_offset += GIF_DATA_BLOCK;
src_len -= GIF_DATA_BLOCK;
}
dst_buf[dst_offset++] = (uint8_t)src_len;
- FXSYS_memcpy(&dst_buf[dst_offset], &src_buf[src_offset], src_len);
+ memcpy(&dst_buf[dst_offset], &src_buf[src_offset], src_len);
dst_offset += src_len;
}
static bool gif_write_data(gif_compress_struct_p gif_ptr,
@@ -1135,7 +1132,7 @@
if (!gif_grow_buf(dst_buf, dst_len, gif_ptr->cur_offset + GIF_DATA_BLOCK)) {
return false;
}
- if (FXSYS_memcmp(gif_ptr->header_ptr->version, "89a", 3) == 0) {
+ if (memcmp(gif_ptr->header_ptr->version, "89a", 3) == 0) {
dst_buf[gif_ptr->cur_offset++] = GIF_SIG_EXTENSION;
dst_buf[gif_ptr->cur_offset++] = GIF_BLOCK_GCE;
gif_ptr->gce_ptr->block_size = 4;
@@ -1169,7 +1166,7 @@
if (!gif_grow_buf(dst_buf, dst_len, pal_size + gif_ptr->cur_offset)) {
return false;
}
- FXSYS_memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->local_pal, pal_size);
+ memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->local_pal, pal_size);
gif_ptr->cur_offset += pal_size;
}
if (lf.interlace) {
@@ -1196,7 +1193,7 @@
}
gif_ptr->img_encoder_ptr->Finish(dst_buf, dst_len, gif_ptr->cur_offset);
dst_buf[gif_ptr->cur_offset++] = 0;
- if (FXSYS_memcmp(gif_ptr->header_ptr->version, "89a", 3) == 0 &&
+ if (memcmp(gif_ptr->header_ptr->version, "89a", 3) == 0 &&
gif_ptr->cmt_data_ptr) {
dst_buf[gif_ptr->cur_offset++] = GIF_SIG_EXTENSION;
dst_buf[gif_ptr->cur_offset++] = GIF_BLOCK_CE;
@@ -1204,7 +1201,7 @@
dst_len, gif_ptr->cur_offset);
dst_buf[gif_ptr->cur_offset++] = 0;
}
- if (FXSYS_memcmp(gif_ptr->header_ptr->version, "89a", 3) == 0 &&
+ if (memcmp(gif_ptr->header_ptr->version, "89a", 3) == 0 &&
gif_ptr->pte_data_ptr) {
dst_buf[gif_ptr->cur_offset++] = GIF_SIG_EXTENSION;
dst_buf[gif_ptr->cur_offset++] = GIF_BLOCK_PTE;
diff --git a/core/fxcrt/cfx_bytestring.cpp b/core/fxcrt/cfx_bytestring.cpp
index 2d3f0ab..cca8ad6 100644
--- a/core/fxcrt/cfx_bytestring.cpp
+++ b/core/fxcrt/cfx_bytestring.cpp
@@ -196,7 +196,7 @@
return m_pData->m_nDataLength == 0;
return FXSYS_strlen(ptr) == m_pData->m_nDataLength &&
- FXSYS_memcmp(ptr, m_pData->m_String, m_pData->m_nDataLength) == 0;
+ memcmp(ptr, m_pData->m_String, m_pData->m_nDataLength) == 0;
}
bool CFX_ByteString::operator==(const CFX_ByteStringC& str) const {
@@ -204,7 +204,7 @@
return str.IsEmpty();
return m_pData->m_nDataLength == str.GetLength() &&
- FXSYS_memcmp(m_pData->m_String, str.c_str(), str.GetLength()) == 0;
+ memcmp(m_pData->m_String, str.c_str(), str.GetLength()) == 0;
}
bool CFX_ByteString::operator==(const CFX_ByteString& other) const {
@@ -218,16 +218,16 @@
return false;
return other.m_pData->m_nDataLength == m_pData->m_nDataLength &&
- FXSYS_memcmp(other.m_pData->m_String, m_pData->m_String,
- m_pData->m_nDataLength) == 0;
+ memcmp(other.m_pData->m_String, m_pData->m_String,
+ m_pData->m_nDataLength) == 0;
}
bool CFX_ByteString::operator<(const CFX_ByteString& str) const {
if (m_pData == str.m_pData)
return false;
- int result = FXSYS_memcmp(c_str(), str.c_str(),
- std::min(GetLength(), str.GetLength()));
+ int result =
+ memcmp(c_str(), str.c_str(), std::min(GetLength(), str.GetLength()));
return result < 0 || (result == 0 && GetLength() < str.GetLength());
}
@@ -368,8 +368,8 @@
}
ReallocBeforeWrite(nOldLength);
int nCharsToCopy = nOldLength - mLength + 1;
- FXSYS_memmove(m_pData->m_String + nIndex, m_pData->m_String + mLength,
- nCharsToCopy);
+ memmove(m_pData->m_String + nIndex, m_pData->m_String + mLength,
+ nCharsToCopy);
m_pData->m_nDataLength = nOldLength - nCount;
}
return m_pData->m_nDataLength;
@@ -472,8 +472,8 @@
nNewLength++;
ReallocBeforeWrite(nNewLength);
- FXSYS_memmove(m_pData->m_String + nIndex + 1, m_pData->m_String + nIndex,
- nNewLength - nIndex);
+ memmove(m_pData->m_String + nIndex + 1, m_pData->m_String + nIndex,
+ nNewLength - nIndex);
m_pData->m_String[nIndex] = ch;
m_pData->m_nDataLength = nNewLength;
return nNewLength;
@@ -630,13 +630,13 @@
for (FX_STRSIZE i = 0; i < nCount; i++) {
const char* pTarget = FX_strstr(pStart, (FX_STRSIZE)(pEnd - pStart),
pOld.c_str(), nSourceLen);
- FXSYS_memcpy(pDest, pStart, pTarget - pStart);
+ memcpy(pDest, pStart, pTarget - pStart);
pDest += pTarget - pStart;
- FXSYS_memcpy(pDest, pNew.c_str(), pNew.GetLength());
+ memcpy(pDest, pNew.c_str(), pNew.GetLength());
pDest += pNew.GetLength();
pStart = pTarget + nSourceLen;
}
- FXSYS_memcpy(pDest, pStart, pEnd - pStart);
+ memcpy(pDest, pStart, pEnd - pStart);
m_pData.Swap(pNewData);
return nCount;
}
@@ -750,8 +750,8 @@
if (pos) {
ReallocBeforeWrite(len);
FX_STRSIZE nDataLength = len - pos;
- FXSYS_memmove(m_pData->m_String, m_pData->m_String + pos,
- (nDataLength + 1) * sizeof(char));
+ memmove(m_pData->m_String, m_pData->m_String + pos,
+ (nDataLength + 1) * sizeof(char));
m_pData->m_nDataLength = nDataLength;
}
}
@@ -798,7 +798,7 @@
int i = scaled / scale;
FXSYS_itoa(i, buf2, 10);
FX_STRSIZE len = FXSYS_strlen(buf2);
- FXSYS_memcpy(buf + buf_size, buf2, len);
+ memcpy(buf + buf_size, buf2, len);
buf_size += len;
int fraction = scaled % scale;
if (fraction == 0) {
diff --git a/core/fxcrt/cfx_checksumcontext.cpp b/core/fxcrt/cfx_checksumcontext.cpp
index 994d186..97d0af2 100644
--- a/core/fxcrt/cfx_checksumcontext.cpp
+++ b/core/fxcrt/cfx_checksumcontext.cpp
@@ -129,7 +129,7 @@
m_pSAXReader.reset();
if (m_pByteContext) {
uint8_t digest[20];
- FXSYS_memset(digest, 0, 20);
+ memset(digest, 0, 20);
CRYPT_SHA1Finish(m_pByteContext.get(), digest);
int32_t nLen = Base64EncodeA(digest, 20, nullptr);
char* pBuffer = m_bsChecksum.GetBuffer(nLen);
diff --git a/core/fxcrt/cfx_string_data_template.h b/core/fxcrt/cfx_string_data_template.h
index 5167e31..e39f6a5 100644
--- a/core/fxcrt/cfx_string_data_template.h
+++ b/core/fxcrt/cfx_string_data_template.h
@@ -65,13 +65,13 @@
void CopyContents(const CFX_StringDataTemplate& other) {
ASSERT(other.m_nDataLength <= m_nAllocLength);
- FXSYS_memcpy(m_String, other.m_String,
- (other.m_nDataLength + 1) * sizeof(CharType));
+ memcpy(m_String, other.m_String,
+ (other.m_nDataLength + 1) * sizeof(CharType));
}
void CopyContents(const CharType* pStr, FX_STRSIZE nLen) {
ASSERT(nLen >= 0 && nLen <= m_nAllocLength);
- FXSYS_memcpy(m_String, pStr, nLen * sizeof(CharType));
+ memcpy(m_String, pStr, nLen * sizeof(CharType));
m_String[nLen] = 0;
}
@@ -79,7 +79,7 @@
const CharType* pStr,
FX_STRSIZE nLen) {
ASSERT(offset >= 0 && nLen >= 0 && offset + nLen <= m_nAllocLength);
- FXSYS_memcpy(m_String + offset, pStr, nLen * sizeof(CharType));
+ memcpy(m_String + offset, pStr, nLen * sizeof(CharType));
m_String[offset + nLen] = 0;
}
diff --git a/core/fxcrt/cfx_widestring.cpp b/core/fxcrt/cfx_widestring.cpp
index 2298db6..eb6bc66 100644
--- a/core/fxcrt/cfx_widestring.cpp
+++ b/core/fxcrt/cfx_widestring.cpp
@@ -954,8 +954,8 @@
if (pos) {
ReallocBeforeWrite(len);
FX_STRSIZE nDataLength = len - pos;
- FXSYS_memmove(m_pData->m_String, m_pData->m_String + pos,
- (nDataLength + 1) * sizeof(wchar_t));
+ memmove(m_pData->m_String, m_pData->m_String + pos,
+ (nDataLength + 1) * sizeof(wchar_t));
m_pData->m_nDataLength = nDataLength;
}
}
diff --git a/core/fxcrt/fx_basic.h b/core/fxcrt/fx_basic.h
index 77df71e..ed2f579 100644
--- a/core/fxcrt/fx_basic.h
+++ b/core/fxcrt/fx_basic.h
@@ -184,7 +184,7 @@
m_pGrowData.reset(FX_Alloc(DataType, data_size));
return;
}
- FXSYS_memset(m_FixedData, 0, sizeof(DataType) * FixedSize);
+ memset(m_FixedData, 0, sizeof(DataType) * FixedSize);
}
operator DataType*() { return m_pGrowData ? m_pGrowData.get() : m_FixedData; }
diff --git a/core/fxcrt/fx_basic_buffer.cpp b/core/fxcrt/fx_basic_buffer.cpp
index 341d901..701676f 100644
--- a/core/fxcrt/fx_basic_buffer.cpp
+++ b/core/fxcrt/fx_basic_buffer.cpp
@@ -28,9 +28,8 @@
start_index > m_DataSize - count) {
return;
}
- FXSYS_memmove(m_pBuffer.get() + start_index,
- m_pBuffer.get() + start_index + count,
- m_DataSize - start_index - count);
+ memmove(m_pBuffer.get() + start_index, m_pBuffer.get() + start_index + count,
+ m_DataSize - start_index - count);
m_DataSize -= count;
}
@@ -72,9 +71,9 @@
ExpandBuf(size);
if (pBuf) {
- FXSYS_memcpy(m_pBuffer.get() + m_DataSize, pBuf, size);
+ memcpy(m_pBuffer.get() + m_DataSize, pBuf, size);
} else {
- FXSYS_memset(m_pBuffer.get() + m_DataSize, 0, size);
+ memset(m_pBuffer.get() + m_DataSize, 0, size);
}
m_DataSize += size;
}
@@ -86,12 +85,12 @@
return;
ExpandBuf(size);
- FXSYS_memmove(m_pBuffer.get() + pos + size, m_pBuffer.get() + pos,
- m_DataSize - pos);
+ memmove(m_pBuffer.get() + pos + size, m_pBuffer.get() + pos,
+ m_DataSize - pos);
if (pBuf) {
- FXSYS_memcpy(m_pBuffer.get() + pos, pBuf, size);
+ memcpy(m_pBuffer.get() + pos, pBuf, size);
} else {
- FXSYS_memset(m_pBuffer.get() + pos, 0, size);
+ memset(m_pBuffer.get() + pos, 0, size);
}
m_DataSize += size;
}
@@ -254,7 +253,7 @@
size_t temp_size = size;
while (temp_size) {
size_t buf_size = std::min(kBufSize - m_Length, temp_size);
- FXSYS_memcpy(m_pBuffer.get() + m_Length, buffer, buf_size);
+ memcpy(m_pBuffer.get() + m_Length, buffer, buf_size);
m_Length += buf_size;
if (m_Length == kBufSize) {
if (!Flush()) {
diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp
index f8abff3..f13922e 100644
--- a/core/fxcrt/fx_extension.cpp
+++ b/core/fxcrt/fx_extension.cpp
@@ -216,7 +216,7 @@
m_nCurPos = newPos.ValueOrDie();
if (m_dwFlags & FX_MEMSTREAM_Consecutive) {
- FXSYS_memcpy(buffer, m_Blocks[0] + (size_t)offset, size);
+ memcpy(buffer, m_Blocks[0] + (size_t)offset, size);
return true;
}
size_t nStartBlock = (size_t)offset / m_nGrowSize;
@@ -226,7 +226,7 @@
if (nRead > size) {
nRead = size;
}
- FXSYS_memcpy(buffer, m_Blocks[(int)nStartBlock] + (size_t)offset, nRead);
+ memcpy(buffer, m_Blocks[(int)nStartBlock] + (size_t)offset, nRead);
buffer = ((uint8_t*)buffer) + nRead;
size -= nRead;
nStartBlock++;
@@ -267,7 +267,7 @@
m_Blocks[0] = FX_Realloc(uint8_t, m_Blocks[0], m_nTotalSize);
}
}
- FXSYS_memcpy(m_Blocks[0] + (size_t)offset, buffer, size);
+ memcpy(m_Blocks[0] + (size_t)offset, buffer, size);
if (m_nCurSize < m_nCurPos) {
m_nCurSize = m_nCurPos;
}
@@ -291,7 +291,7 @@
if (nWrite > size) {
nWrite = size;
}
- FXSYS_memcpy(m_Blocks[(int)nStartBlock] + (size_t)offset, buffer, nWrite);
+ memcpy(m_Blocks[(int)nStartBlock] + (size_t)offset, buffer, nWrite);
buffer = ((uint8_t*)buffer) + nWrite;
size -= nWrite;
nStartBlock++;
@@ -597,7 +597,7 @@
::GetSystemTime(&st1);
do {
::GetSystemTime(&st2);
- } while (FXSYS_memcmp(&st1, &st2, sizeof(SYSTEMTIME)) == 0);
+ } while (memcmp(&st1, &st2, sizeof(SYSTEMTIME)) == 0);
uint32_t dwHash1 =
FX_HashCode_GetA(CFX_ByteStringC((uint8_t*)&st1, sizeof(st1)), true);
uint32_t dwHash2 =
diff --git a/core/fxcrt/fx_system.h b/core/fxcrt/fx_system.h
index dcf7045..b52cb6a 100644
--- a/core/fxcrt/fx_system.h
+++ b/core/fxcrt/fx_system.h
@@ -171,10 +171,6 @@
#define FXSYS_wcslen(ptr) ((FX_STRSIZE)wcslen(ptr))
#endif // __cplusplus
-#define FXSYS_memcmp memcmp
-#define FXSYS_memcpy memcpy
-#define FXSYS_memmove memmove
-#define FXSYS_memset memset
#define FXSYS_qsort qsort
#define FXSYS_bsearch bsearch
diff --git a/core/fxcrt/fxcrt_posix.cpp b/core/fxcrt/fxcrt_posix.cpp
index a96f164..562c70c 100644
--- a/core/fxcrt/fxcrt_posix.cpp
+++ b/core/fxcrt/fxcrt_posix.cpp
@@ -66,7 +66,7 @@
return 0;
}
struct stat s;
- FXSYS_memset(&s, 0, sizeof(s));
+ memset(&s, 0, sizeof(s));
fstat(m_nFD, &s);
return s.st_size;
}
diff --git a/core/fxcrt/xml/cfx_saxreader.cpp b/core/fxcrt/xml/cfx_saxreader.cpp
index 287eaaa..c571e8b 100644
--- a/core/fxcrt/xml/cfx_saxreader.cpp
+++ b/core/fxcrt/xml/cfx_saxreader.cpp
@@ -628,14 +628,13 @@
m_iDataLength = m_iDataPos;
m_iDataPos = 0;
if (m_iDataLength >= 9 &&
- FXSYS_memcmp(m_pszData, "[CDATA[", 7 * sizeof(uint8_t)) == 0 &&
- FXSYS_memcmp(m_pszData + m_iDataLength - 2, "]]",
- 2 * sizeof(uint8_t)) == 0) {
+ memcmp(m_pszData, "[CDATA[", 7 * sizeof(uint8_t)) == 0 &&
+ memcmp(m_pszData + m_iDataLength - 2, "]]",
+ 2 * sizeof(uint8_t)) == 0) {
Pop();
m_iDataLength -= 9;
m_dwDataOffset += 7;
- FXSYS_memmove(m_pszData, m_pszData + 7,
- m_iDataLength * sizeof(uint8_t));
+ memmove(m_pszData, m_pszData + 7, m_iDataLength * sizeof(uint8_t));
m_bCharData = true;
if (m_pHandler) {
NotifyData();
diff --git a/core/fxge/android/cfpf_skiafontdescriptor.h b/core/fxge/android/cfpf_skiafontdescriptor.h
index 56f8a34..f653050 100644
--- a/core/fxge/android/cfpf_skiafontdescriptor.h
+++ b/core/fxge/android/cfpf_skiafontdescriptor.h
@@ -27,7 +27,7 @@
FX_Free(m_pFamily);
int32_t iSize = FXSYS_strlen(pFamily);
m_pFamily = FX_Alloc(char, iSize + 1);
- FXSYS_memcpy(m_pFamily, pFamily, iSize * sizeof(char));
+ memcpy(m_pFamily, pFamily, iSize * sizeof(char));
m_pFamily[iSize] = 0;
}
char* m_pFamily;
diff --git a/core/fxge/android/cfpf_skiafontmgr.cpp b/core/fxge/android/cfpf_skiafontmgr.cpp
index 00d989e..534f41a 100644
--- a/core/fxge/android/cfpf_skiafontmgr.cpp
+++ b/core/fxge/android/cfpf_skiafontmgr.cpp
@@ -371,7 +371,7 @@
if (iFaceIndex < 0)
return nullptr;
FXFT_StreamRec streamRec;
- FXSYS_memset(&streamRec, 0, sizeof(FXFT_StreamRec));
+ memset(&streamRec, 0, sizeof(FXFT_StreamRec));
streamRec.size = pFileRead->GetSize();
streamRec.descriptor.pointer = static_cast<void*>(pFileRead.Get());
streamRec.read = FPF_SkiaStream_Read;
diff --git a/core/fxge/android/cfpf_skiapathfont.h b/core/fxge/android/cfpf_skiapathfont.h
index f8ddc6c..8b7a4f9 100644
--- a/core/fxge/android/cfpf_skiapathfont.h
+++ b/core/fxge/android/cfpf_skiapathfont.h
@@ -24,7 +24,7 @@
FX_Free(m_pPath);
int32_t iSize = FXSYS_strlen(pPath);
m_pPath = FX_Alloc(char, iSize + 1);
- FXSYS_memcpy(m_pPath, pPath, iSize * sizeof(char));
+ memcpy(m_pPath, pPath, iSize * sizeof(char));
m_pPath[iSize] = 0;
}
char* m_pPath;
diff --git a/core/fxge/dib/cfx_bitmapcomposer.cpp b/core/fxge/dib/cfx_bitmapcomposer.cpp
index 7124ba9..8dd87b1 100644
--- a/core/fxge/dib/cfx_bitmapcomposer.cpp
+++ b/core/fxge/dib/cfx_bitmapcomposer.cpp
@@ -95,7 +95,7 @@
m_pAddClipScan[i] = clip_scan[i] * m_BitmapAlpha / 255;
}
} else {
- FXSYS_memset(m_pAddClipScan, m_BitmapAlpha, dest_width);
+ memset(m_pAddClipScan, m_BitmapAlpha, dest_width);
}
clip_scan = m_pAddClipScan;
}
diff --git a/core/fxge/dib/cfx_bitmapstorer.cpp b/core/fxge/dib/cfx_bitmapstorer.cpp
index ac876b1..4e1cb3b 100644
--- a/core/fxge/dib/cfx_bitmapstorer.cpp
+++ b/core/fxge/dib/cfx_bitmapstorer.cpp
@@ -32,11 +32,11 @@
? const_cast<uint8_t*>(m_pBitmap->m_pAlphaMask->GetScanline(line))
: nullptr;
if (dest_buf)
- FXSYS_memcpy(dest_buf, scanline, m_pBitmap->GetPitch());
+ memcpy(dest_buf, scanline, m_pBitmap->GetPitch());
if (dest_alpha_buf) {
- FXSYS_memcpy(dest_alpha_buf, scan_extra_alpha,
- m_pBitmap->m_pAlphaMask->GetPitch());
+ memcpy(dest_alpha_buf, scan_extra_alpha,
+ m_pBitmap->m_pAlphaMask->GetPitch());
}
}
diff --git a/core/fxge/dib/cfx_dibitmap.cpp b/core/fxge/dib/cfx_dibitmap.cpp
index 0adc088..b97917d 100644
--- a/core/fxge/dib/cfx_dibitmap.cpp
+++ b/core/fxge/dib/cfx_dibitmap.cpp
@@ -90,7 +90,7 @@
SetPalette(pSrc->GetPalette());
SetAlphaMask(pSrc->m_pAlphaMask);
for (int row = 0; row < pSrc->GetHeight(); row++)
- FXSYS_memcpy(m_pBuffer + row * m_Pitch, pSrc->GetScanline(row), m_Pitch);
+ memcpy(m_pBuffer + row * m_Pitch, pSrc->GetScanline(row), m_Pitch);
return true;
}
@@ -130,20 +130,19 @@
}
switch (GetFormat()) {
case FXDIB_1bppMask:
- FXSYS_memset(m_pBuffer, (color & 0xff000000) ? 0xff : 0,
- m_Pitch * m_Height);
+ memset(m_pBuffer, (color & 0xff000000) ? 0xff : 0, m_Pitch * m_Height);
break;
case FXDIB_1bppRgb: {
int index = FindPalette(color);
- FXSYS_memset(m_pBuffer, index ? 0xff : 0, m_Pitch * m_Height);
+ memset(m_pBuffer, index ? 0xff : 0, m_Pitch * m_Height);
break;
}
case FXDIB_8bppMask:
- FXSYS_memset(m_pBuffer, color >> 24, m_Pitch * m_Height);
+ memset(m_pBuffer, color >> 24, m_Pitch * m_Height);
break;
case FXDIB_8bppRgb: {
int index = FindPalette(color);
- FXSYS_memset(m_pBuffer, index, m_Pitch * m_Height);
+ memset(m_pBuffer, index, m_Pitch * m_Height);
break;
}
case FXDIB_Rgb:
@@ -151,7 +150,7 @@
int a, r, g, b;
ArgbDecode(color, a, r, g, b);
if (r == g && g == b) {
- FXSYS_memset(m_pBuffer, r, m_Pitch * m_Height);
+ memset(m_pBuffer, r, m_Pitch * m_Height);
} else {
int byte_pos = 0;
for (int col = 0; col < m_Width; col++) {
@@ -160,7 +159,7 @@
m_pBuffer[byte_pos++] = r;
}
for (int row = 1; row < m_Height; row++) {
- FXSYS_memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
+ memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
}
}
break;
@@ -177,7 +176,7 @@
((uint32_t*)m_pBuffer)[i] = color;
}
for (int row = 1; row < m_Height; row++) {
- FXSYS_memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
+ memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
}
break;
}
@@ -227,7 +226,7 @@
m_pBuffer + (dest_top + row) * m_Pitch + dest_left * Bpp;
const uint8_t* src_scan =
pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
- FXSYS_memcpy(dest_scan, src_scan, width * Bpp);
+ memcpy(dest_scan, src_scan, width * Bpp);
}
}
} else {
@@ -336,10 +335,10 @@
for (int col = 0; col < width; col++) {
int src_bitpos = src_left + col;
if (src_scan[src_bitpos / 8] & (1 << (7 - src_bitpos % 8))) {
- FXSYS_memcpy(dest_color_pos, color_p, comps);
+ memcpy(dest_color_pos, color_p, comps);
*dest_alpha_pos = 0xff;
} else {
- FXSYS_memset(dest_color_pos, 0, comps);
+ memset(dest_color_pos, 0, comps);
*dest_alpha_pos = 0;
}
dest_color_pos += comps;
@@ -348,7 +347,7 @@
} else {
src_scan += src_left;
for (int col = 0; col < width; col++) {
- FXSYS_memcpy(dest_color_pos, color_p, comps);
+ memcpy(dest_color_pos, color_p, comps);
dest_color_pos += comps;
*dest_alpha_pos++ = (alpha * (*src_scan++) / 255);
}
@@ -505,12 +504,12 @@
}
int Bpp = GetBPP() / 8;
if (Bpp == 1) {
- FXSYS_memset(m_pBuffer, value, m_Height * m_Pitch);
+ memset(m_pBuffer, value, m_Height * m_Pitch);
return true;
}
if (destChannel == FXDIB_Alpha && m_pAlphaMask) {
- FXSYS_memset(m_pAlphaMask->GetBuffer(), value,
- m_pAlphaMask->GetHeight() * m_pAlphaMask->GetPitch());
+ memset(m_pAlphaMask->GetBuffer(), value,
+ m_pAlphaMask->GetHeight() * m_pAlphaMask->GetPitch());
return true;
}
for (int row = 0; row < m_Height; row++) {
@@ -601,7 +600,7 @@
if (!pMask->Create(m_Width, m_Height, FXDIB_8bppMask))
return false;
- FXSYS_memset(pMask->GetBuffer(), gray[0], pMask->GetPitch() * m_Height);
+ memset(pMask->GetBuffer(), gray[0], pMask->GetPitch() * m_Height);
for (int row = 0; row < m_Height; row++) {
uint8_t* src_pos = m_pBuffer + row * m_Pitch;
uint8_t* dest_pos = (uint8_t*)pMask->GetScanline(row);
@@ -1230,7 +1229,7 @@
for (int row = rect.top; row < rect.bottom; row++) {
uint8_t* dest_scan = m_pBuffer + row * m_Pitch + rect.left;
if (src_alpha == 255) {
- FXSYS_memset(dest_scan, gray, width);
+ memset(dest_scan, gray, width);
} else {
for (int col = 0; col < width; col++) {
*dest_scan = FXDIB_ALPHA_MERGE(*dest_scan, gray, src_alpha);
@@ -1262,7 +1261,7 @@
uint8_t left_flag = *dest_scan_top & (255 << (8 - left_shift));
uint8_t right_flag = *dest_scan_top_r & (255 >> right_shift);
if (new_width) {
- FXSYS_memset(dest_scan_top + 1, index ? 255 : 0, new_width - 1);
+ memset(dest_scan_top + 1, index ? 255 : 0, new_width - 1);
if (!index) {
*dest_scan_top &= left_flag;
*dest_scan_top_r &= right_flag;
@@ -1310,7 +1309,7 @@
m_pAlphaMask ? (uint8_t*)m_pAlphaMask->GetScanline(row) + rect.left
: nullptr;
if (dest_scan_alpha) {
- FXSYS_memset(dest_scan_alpha, 0xff, width);
+ memset(dest_scan_alpha, 0xff, width);
}
if (Bpp == 4) {
uint32_t* scan = (uint32_t*)dest_scan;
@@ -1357,7 +1356,7 @@
uint8_t back_alpha = *dest_scan_alpha;
if (back_alpha == 0) {
*dest_scan_alpha++ = src_alpha;
- FXSYS_memcpy(dest_scan, color_p, Bpp);
+ memcpy(dest_scan, color_p, Bpp);
dest_scan += Bpp;
continue;
}
@@ -1417,7 +1416,7 @@
}
CFX_RetainPtr<CFX_DIBitmap> pAlphaMask;
if (dest_format == FXDIB_Argb) {
- FXSYS_memset(dest_buf, 0xff, dest_pitch * m_Height + 4);
+ memset(dest_buf, 0xff, dest_pitch * m_Height + 4);
if (m_pAlphaMask) {
for (int row = 0; row < m_Height; row++) {
uint8_t* pDstScanline = dest_buf + row * dest_pitch + 3;
diff --git a/core/fxge/dib/cfx_dibsource.cpp b/core/fxge/dib/cfx_dibsource.cpp
index 4b76b02..1a11632 100644
--- a/core/fxge/dib/cfx_dibsource.cpp
+++ b/core/fxge/dib/cfx_dibsource.cpp
@@ -63,7 +63,7 @@
for (int row = rect.top; row < rect.bottom; row++) {
const uint8_t* src_scan = GetScanline(row) + rect.left * m_bpp / 8;
uint8_t* dest_scan = (uint8_t*)pNewBitmap->GetScanline(row - rect.top);
- FXSYS_memcpy(dest_scan, src_scan, copy_len);
+ memcpy(dest_scan, src_scan, copy_len);
}
}
return pNewBitmap;
@@ -103,8 +103,8 @@
m_pAlphaMask = nullptr;
return false;
}
- FXSYS_memset(m_pAlphaMask->GetBuffer(), 0xff,
- m_pAlphaMask->GetHeight() * m_pAlphaMask->GetPitch());
+ memset(m_pAlphaMask->GetBuffer(), 0xff,
+ m_pAlphaMask->GetHeight() * m_pAlphaMask->GetPitch());
return true;
}
@@ -203,7 +203,7 @@
if (!m_pPalette)
m_pPalette.reset(FX_Alloc(uint32_t, pal_size));
pal_size = std::min(pal_size, kPaletteSize);
- FXSYS_memcpy(m_pPalette.get(), pSrc, pal_size * sizeof(uint32_t));
+ memcpy(m_pPalette.get(), pSrc, pal_size * sizeof(uint32_t));
}
void CFX_DIBSource::GetPalette(uint32_t* pal, int alpha) const {
@@ -272,9 +272,9 @@
return false;
}
for (int row = 0; row < m_Height; row++) {
- FXSYS_memcpy(const_cast<uint8_t*>(m_pAlphaMask->GetScanline(row)),
- pAlphaMask->GetScanline(row + rect.top) + rect.left,
- m_pAlphaMask->m_Pitch);
+ memcpy(const_cast<uint8_t*>(m_pAlphaMask->GetScanline(row)),
+ pAlphaMask->GetScanline(row + rect.top) + rect.left,
+ m_pAlphaMask->m_Pitch);
}
return true;
}
@@ -293,11 +293,11 @@
uint8_t* dest_scan =
pDestBuffer + m_Pitch * (bYFlip ? (m_Height - row - 1) : row);
if (!bXFlip) {
- FXSYS_memcpy(dest_scan, src_scan, m_Pitch);
+ memcpy(dest_scan, src_scan, m_Pitch);
continue;
}
if (m_bpp == 1) {
- FXSYS_memset(dest_scan, 0, m_Pitch);
+ memset(dest_scan, 0, m_Pitch);
for (int col = 0; col < m_Width; col++)
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
int dest_col = m_Width - col - 1;
@@ -337,7 +337,7 @@
uint8_t* dest_scan =
pDestBuffer + dest_pitch * (bYFlip ? (m_Height - row - 1) : row);
if (!bXFlip) {
- FXSYS_memcpy(dest_scan, src_scan, dest_pitch);
+ memcpy(dest_scan, src_scan, dest_pitch);
continue;
}
dest_scan += (m_Width - 1);
@@ -418,7 +418,7 @@
int col_start = bYFlip ? m_Width - dest_clip.bottom : dest_clip.top;
int col_end = bYFlip ? m_Width - dest_clip.top : dest_clip.bottom;
if (GetBPP() == 1) {
- FXSYS_memset(dest_buf, 0xff, dest_pitch * result_height);
+ memset(dest_buf, 0xff, dest_pitch * result_height);
for (int row = row_start; row < row_end; row++) {
const uint8_t* src_scan = GetScanline(row);
int dest_col = (bXFlip ? dest_clip.right - (row - row_start) - 1 : row) -
diff --git a/core/fxge/dib/cfx_scanlinecompositor.cpp b/core/fxge/dib/cfx_scanlinecompositor.cpp
index 1e2a282..ff7dd06 100644
--- a/core/fxge/dib/cfx_scanlinecompositor.cpp
+++ b/core/fxge/dib/cfx_scanlinecompositor.cpp
@@ -198,7 +198,7 @@
int width,
const uint8_t* clip_scan) {
if (!clip_scan) {
- FXSYS_memset(dest_scan, 0xff, width);
+ memset(dest_scan, 0xff, width);
return;
}
for (int i = 0; i < width; ++i) {
@@ -872,7 +872,7 @@
int dest_Bpp,
int src_Bpp) {
if (dest_Bpp == src_Bpp) {
- FXSYS_memcpy(dest_scan, src_scan, width * dest_Bpp);
+ memcpy(dest_scan, src_scan, width * dest_Bpp);
return;
}
for (int col = 0; col < width; col++) {
@@ -3386,7 +3386,7 @@
int palsize = 1 << (src_format & 0xff);
pDestPalette = FX_Alloc(uint32_t, palsize);
if (isDstCmyk == isSrcCmyk) {
- FXSYS_memcpy(pDestPalette, pSrcPalette, palsize * sizeof(uint32_t));
+ memcpy(pDestPalette, pSrcPalette, palsize * sizeof(uint32_t));
} else {
for (int i = 0; i < palsize; i++) {
FX_CMYK cmyk = pSrcPalette[i];
diff --git a/core/fxge/dib/fx_dib_convert.cpp b/core/fxge/dib/fx_dib_convert.cpp
index d3cff24..17eae7e 100644
--- a/core/fxge/dib/fx_dib_convert.cpp
+++ b/core/fxge/dib/fx_dib_convert.cpp
@@ -155,7 +155,7 @@
reset_gray = 0x00;
for (int row = 0; row < height; row++) {
uint8_t* dest_scan = dest_buf + row * dest_pitch;
- FXSYS_memset(dest_scan, reset_gray, width);
+ memset(dest_scan, reset_gray, width);
const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = src_left; col < src_left + width; col++) {
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
@@ -177,7 +177,7 @@
for (int row = 0; row < height; row++) {
uint8_t* dest_scan = dest_buf + row * dest_pitch;
const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left;
- FXSYS_memcpy(dest_scan, src_scan, width);
+ memcpy(dest_scan, src_scan, width);
}
return true;
}
@@ -217,7 +217,7 @@
for (int row = 0; row < height; row++) {
uint8_t* dest_scan = dest_buf + row * dest_pitch;
- FXSYS_memset(dest_scan, gray[0], width);
+ memset(dest_scan, gray[0], width);
const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = src_left; col < src_left + width; col++) {
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
@@ -313,7 +313,7 @@
if (pSrcBitmap->GetBPP() == 1) {
for (int row = 0; row < height; row++) {
uint8_t* dest_scan = dest_buf + row * dest_pitch;
- FXSYS_memset(dest_scan, 0, width);
+ memset(dest_scan, 0, width);
const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row);
for (int col = src_left; col < src_left + width; col++) {
if (src_scan[col / 8] & (1 << (7 - col % 8))) {
@@ -327,7 +327,7 @@
uint8_t* dest_scan = dest_buf + row * dest_pitch;
const uint8_t* src_scan =
pSrcBitmap->GetScanline(src_top + row) + src_left;
- FXSYS_memcpy(dest_scan, src_scan, width);
+ memcpy(dest_scan, src_scan, width);
}
}
}
@@ -355,7 +355,7 @@
dst_plt[i] = FXARGB_MAKE(0xff, r, g, b);
}
} else {
- FXSYS_memcpy(dst_plt, src_plt, plt_size * 4);
+ memcpy(dst_plt, src_plt, plt_size * 4);
}
return true;
}
@@ -418,7 +418,7 @@
}
}
}
- FXSYS_memcpy(dst_plt, pPalette, sizeof(uint32_t) * 256);
+ memcpy(dst_plt, pPalette, sizeof(uint32_t) * 256);
return true;
}
@@ -587,7 +587,7 @@
uint8_t* dest_scan = dest_buf + row * dest_pitch;
const uint8_t* src_scan =
pSrcBitmap->GetScanline(src_top + row) + src_left * 3;
- FXSYS_memcpy(dest_scan, src_scan, width * 3);
+ memcpy(dest_scan, src_scan, width * 3);
}
return true;
}
diff --git a/core/fxge/dib/fx_dib_engine.cpp b/core/fxge/dib/fx_dib_engine.cpp
index 9a5a7c1..a232142 100644
--- a/core/fxge/dib/fx_dib_engine.cpp
+++ b/core/fxge/dib/fx_dib_engine.cpp
@@ -274,7 +274,7 @@
return;
}
if (dest_format == FXDIB_Rgb32) {
- FXSYS_memset(m_pDestScanline, 255, size);
+ memset(m_pDestScanline, 255, size);
}
m_InterPitch = (m_DestClip.Width() * m_DestBpp + 31) / 32 * 4;
m_ExtraMaskPitch = (m_DestClip.Width() * 8 + 31) / 32 * 4;
diff --git a/core/fxge/ge/cfx_facecache.cpp b/core/fxge/ge/cfx_facecache.cpp
index 0e9e401..69be8a1 100644
--- a/core/fxge/ge/cfx_facecache.cpp
+++ b/core/fxge/ge/cfx_facecache.cpp
@@ -57,8 +57,8 @@
if (temp == 0 || temp == 255) {
int rowbytes = std::min(abs(nSrcRowBytes), nDstRowBytes);
for (row = 0; row < nHeight; row++) {
- FXSYS_memcpy(pDataOut + row * nDstRowBytes, pDataIn + row * nSrcRowBytes,
- rowbytes);
+ memcpy(pDataOut + row * nDstRowBytes, pDataIn + row * nSrcRowBytes,
+ rowbytes);
}
return;
}
@@ -206,14 +206,14 @@
}
}
} else {
- FXSYS_memset(pDestBuf, 0, dest_pitch * bmheight);
+ memset(pDestBuf, 0, dest_pitch * bmheight);
if (anti_alias == FXFT_RENDER_MODE_MONO &&
FXFT_Get_Bitmap_PixelMode(FXFT_Get_Glyph_Bitmap(m_Face)) ==
FXFT_PIXEL_MODE_MONO) {
int rowbytes = abs(src_pitch) > dest_pitch ? dest_pitch : abs(src_pitch);
for (int row = 0; row < bmheight; row++) {
- FXSYS_memcpy(pDestBuf + row * dest_pitch, pSrcBuf + row * src_pitch,
- rowbytes);
+ memcpy(pDestBuf + row * dest_pitch, pSrcBuf + row * src_pitch,
+ rowbytes);
}
} else {
ContrastAdjust(pSrcBuf, pDestBuf, bmwidth, bmheight, src_pitch,
diff --git a/core/fxge/ge/cfx_fontmapper.cpp b/core/fxge/ge/cfx_fontmapper.cpp
index e04e581..9b2e1aa 100644
--- a/core/fxge/ge/cfx_fontmapper.cpp
+++ b/core/fxge/ge/cfx_fontmapper.cpp
@@ -280,7 +280,7 @@
: m_bListLoaded(false), m_pFontMgr(mgr) {
m_MMFaces[0] = nullptr;
m_MMFaces[1] = nullptr;
- FXSYS_memset(m_FoxitFaces, 0, sizeof(m_FoxitFaces));
+ memset(m_FoxitFaces, 0, sizeof(m_FoxitFaces));
}
CFX_FontMapper::~CFX_FontMapper() {
diff --git a/core/fxge/ge/cfx_graphstatedata.cpp b/core/fxge/ge/cfx_graphstatedata.cpp
index 8c5508f..82fede1 100644
--- a/core/fxge/ge/cfx_graphstatedata.cpp
+++ b/core/fxge/ge/cfx_graphstatedata.cpp
@@ -34,7 +34,7 @@
m_LineWidth = src.m_LineWidth;
if (m_DashCount) {
m_DashArray = FX_Alloc(float, m_DashCount);
- FXSYS_memcpy(m_DashArray, src.m_DashArray, m_DashCount * sizeof(float));
+ memcpy(m_DashArray, src.m_DashArray, m_DashCount * sizeof(float));
}
}
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 1dc8ab2..81ca95f 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -1753,11 +1753,11 @@
SkPoint tempCubics[4];
for (int i = 0; i < (int)SK_ARRAY_COUNT(tempCubics); i++)
tempCubics[i] = cubics[(flag * 3 + i) % 12];
- FXSYS_memcpy(cubics, tempCubics, sizeof(tempCubics));
+ memcpy(cubics, tempCubics, sizeof(tempCubics));
SkColor tempColors[2];
tempColors[0] = colors[flag];
tempColors[1] = colors[(flag + 1) % 4];
- FXSYS_memcpy(colors, tempColors, sizeof(tempColors));
+ memcpy(colors, tempColors, sizeof(tempColors));
}
for (int i = iStartPoint; i < (int)SK_ARRAY_COUNT(cubics); i++) {
CFX_PointF point = stream.ReadCoords();
diff --git a/core/fxge/win32/cfx_psrenderer.cpp b/core/fxge/win32/cfx_psrenderer.cpp
index 40c643e..46af337 100644
--- a/core/fxge/win32/cfx_psrenderer.cpp
+++ b/core/fxge/win32/cfx_psrenderer.cpp
@@ -260,8 +260,8 @@
}
if (!m_bGraphStateSet ||
m_CurGraphState.m_DashCount != pGraphState->m_DashCount ||
- FXSYS_memcmp(m_CurGraphState.m_DashArray, pGraphState->m_DashArray,
- sizeof(float) * m_CurGraphState.m_DashCount)) {
+ memcmp(m_CurGraphState.m_DashArray, pGraphState->m_DashArray,
+ sizeof(float) * m_CurGraphState.m_DashCount)) {
buf << "[";
for (int i = 0; i < pGraphState->m_DashCount; ++i) {
buf << pGraphState->m_DashArray[i] << " ";
@@ -392,7 +392,7 @@
uint8_t* src_buf = FX_Alloc(uint8_t, src_size);
for (int row = 0; row < height; row++) {
const uint8_t* src_scan = pSource->GetScanline(row);
- FXSYS_memcpy(src_buf + row * pitch, src_scan, pitch);
+ memcpy(src_buf + row * pitch, src_scan, pitch);
}
std::unique_ptr<uint8_t, FxFreeDeleter> output_buf;
uint32_t output_size;
@@ -471,7 +471,7 @@
src_scan += 3;
}
} else {
- FXSYS_memcpy(dest_scan, src_scan, src_pitch);
+ memcpy(dest_scan, src_scan, src_pitch);
}
}
uint8_t* compressed_buf;
diff --git a/core/fxge/win32/cpsoutput.cpp b/core/fxge/win32/cpsoutput.cpp
index 24df152..7a8434e 100644
--- a/core/fxge/win32/cpsoutput.cpp
+++ b/core/fxge/win32/cpsoutput.cpp
@@ -29,7 +29,7 @@
char buffer[1026];
int send_len = std::min(len, 1024);
*(reinterpret_cast<uint16_t*>(buffer)) = send_len;
- FXSYS_memcpy(buffer + 2, str + sent_len, send_len);
+ memcpy(buffer + 2, str + sent_len, send_len);
// TODO(thestig/rbpotter): Do PASSTHROUGH for non-Chromium usage.
// ExtEscape(m_hDC, PASSTHROUGH, send_len + 2, buffer, 0, nullptr);
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index de17c0d..a27ac6f 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -446,7 +446,7 @@
bool CFX_Win32FontInfo::EnumFontList(CFX_FontMapper* pMapper) {
m_pMapper = pMapper;
LOGFONTA lf;
- FXSYS_memset(&lf, 0, sizeof(LOGFONTA));
+ memset(&lf, 0, sizeof(LOGFONTA));
lf.lfCharSet = FXFONT_DEFAULT_CHARSET;
lf.lfFaceName[0] = 0;
lf.lfPitchAndFamily = 0;
@@ -879,7 +879,7 @@
BITMAPINFOHEADER bmiHeader;
uint32_t bmiColors[2];
} bmi;
- FXSYS_memset(&bmi.bmiHeader, 0, sizeof(BITMAPINFOHEADER));
+ memset(&bmi.bmiHeader, 0, sizeof(BITMAPINFOHEADER));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biBitCount = 1;
bmi.bmiHeader.biCompression = BI_RGB;
@@ -1180,7 +1180,7 @@
BitBlt(hDCMemory, 0, 0, width, height, m_hDC, left, top, SRCCOPY);
SelectObject(hDCMemory, holdbmp);
BITMAPINFO bmi;
- FXSYS_memset(&bmi, 0, sizeof bmi);
+ memset(&bmi, 0, sizeof bmi);
bmi.bmiHeader.biSize = sizeof bmi.bmiHeader;
bmi.bmiHeader.biBitCount = pBitmap->GetBPP();
bmi.bmiHeader.biHeight = -height;
diff --git a/core/fxge/win32/fx_win32_dib.cpp b/core/fxge/win32/fx_win32_dib.cpp
index 9815457..f2c4726 100644
--- a/core/fxge/win32/fx_win32_dib.cpp
+++ b/core/fxge/win32/fx_win32_dib.cpp
@@ -19,7 +19,7 @@
len += sizeof(DWORD) * (int)(1 << pBitmap->GetBPP());
}
BITMAPINFOHEADER* pbmih = (BITMAPINFOHEADER*)result.GetBuffer(len);
- FXSYS_memset(pbmih, 0, sizeof(BITMAPINFOHEADER));
+ memset(pbmih, 0, sizeof(BITMAPINFOHEADER));
pbmih->biSize = sizeof(BITMAPINFOHEADER);
pbmih->biBitCount = pBitmap->GetBPP();
pbmih->biCompression = BI_RGB;
@@ -70,15 +70,15 @@
if (!pBitmap->Create(width, height, format))
return nullptr;
- FXSYS_memcpy(pBitmap->GetBuffer(), pData, pitch * height);
+ memcpy(pBitmap->GetBuffer(), pData, pitch * height);
if (bBottomUp) {
uint8_t* temp_buf = FX_Alloc(uint8_t, pitch);
int top = 0, bottom = height - 1;
while (top < bottom) {
- FXSYS_memcpy(temp_buf, pBitmap->GetBuffer() + top * pitch, pitch);
- FXSYS_memcpy(pBitmap->GetBuffer() + top * pitch,
- pBitmap->GetBuffer() + bottom * pitch, pitch);
- FXSYS_memcpy(pBitmap->GetBuffer() + bottom * pitch, temp_buf, pitch);
+ memcpy(temp_buf, pBitmap->GetBuffer() + top * pitch, pitch);
+ memcpy(pBitmap->GetBuffer() + top * pitch,
+ pBitmap->GetBuffer() + bottom * pitch, pitch);
+ memcpy(pBitmap->GetBuffer() + bottom * pitch, temp_buf, pitch);
top++;
bottom--;
}
@@ -189,7 +189,7 @@
CFX_WindowsDIB::CFX_WindowsDIB(HDC hDC, int width, int height) {
Create(width, height, FXDIB_Rgb, (uint8_t*)1);
BITMAPINFOHEADER bmih;
- FXSYS_memset(&bmih, 0, sizeof bmih);
+ memset(&bmih, 0, sizeof bmih);
bmih.biSize = sizeof bmih;
bmih.biBitCount = 24;
bmih.biHeight = -height;
diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp
index 41f9ba5..6a3527f 100644
--- a/core/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/fxge/win32/fx_win32_gdipext.cpp
@@ -1297,7 +1297,7 @@
}
bytes_left = m_InterStream.GetLength() - m_ReadPos;
bytes_out = std::min(pdfium::base::checked_cast<size_t>(cb), bytes_left);
- FXSYS_memcpy(Output, m_InterStream.GetBuffer() + m_ReadPos, bytes_out);
+ memcpy(Output, m_InterStream.GetBuffer() + m_ReadPos, bytes_out);
m_ReadPos += (int32_t)bytes_out;
if (pcbRead) {
*pcbRead = (ULONG)bytes_out;
@@ -1508,11 +1508,11 @@
int dest_pitch = (width * pInfo->pbmi->bmiHeader.biBitCount + 31) / 32 * 4;
LPBYTE pData = FX_Alloc2D(BYTE, dest_pitch, height);
if (dest_pitch == pInfo->Stride) {
- FXSYS_memcpy(pData, pInfo->pScan0, dest_pitch * height);
+ memcpy(pData, pInfo->pScan0, dest_pitch * height);
} else {
for (int i = 0; i < height; i++) {
- FXSYS_memcpy(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride * i,
- dest_pitch);
+ memcpy(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride * i,
+ dest_pitch);
}
}
CFX_RetainPtr<CFX_DIBitmap> pDIBitmap = _FX_WindowsDIB_LoadFromBuf(
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index 635a534..b44002c 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -494,7 +494,7 @@
nBufSize = fdfEncodedData.GetLength();
pBuf = FX_Alloc(uint8_t, nBufSize);
- FXSYS_memcpy(pBuf, fdfEncodedData.GetBuffer(), nBufSize);
+ memcpy(pBuf, fdfEncodedData.GetBuffer(), nBufSize);
return true;
}
diff --git a/fpdfsdk/fpdf_structtree.cpp b/fpdfsdk/fpdf_structtree.cpp
index 5a922a1..06713fb 100644
--- a/fpdfsdk/fpdf_structtree.cpp
+++ b/fpdfsdk/fpdf_structtree.cpp
@@ -68,7 +68,7 @@
CFX_ByteString encodedStr = str.UTF16LE_Encode();
const unsigned long len = encodedStr.GetLength();
if (buffer && len <= buflen)
- FXSYS_memcpy(buffer, encodedStr.c_str(), len);
+ memcpy(buffer, encodedStr.c_str(), len);
return len;
}
diff --git a/fpdfsdk/fpdfdoc.cpp b/fpdfsdk/fpdfdoc.cpp
index 39c7602..0c8e26c 100644
--- a/fpdfsdk/fpdfdoc.cpp
+++ b/fpdfsdk/fpdfdoc.cpp
@@ -66,7 +66,7 @@
CFX_ByteString encodedText = text.UTF16LE_Encode();
unsigned long len = encodedText.GetLength();
if (buffer && len <= buflen)
- FXSYS_memcpy(buffer, encodedText.c_str(), len);
+ memcpy(buffer, encodedText.c_str(), len);
return len;
}
@@ -188,7 +188,7 @@
CFX_ByteString path = action.GetFilePath().UTF8Encode();
unsigned long len = path.GetLength() + 1;
if (buffer && len <= buflen)
- FXSYS_memcpy(buffer, path.c_str(), len);
+ memcpy(buffer, path.c_str(), len);
return len;
}
@@ -205,7 +205,7 @@
CFX_ByteString path = action.GetURI(pDoc);
unsigned long len = path.GetLength() + 1;
if (buffer && len <= buflen)
- FXSYS_memcpy(buffer, path.c_str(), len);
+ memcpy(buffer, path.c_str(), len);
return len;
}
diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp
index 6e31e1f..6610f81 100644
--- a/fpdfsdk/fpdfformfill.cpp
+++ b/fpdfsdk/fpdfformfill.cpp
@@ -489,9 +489,9 @@
uint32_t real_size = len < *size ? len : *size;
if (real_size > 0) {
- FXSYS_memcpy((void*)wsText,
- bsCpText.GetBuffer(real_size * sizeof(unsigned short)),
- real_size * sizeof(unsigned short));
+ memcpy((void*)wsText,
+ bsCpText.GetBuffer(real_size * sizeof(unsigned short)),
+ real_size * sizeof(unsigned short));
bsCpText.ReleaseBuffer(real_size * sizeof(unsigned short));
}
*size = real_size;
@@ -521,9 +521,9 @@
uint32_t real_size = len < *size ? len : *size;
if (real_size > 0) {
- FXSYS_memcpy((void*)wsText,
- bsCpText.GetBuffer(real_size * sizeof(unsigned short)),
- real_size * sizeof(unsigned short));
+ memcpy((void*)wsText,
+ bsCpText.GetBuffer(real_size * sizeof(unsigned short)),
+ real_size * sizeof(unsigned short));
bsCpText.ReleaseBuffer(real_size * sizeof(unsigned short));
}
*size = real_size;
@@ -615,7 +615,7 @@
uint32_t real_size = len < *size ? len : *size;
if (real_size > 0)
- FXSYS_memcpy((void*)bsText, (*sSuggestWords)[index].c_str(), real_size);
+ memcpy((void*)bsText, (*sSuggestWords)[index].c_str(), real_size);
*size = real_size;
return true;
}
diff --git a/fpdfsdk/fpdftext.cpp b/fpdfsdk/fpdftext.cpp
index cbb682d..5abd232 100644
--- a/fpdfsdk/fpdftext.cpp
+++ b/fpdfsdk/fpdftext.cpp
@@ -155,8 +155,8 @@
str = str.Left(count);
CFX_ByteString cbUTF16str = str.UTF16LE_Encode();
- FXSYS_memcpy(result, cbUTF16str.GetBuffer(cbUTF16str.GetLength()),
- cbUTF16str.GetLength());
+ memcpy(result, cbUTF16str.GetBuffer(cbUTF16str.GetLength()),
+ cbUTF16str.GetLength());
cbUTF16str.ReleaseBuffer(cbUTF16str.GetLength());
return cbUTF16str.GetLength() / sizeof(unsigned short);
@@ -210,8 +210,8 @@
CFX_ByteString cbUTF16Str = str.UTF16LE_Encode();
int len = cbUTF16Str.GetLength() / sizeof(unsigned short);
int size = buflen > len ? len : buflen;
- FXSYS_memcpy(buffer, cbUTF16Str.GetBuffer(size * sizeof(unsigned short)),
- size * sizeof(unsigned short));
+ memcpy(buffer, cbUTF16Str.GetBuffer(size * sizeof(unsigned short)),
+ size * sizeof(unsigned short));
cbUTF16Str.ReleaseBuffer(size * sizeof(unsigned short));
return size;
@@ -311,7 +311,7 @@
int size = std::min(required, buflen);
if (size > 0) {
int buf_size = size * sizeof(unsigned short);
- FXSYS_memcpy(buffer, cbUTF16URL.GetBuffer(buf_size), buf_size);
+ memcpy(buffer, cbUTF16URL.GetBuffer(buf_size), buf_size);
}
return size;
}
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index e9ae68c..d94bec6 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -565,7 +565,7 @@
if (!newPos.IsValid() || newPos.ValueOrDie() > m_size)
return false;
- FXSYS_memcpy(buffer, m_pBuf + offset, size);
+ memcpy(buffer, m_pBuf + offset, size);
return true;
}
@@ -734,7 +734,7 @@
auto pDst = pdfium::MakeRetain<CFX_DIBitmap>();
int pitch = pBitmap->GetPitch();
pDst->Create(size_x, size_y, FXDIB_Rgb32);
- FXSYS_memset(pDst->GetBuffer(), -1, pitch * size_y);
+ memset(pDst->GetBuffer(), -1, pitch * size_y);
pDst->CompositeBitmap(0, 0, size_x, size_y, pBitmap, 0, 0,
FXDIB_BLEND_NORMAL, nullptr, false, nullptr);
WinDC.StretchDIBits(pDst, 0, 0, size_x, size_y);
@@ -1164,7 +1164,7 @@
if (!str)
return -1;
- FXSYS_memset(str, 0, sizeof(FPDF_BSTR));
+ memset(str, 0, sizeof(FPDF_BSTR));
return 0;
}
@@ -1193,7 +1193,7 @@
str->str = FX_Alloc(char, length + 1);
str->str[length] = 0;
- FXSYS_memcpy(str->str, bstr, length);
+ memcpy(str->str, bstr, length);
str->len = length;
return 0;
diff --git a/fpdfsdk/fxedit/fxet_list.h b/fpdfsdk/fxedit/fxet_list.h
index d0fef1c..50e43c9 100644
--- a/fpdfsdk/fxedit/fxet_list.h
+++ b/fpdfsdk/fxedit/fxet_list.h
@@ -53,7 +53,7 @@
}
bool operator==(const CLST_Rect& rect) const {
- return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) == 0;
+ return memcmp(this, &rect, sizeof(CLST_Rect)) == 0;
}
bool operator!=(const CLST_Rect& rect) const { return !(*this == rect); }
diff --git a/fxbarcode/common/BC_CommonBitMatrix.cpp b/fxbarcode/common/BC_CommonBitMatrix.cpp
index 95f5e46..a3e20ed 100644
--- a/fxbarcode/common/BC_CommonBitMatrix.cpp
+++ b/fxbarcode/common/BC_CommonBitMatrix.cpp
@@ -36,7 +36,7 @@
int32_t rowSize = (m_height + 31) >> 5;
m_rowSize = rowSize;
m_bits = FX_Alloc2D(int32_t, m_rowSize, m_height);
- FXSYS_memset(m_bits, 0, m_rowSize * m_height * sizeof(int32_t));
+ memset(m_bits, 0, m_rowSize * m_height * sizeof(int32_t));
}
void CBC_CommonBitMatrix::Init(int32_t width, int32_t height) {
m_width = width;
@@ -44,7 +44,7 @@
int32_t rowSize = (width + 31) >> 5;
m_rowSize = rowSize;
m_bits = FX_Alloc2D(int32_t, m_rowSize, m_height);
- FXSYS_memset(m_bits, 0, m_rowSize * m_height * sizeof(int32_t));
+ memset(m_bits, 0, m_rowSize * m_height * sizeof(int32_t));
}
CBC_CommonBitMatrix::~CBC_CommonBitMatrix() {
FX_Free(m_bits);
@@ -71,7 +71,7 @@
m_bits[offset] ^= 1 << (x & 0x1f);
}
void CBC_CommonBitMatrix::Clear() {
- FXSYS_memset(m_bits, 0, m_rowSize * m_height * sizeof(int32_t));
+ memset(m_bits, 0, m_rowSize * m_height * sizeof(int32_t));
}
void CBC_CommonBitMatrix::SetRegion(int32_t left,
int32_t top,
diff --git a/fxbarcode/common/BC_CommonByteArray.cpp b/fxbarcode/common/BC_CommonByteArray.cpp
index a271de6..b670ba3 100644
--- a/fxbarcode/common/BC_CommonByteArray.cpp
+++ b/fxbarcode/common/BC_CommonByteArray.cpp
@@ -32,13 +32,13 @@
CBC_CommonByteArray::CBC_CommonByteArray(int32_t size) {
m_size = size;
m_bytes = FX_Alloc(uint8_t, size);
- FXSYS_memset(m_bytes, 0, size);
+ memset(m_bytes, 0, size);
m_index = 0;
}
CBC_CommonByteArray::CBC_CommonByteArray(uint8_t* byteArray, int32_t size) {
m_size = size;
m_bytes = FX_Alloc(uint8_t, size);
- FXSYS_memcpy(m_bytes, byteArray, size);
+ memcpy(m_bytes, byteArray, size);
m_index = size;
}
CBC_CommonByteArray::~CBC_CommonByteArray() {
@@ -68,10 +68,10 @@
if (!m_bytes || m_size < capacity) {
uint8_t* newArray = FX_Alloc(uint8_t, capacity);
if (m_bytes) {
- FXSYS_memcpy(newArray, m_bytes, m_size);
- FXSYS_memset(newArray + m_size, 0, capacity - m_size);
+ memcpy(newArray, m_bytes, m_size);
+ memset(newArray + m_size, 0, capacity - m_size);
} else {
- FXSYS_memset(newArray, 0, capacity);
+ memset(newArray, 0, capacity);
}
FX_Free(m_bytes);
m_bytes = newArray;
@@ -82,7 +82,7 @@
FX_Free(m_bytes);
m_bytes = FX_Alloc(uint8_t, count);
m_size = count;
- FXSYS_memcpy(m_bytes, source + offset, count);
+ memcpy(m_bytes, source + offset, count);
m_index = count;
}
void CBC_CommonByteArray::Set(std::vector<uint8_t>* source,
diff --git a/fxbarcode/common/BC_CommonByteMatrix.cpp b/fxbarcode/common/BC_CommonByteMatrix.cpp
index 44c7832..2ab1e9a 100644
--- a/fxbarcode/common/BC_CommonByteMatrix.cpp
+++ b/fxbarcode/common/BC_CommonByteMatrix.cpp
@@ -30,7 +30,7 @@
}
void CBC_CommonByteMatrix::Init() {
m_bytes = FX_Alloc2D(uint8_t, m_height, m_width);
- FXSYS_memset(m_bytes, 0xff, m_height * m_width);
+ memset(m_bytes, 0xff, m_height * m_width);
}
CBC_CommonByteMatrix::~CBC_CommonByteMatrix() {
FX_Free(m_bytes);
diff --git a/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp b/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
index 3b1b964..0dcba84 100644
--- a/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
+++ b/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
@@ -85,7 +85,7 @@
outWidth = bytematrix->GetWidth();
outHeight = bytematrix->GetHeight();
uint8_t* result = FX_Alloc2D(uint8_t, outWidth, outHeight);
- FXSYS_memcpy(result, bytematrix->GetArray(), outWidth * outHeight);
+ memcpy(result, bytematrix->GetArray(), outWidth * outHeight);
delete bytematrix;
delete placement;
return result;
diff --git a/fxbarcode/datamatrix/BC_ErrorCorrection.cpp b/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
index 72ce8fc..43bdc24 100644
--- a/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
+++ b/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
@@ -183,7 +183,7 @@
return CFX_WideString();
}
uint16_t* ecc = FX_Alloc(uint16_t, numECWords);
- FXSYS_memset(ecc, 0, numECWords * sizeof(uint16_t));
+ memset(ecc, 0, numECWords * sizeof(uint16_t));
for (int32_t l = start; l < start + len; l++) {
uint16_t m = ecc[numECWords - 1] ^ codewords.GetAt(l);
for (int32_t k = numECWords - 1; k > 0; k--) {
diff --git a/fxbarcode/oned/BC_OneDimWriter.cpp b/fxbarcode/oned/BC_OneDimWriter.cpp
index ecefec2..95244ae 100644
--- a/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -265,7 +265,7 @@
CFX_ByteString str = FX_UTF8Encode(contents);
int32_t iLen = str.GetLength();
FXTEXT_CHARPOS* pCharPos = FX_Alloc(FXTEXT_CHARPOS, iLen);
- FXSYS_memset(pCharPos, 0, sizeof(FXTEXT_CHARPOS) * iLen);
+ memset(pCharPos, 0, sizeof(FXTEXT_CHARPOS) * iLen);
float charsLen = 0;
float geWidth = 0;
if (m_locTextLoc == BC_TEXT_LOC_ABOVEEMBED ||
diff --git a/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index 697d8df..21b0f9a 100644
--- a/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -184,7 +184,7 @@
CFX_ByteString str = FX_UTF8Encode(contents);
int32_t iLen = str.GetLength();
FXTEXT_CHARPOS* pCharPos = FX_Alloc(FXTEXT_CHARPOS, iLen);
- FXSYS_memset(pCharPos, 0, sizeof(FXTEXT_CHARPOS) * iLen);
+ memset(pCharPos, 0, sizeof(FXTEXT_CHARPOS) * iLen);
CFX_FxgeDevice geBitmap;
if (pOutBitmap)
geBitmap.Attach(pOutBitmap, false, nullptr, false);
diff --git a/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index 5d1666d..5aea9f3 100644
--- a/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -182,7 +182,7 @@
CFX_ByteString str = FX_UTF8Encode(contents);
int32_t iLength = str.GetLength();
FXTEXT_CHARPOS* pCharPos = FX_Alloc(FXTEXT_CHARPOS, iLength);
- FXSYS_memset(pCharPos, 0, sizeof(FXTEXT_CHARPOS) * iLength);
+ memset(pCharPos, 0, sizeof(FXTEXT_CHARPOS) * iLength);
CFX_ByteString tempStr = str.Mid(0, 4);
int32_t iLen = tempStr.GetLength();
int32_t strWidth = 7 * multiple * 4;
diff --git a/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/fxbarcode/oned/BC_OnedUPCAWriter.cpp
index 588c306..87c6db1 100644
--- a/fxbarcode/oned/BC_OnedUPCAWriter.cpp
+++ b/fxbarcode/oned/BC_OnedUPCAWriter.cpp
@@ -135,7 +135,7 @@
CFX_ByteString str = FX_UTF8Encode(contents);
int32_t iLen = str.GetLength();
FXTEXT_CHARPOS* pCharPos = FX_Alloc(FXTEXT_CHARPOS, iLen);
- FXSYS_memset(pCharPos, 0, sizeof(FXTEXT_CHARPOS) * iLen);
+ memset(pCharPos, 0, sizeof(FXTEXT_CHARPOS) * iLen);
CFX_ByteString tempStr = str.Mid(1, 5);
float strWidth = (float)35 * multiple;
float blank = 0.0;
diff --git a/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp b/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp
index b1fd3d3..abdd113 100644
--- a/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp
+++ b/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp
@@ -164,7 +164,7 @@
if (e != BCExceptionNO)
return L" ";
wchar_t* ech = FX_Alloc(wchar_t, k);
- FXSYS_memset(ech, 0, k * sizeof(wchar_t));
+ memset(ech, 0, k * sizeof(wchar_t));
int32_t sld = dataCodewords.GetLength();
for (int32_t i = 0; i < sld; i++) {
int32_t t1 = (dataCodewords.GetAt(i) + ech[k - 1]) % 929;
diff --git a/fxbarcode/pdf417/BC_PDF417Writer.cpp b/fxbarcode/pdf417/BC_PDF417Writer.cpp
index aa5a923..5344b8a 100644
--- a/fxbarcode/pdf417/BC_PDF417Writer.cpp
+++ b/fxbarcode/pdf417/BC_PDF417Writer.cpp
@@ -97,7 +97,7 @@
}
}
uint8_t* result = FX_Alloc2D(uint8_t, outHeight, outWidth);
- FXSYS_memcpy(result, originalScale.data(), outHeight * outWidth);
+ memcpy(result, originalScale.data(), outHeight * outWidth);
return result;
}
void CBC_PDF417Writer::rotateArray(std::vector<uint8_t>& bitarray,
diff --git a/fxbarcode/qrcode/BC_QRCodeWriter.cpp b/fxbarcode/qrcode/BC_QRCodeWriter.cpp
index ac23462..b83bca8 100644
--- a/fxbarcode/qrcode/BC_QRCodeWriter.cpp
+++ b/fxbarcode/qrcode/BC_QRCodeWriter.cpp
@@ -100,7 +100,7 @@
outWidth = qr.GetMatrixWidth();
outHeight = qr.GetMatrixWidth();
uint8_t* result = FX_Alloc2D(uint8_t, outWidth, outHeight);
- FXSYS_memcpy(result, qr.GetMatrix()->GetArray(), outWidth * outHeight);
+ memcpy(result, qr.GetMatrix()->GetArray(), outWidth * outHeight);
return result;
}
diff --git a/fxbarcode/qrcode/BC_QRCoderBitVector.cpp b/fxbarcode/qrcode/BC_QRCoderBitVector.cpp
index 0822209..2e3c341 100644
--- a/fxbarcode/qrcode/BC_QRCoderBitVector.cpp
+++ b/fxbarcode/qrcode/BC_QRCoderBitVector.cpp
@@ -117,7 +117,7 @@
void CBC_QRCoderBitVector::AppendByte(int32_t value) {
if ((m_sizeInBits >> 3) == m_size) {
uint8_t* newArray = FX_Alloc(uint8_t, m_size << 1);
- FXSYS_memcpy(newArray, m_array, m_size);
+ memcpy(newArray, m_array, m_size);
FX_Free(m_array);
m_array = newArray;
m_size = m_size << 1;
diff --git a/third_party/agg23/agg_array.h b/third_party/agg23/agg_array.h
index 204ae2e..d521b04 100644
--- a/third_party/agg23/agg_array.h
+++ b/third_party/agg23/agg_array.h
@@ -40,10 +40,7 @@
}
void allocate(unsigned size, unsigned extra_tail = 0);
void resize(unsigned new_size);
- void zero()
- {
- FXSYS_memset(m_array, 0, sizeof(T) * m_size);
- }
+ void zero() { memset(m_array, 0, sizeof(T) * m_size); }
void add(const T& v)
{
m_array[m_size++] = v;
@@ -130,7 +127,7 @@
if(new_size > m_size) {
if(new_size > m_capacity) {
T* data = FX_Alloc(T, new_size);
- FXSYS_memcpy(data, m_array, m_size * sizeof(T));
+ memcpy(data, m_array, m_size * sizeof(T));
FX_Free(m_array);
m_array = data;
}
@@ -145,14 +142,14 @@
m_capacity(v.m_capacity),
m_array(v.m_capacity ? FX_Alloc(T, v.m_capacity) : 0)
{
- FXSYS_memcpy(m_array, v.m_array, sizeof(T) * v.m_size);
+ memcpy(m_array, v.m_array, sizeof(T) * v.m_size);
}
template<class T> const pod_array<T>&
pod_array<T>::operator = (const pod_array<T>&v)
{
allocate(v.m_size);
if(v.m_size) {
- FXSYS_memcpy(m_array, v.m_array, sizeof(T) * v.m_size);
+ memcpy(m_array, v.m_array, sizeof(T) * v.m_size);
}
return *this;
}
@@ -322,7 +319,7 @@
unsigned i;
for(i = 0; i < v.m_num_blocks; ++i) {
m_blocks[i] = FX_Alloc(T, block_size);
- FXSYS_memcpy(m_blocks[i], v.m_blocks[i], block_size * sizeof(T));
+ memcpy(m_blocks[i], v.m_blocks[i], block_size * sizeof(T));
}
}
template<class T, unsigned S>
@@ -333,7 +330,7 @@
allocate_block(i);
}
for(i = 0; i < v.m_num_blocks; ++i) {
- FXSYS_memcpy(m_blocks[i], v.m_blocks[i], block_size * sizeof(T));
+ memcpy(m_blocks[i], v.m_blocks[i], block_size * sizeof(T));
}
m_size = v.m_size;
return *this;
@@ -344,10 +341,8 @@
if(nb >= m_max_blocks) {
T** new_blocks = FX_Alloc(T*, m_max_blocks + m_block_ptr_inc);
if(m_blocks) {
- FXSYS_memcpy(new_blocks,
- m_blocks,
- m_num_blocks * sizeof(T*));
- FX_Free(m_blocks);
+ memcpy(new_blocks, m_blocks, m_num_blocks * sizeof(T*));
+ FX_Free(m_blocks);
}
m_blocks = new_blocks;
m_max_blocks += m_block_ptr_inc;
@@ -476,10 +471,8 @@
if(m_num_blocks >= m_max_blocks) {
int8u** new_blocks = FX_Alloc(int8u*, m_max_blocks + m_block_ptr_inc);
if(m_blocks) {
- FXSYS_memcpy(new_blocks,
- m_blocks,
- m_num_blocks * sizeof(int8u*));
- FX_Free(m_blocks);
+ memcpy(new_blocks, m_blocks, m_num_blocks * sizeof(int8u*));
+ FX_Free(m_blocks);
}
m_blocks = new_blocks;
m_max_blocks += m_block_ptr_inc;
diff --git a/third_party/agg23/agg_path_storage.cpp b/third_party/agg23/agg_path_storage.cpp
index 747777d..c24f795 100644
--- a/third_party/agg23/agg_path_storage.cpp
+++ b/third_party/agg23/agg_path_storage.cpp
@@ -57,13 +57,9 @@
unsigned char** new_cmds =
(unsigned char**)(new_coords + m_max_blocks + block_pool);
if(m_coord_blocks) {
- FXSYS_memcpy(new_coords,
- m_coord_blocks,
- m_max_blocks * sizeof(float*));
- FXSYS_memcpy(new_cmds,
- m_cmd_blocks,
- m_max_blocks * sizeof(unsigned char*));
- FX_Free(m_coord_blocks);
+ memcpy(new_coords, m_coord_blocks, m_max_blocks * sizeof(float*));
+ memcpy(new_cmds, m_cmd_blocks, m_max_blocks * sizeof(unsigned char*));
+ FX_Free(m_coord_blocks);
}
m_coord_blocks = new_coords;
m_cmd_blocks = new_cmds;
diff --git a/third_party/agg23/agg_rasterizer_scanline_aa.cpp b/third_party/agg23/agg_rasterizer_scanline_aa.cpp
index af6dd58..c90bdaf 100644
--- a/third_party/agg23/agg_rasterizer_scanline_aa.cpp
+++ b/third_party/agg23/agg_rasterizer_scanline_aa.cpp
@@ -118,8 +118,8 @@
if(m_num_blocks >= m_max_blocks) {
cell_aa** new_cells = FX_Alloc( cell_aa*, m_max_blocks + cell_block_pool);
if(m_cells) {
- FXSYS_memcpy(new_cells, m_cells, m_max_blocks * sizeof(cell_aa*));
- FX_Free(m_cells);
+ memcpy(new_cells, m_cells, m_max_blocks * sizeof(cell_aa*));
+ FX_Free(m_cells);
}
m_cells = new_cells;
m_max_blocks += cell_block_pool;
diff --git a/third_party/agg23/agg_scanline_u.h b/third_party/agg23/agg_scanline_u.h
index 2100115..844dc9a 100644
--- a/third_party/agg23/agg_scanline_u.h
+++ b/third_party/agg23/agg_scanline_u.h
@@ -83,7 +83,7 @@
void add_cells(int x, unsigned len, const CoverT* covers)
{
x -= m_min_x;
- FXSYS_memcpy(m_covers + x, covers, len * sizeof(CoverT));
+ memcpy(m_covers + x, covers, len * sizeof(CoverT));
if(x == m_last_x + 1) {
m_cur_span->len += (coord_type)len;
} else {
@@ -97,7 +97,7 @@
void add_span(int x, unsigned len, unsigned cover)
{
x -= m_min_x;
- FXSYS_memset(m_covers + x, cover, len);
+ memset(m_covers + x, cover, len);
if(x == m_last_x + 1) {
m_cur_span->len += (coord_type)len;
} else {
diff --git a/third_party/lcms2-2.6/src/cmserr.c b/third_party/lcms2-2.6/src/cmserr.c
index 77b67b4..f9adc38 100644
--- a/third_party/lcms2-2.6/src/cmserr.c
+++ b/third_party/lcms2-2.6/src/cmserr.c
@@ -269,7 +269,7 @@
void* CMSEXPORT _cmsMallocZero(cmsContext ContextID, cmsUInt32Number size)
{
void* p = FXMEM_DefaultAlloc(size, 1);
- if (p) FXSYS_memset(p, 0, size);
+ if (p) memset(p, 0, size);
return p;
}
@@ -299,7 +299,7 @@
void* CMSEXPORT _cmsDupMem(cmsContext ContextID, const void* Org, cmsUInt32Number size)
{
void* p = FXMEM_DefaultAlloc(size, 1);
- FXSYS_memmove(p, Org, size);
+ memmove(p, Org, size);
return p;
}
diff --git a/third_party/libjpeg/jinclude.h b/third_party/libjpeg/jinclude.h
index 56b04fb..6585076 100644
--- a/third_party/libjpeg/jinclude.h
+++ b/third_party/libjpeg/jinclude.h
@@ -76,8 +76,9 @@
#else /* not BSD, assume ANSI/SysV string lib */
//#include <string.h>
-#define MEMZERO(target,size) FXSYS_memset((void *)(target), 0, (size_t)(size))
-#define MEMCOPY(dest,src,size) FXSYS_memcpy((void *)(dest), (const void *)(src), (size_t)(size))
+#define MEMZERO(target, size) memset((void*)(target), 0, (size_t)(size))
+#define MEMCOPY(dest, src, size) \
+ memcpy((void*)(dest), (const void*)(src), (size_t)(size))
#endif
diff --git a/third_party/libtiff/0006-HeapBufferOverflow-ChopUpSingleUncompressedStrip.patch b/third_party/libtiff/0006-HeapBufferOverflow-ChopUpSingleUncompressedStrip.patch
index cdb8fc6..5d44fb1 100644
--- a/third_party/libtiff/0006-HeapBufferOverflow-ChopUpSingleUncompressedStrip.patch
+++ b/third_party/libtiff/0006-HeapBufferOverflow-ChopUpSingleUncompressedStrip.patch
@@ -3,7 +3,7 @@
--- a/core/fxcodec/codec/ccodec_tiffmodule.cpp
+++ b/core/fxcodec/codec/ccodec_tiffmodule.cpp
@@ -79,6 +79,10 @@ int _TIFFmemcmp(const void* ptr1, const void* ptr2, tmsize_t size) {
- return FXSYS_memcmp(ptr1, ptr2, (size_t)size);
+ return memcmp(ptr1, ptr2, (size_t)size);
}
+int _TIFFIfMultiplicationOverflow(tmsize_t op1, tmsize_t op2) {
diff --git a/xfa/fde/cfde_txtedtbuf.cpp b/xfa/fde/cfde_txtedtbuf.cpp
index ba9f5cd..dc88704 100644
--- a/xfa/fde/cfde_txtedtbuf.cpp
+++ b/xfa/fde/cfde_txtedtbuf.cpp
@@ -53,8 +53,7 @@
}
ChunkHeader* chunk = m_chunks[i].get();
- FXSYS_memcpy(chunk->wChars.get(), lpSrcBuf,
- nCopyedLength * sizeof(wchar_t));
+ memcpy(chunk->wChars.get(), lpSrcBuf, nCopyedLength * sizeof(wchar_t));
nLeave -= nCopyedLength;
lpSrcBuf += nCopyedLength;
chunk->nUsed = nCopyedLength;
@@ -108,7 +107,7 @@
if (nLeave <= nCopyLength) {
nCopyLength = nLeave;
}
- FXSYS_memcpy(lpDstBuf, lpSrcBuf, nCopyLength * sizeof(wchar_t));
+ memcpy(lpDstBuf, lpSrcBuf, nCopyLength * sizeof(wchar_t));
nChunkIndex++;
if (nChunkIndex >= nCount) {
break;
@@ -141,8 +140,8 @@
ChunkHeader* chunk = m_chunks[chunkIndex].get();
int32_t nCopy = chunk->nUsed - charIndex;
- FXSYS_memcpy(newChunk->wChars.get(), chunk->wChars.get() + charIndex,
- nCopy * sizeof(wchar_t));
+ memcpy(newChunk->wChars.get(), chunk->wChars.get() + charIndex,
+ nCopy * sizeof(wchar_t));
chunk->nUsed -= nCopy;
chunkIndex++;
@@ -157,8 +156,8 @@
chunkIndex--;
int32_t nFree = GetChunkSize() - chunk->nUsed;
int32_t nCopy = std::min(nLengthTemp, nFree);
- FXSYS_memcpy(chunk->wChars.get() + chunk->nUsed, lpText,
- nCopy * sizeof(wchar_t));
+ memcpy(chunk->wChars.get() + chunk->nUsed, lpText,
+ nCopy * sizeof(wchar_t));
lpText += nCopy;
nLengthTemp -= nCopy;
chunk->nUsed += nCopy;
@@ -170,7 +169,7 @@
auto chunk = NewChunk();
int32_t nCopy = std::min(nLengthTemp, GetChunkSize());
- FXSYS_memcpy(chunk->wChars.get(), lpText, nCopy * sizeof(wchar_t));
+ memcpy(chunk->wChars.get(), lpText, nCopy * sizeof(wchar_t));
lpText += nCopy;
nLengthTemp -= nCopy;
chunk->nUsed = nCopy;
@@ -193,9 +192,8 @@
int32_t nMovePart = chunk->nUsed - nFirstPart;
if (nMovePart != 0) {
int32_t nDelete = std::min(nFirstPart, nLength);
- FXSYS_memmove(chunk->wChars.get() + nFirstPart - nDelete,
- chunk->wChars.get() + nFirstPart,
- nMovePart * sizeof(wchar_t));
+ memmove(chunk->wChars.get() + nFirstPart - nDelete,
+ chunk->wChars.get() + nFirstPart, nMovePart * sizeof(wchar_t));
chunk->nUsed -= nDelete;
nLength -= nDelete;
endChunkIndex--;
diff --git a/xfa/fde/cfde_txtedtdorecord_insert.cpp b/xfa/fde/cfde_txtedtdorecord_insert.cpp
index 0e3f921..fe79960 100644
--- a/xfa/fde/cfde_txtedtdorecord_insert.cpp
+++ b/xfa/fde/cfde_txtedtdorecord_insert.cpp
@@ -17,7 +17,7 @@
: m_pEngine(pEngine), m_nCaret(nCaret) {
ASSERT(pEngine);
wchar_t* lpBuffer = m_wsInsert.GetBuffer(nLength);
- FXSYS_memcpy(lpBuffer, lpText, nLength * sizeof(wchar_t));
+ memcpy(lpBuffer, lpText, nLength * sizeof(wchar_t));
m_wsInsert.ReleaseBuffer();
}
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 37e3e11..633e0bc 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -142,7 +142,7 @@
if (nLength > 0) {
CFX_WideString wsTemp;
wchar_t* lpBuffer = wsTemp.GetBuffer(nLength);
- FXSYS_memcpy(lpBuffer, wsText.c_str(), nLength * sizeof(wchar_t));
+ memcpy(lpBuffer, wsText.c_str(), nLength * sizeof(wchar_t));
ReplaceParagEnd(lpBuffer, nLength, false);
wsTemp.ReleaseBuffer(nLength);
if (m_nLimit > 0 && nLength > m_nLimit) {
@@ -312,7 +312,7 @@
CFX_WideString wsTemp;
wchar_t* lpBuffer = wsTemp.GetBuffer(nLength);
- FXSYS_memcpy(lpBuffer, lpText, nLength * sizeof(wchar_t));
+ memcpy(lpBuffer, lpText, nLength * sizeof(wchar_t));
ReplaceParagEnd(lpBuffer, nLength, false);
wsTemp.ReleaseBuffer(nLength);
bool bPart = false;
@@ -730,10 +730,10 @@
int32_t nOldLength = wsText.GetLength();
const wchar_t* pOldBuffer = wsText.c_str();
wchar_t* lpBuffer = wsTemp.GetBuffer(nOldLength + nLength);
- FXSYS_memcpy(lpBuffer, pOldBuffer, (nIndex) * sizeof(wchar_t));
- FXSYS_memcpy(lpBuffer + nIndex, lpText, nLength * sizeof(wchar_t));
- FXSYS_memcpy(lpBuffer + nIndex + nLength, pOldBuffer + nIndex,
- (nOldLength - nIndex) * sizeof(wchar_t));
+ memcpy(lpBuffer, pOldBuffer, (nIndex) * sizeof(wchar_t));
+ memcpy(lpBuffer + nIndex, lpText, nLength * sizeof(wchar_t));
+ memcpy(lpBuffer + nIndex + nLength, pOldBuffer + nIndex,
+ (nOldLength - nIndex) * sizeof(wchar_t));
wsTemp.ReleaseBuffer(nOldLength + nLength);
wsText = wsTemp;
return wsText;
@@ -1028,8 +1028,8 @@
if (bPreIsCR == true) {
int32_t nNext = i + 1;
if (nNext < nLength) {
- FXSYS_memmove(lpText + i, lpText + nNext,
- (nLength - nNext) * sizeof(wchar_t));
+ memmove(lpText + i, lpText + nNext,
+ (nLength - nNext) * sizeof(wchar_t));
}
i--;
nLength--;
@@ -1079,16 +1079,16 @@
for (int32_t i = 0; i < nCount; i++) {
int32_t nPos = PosArr[i];
int32_t nCopyLen = nPos - nSrcPos + 1;
- FXSYS_memcpy(lpDstBuf + nDstPos, lpSrcBuf + nSrcPos,
- nCopyLen * sizeof(wchar_t));
+ memcpy(lpDstBuf + nDstPos, lpSrcBuf + nSrcPos,
+ nCopyLen * sizeof(wchar_t));
nDstPos += nCopyLen;
nSrcPos += nCopyLen;
lpDstBuf[nDstPos] = L'\n';
nDstPos++;
}
if (nSrcPos < nLength) {
- FXSYS_memcpy(lpDstBuf + nDstPos, lpSrcBuf + nSrcPos,
- (nLength - nSrcPos) * sizeof(wchar_t));
+ memcpy(lpDstBuf + nDstPos, lpSrcBuf + nSrcPos,
+ (nLength - nSrcPos) * sizeof(wchar_t));
}
wsTemp.ReleaseBuffer(nLength + nCount);
wsText = wsTemp;
diff --git a/xfa/fde/cfde_txtedtpage.cpp b/xfa/fde/cfde_txtedtpage.cpp
index 122eb40..5bd731f 100644
--- a/xfa/fde/cfde_txtedtpage.cpp
+++ b/xfa/fde/cfde_txtedtpage.cpp
@@ -158,7 +158,7 @@
}
if ((nCharPosCount * 5) < (m_nCharCount << 2)) {
FXTEXT_CHARPOS* pTemp = FX_Alloc(FXTEXT_CHARPOS, nCharPosCount);
- FXSYS_memcpy(pTemp, pCharPos, sizeof(FXTEXT_CHARPOS) * nCharPosCount);
+ memcpy(pTemp, pCharPos, sizeof(FXTEXT_CHARPOS) * nCharPosCount);
FX_Free(pCharPos);
pCharPos = pTemp;
}
@@ -298,7 +298,7 @@
for (int32_t j = 0; j < nPieceCount; j++) {
const CFX_BreakPiece* pPiece = pBreak->GetBreakPieceUnstable(j);
FDE_TEXTEDITPIECE TxtEdtPiece;
- FXSYS_memset(&TxtEdtPiece, 0, sizeof(FDE_TEXTEDITPIECE));
+ memset(&TxtEdtPiece, 0, sizeof(FDE_TEXTEDITPIECE));
TxtEdtPiece.nBidiLevel = pPiece->m_iBidiLevel;
TxtEdtPiece.nCount = pPiece->GetLength();
TxtEdtPiece.nStart = nPieceStart;
diff --git a/xfa/fde/css/cfde_csstextbuf.cpp b/xfa/fde/css/cfde_csstextbuf.cpp
index 6f74db2..b8d8b19 100644
--- a/xfa/fde/css/cfde_csstextbuf.cpp
+++ b/xfa/fde/css/cfde_csstextbuf.cpp
@@ -81,6 +81,6 @@
ASSERT(iStart >= 0 && iLength >= 0);
iLength = pdfium::clamp(iLength, 0, m_iDatLen - iStart);
- FXSYS_memmove(m_pBuffer, m_pBuffer + iStart, iLength * sizeof(wchar_t));
+ memmove(m_pBuffer, m_pBuffer + iStart, iLength * sizeof(wchar_t));
m_iDatLen = iLength;
}
diff --git a/xfa/fde/xml/fde_xml_imp.cpp b/xfa/fde/xml/fde_xml_imp.cpp
index 68a4978..2de48ef 100644
--- a/xfa/fde/xml/fde_xml_imp.cpp
+++ b/xfa/fde/xml/fde_xml_imp.cpp
@@ -1161,8 +1161,8 @@
iCopyLength -= ((m_iAllocStep - 1) - iEndInnerIndex);
}
wchar_t* pBlockBuf = m_BlockArray[i].get();
- FXSYS_memcpy(pBuf + iPointer, pBlockBuf + iBufferPointer,
- iCopyLength * sizeof(wchar_t));
+ memcpy(pBuf + iPointer, pBlockBuf + iBufferPointer,
+ iCopyLength * sizeof(wchar_t));
iPointer += iCopyLength;
}
wsTextData.ReleaseBuffer(iLength);
diff --git a/xfa/fgas/crt/ifgas_stream.cpp b/xfa/fgas/crt/ifgas_stream.cpp
index 8627c9f..0edf2cc 100644
--- a/xfa/fgas/crt/ifgas_stream.cpp
+++ b/xfa/fgas/crt/ifgas_stream.cpp
@@ -651,7 +651,7 @@
uint32_t dwOffsetTmp = m_iPosition - dwBlockOffset;
uint32_t dwCopySize =
std::min(iBufferSize, (int32_t)(dwBlockSize - dwOffsetTmp));
- FXSYS_memcpy(pBuffer, pBufferTmp + dwOffsetTmp, dwCopySize);
+ memcpy(pBuffer, pBufferTmp + dwOffsetTmp, dwCopySize);
dwOffsetTmp = dwCopySize;
iBufferSize -= dwCopySize;
while (iBufferSize > 0) {
@@ -662,7 +662,7 @@
dwBlockSize = m_pBufferRead->GetBlockSize();
pBufferTmp = m_pBufferRead->GetBlockBuffer();
dwCopySize = std::min((uint32_t)iBufferSize, dwBlockSize);
- FXSYS_memcpy(pBuffer + dwOffsetTmp, pBufferTmp, dwCopySize);
+ memcpy(pBuffer + dwOffsetTmp, pBufferTmp, dwCopySize);
dwOffsetTmp += dwCopySize;
iBufferSize -= dwCopySize;
}
@@ -800,7 +800,7 @@
if (iLen <= 0) {
return 0;
}
- FXSYS_memcpy(pBuffer, m_pData + m_iPosition, iLen);
+ memcpy(pBuffer, m_pData + m_iPosition, iLen);
m_iPosition += iLen;
return iLen;
}
@@ -831,7 +831,7 @@
if (iLen <= 0) {
return 0;
}
- FXSYS_memcpy(m_pData + m_iPosition, pBuffer, iLen);
+ memcpy(m_pData + m_iPosition, pBuffer, iLen);
m_iPosition += iLen;
if (m_iPosition > m_iLength) {
m_iLength = m_iPosition;
@@ -846,7 +846,7 @@
if (iLen <= 0) {
return 0;
}
- FXSYS_memcpy(m_pData + m_iPosition, pStr, iLen * 2);
+ memcpy(m_pData + m_iPosition, pStr, iLen * 2);
m_iPosition += iLen * 2;
if (m_iPosition > m_iLength) {
m_iLength = m_iPosition;
diff --git a/xfa/fgas/font/cfgas_fontmgr.cpp b/xfa/fgas/font/cfgas_fontmgr.cpp
index 7b8e19a..766422e 100644
--- a/xfa/fgas/font/cfgas_fontmgr.cpp
+++ b/xfa/fgas/font/cfgas_fontmgr.cpp
@@ -297,7 +297,7 @@
uint32_t dwUSB,
wchar_t wUnicode) {
FX_FONTMATCHPARAMS params;
- FXSYS_memset(¶ms, 0, sizeof(params));
+ memset(¶ms, 0, sizeof(params));
params.dwUSB = dwUSB;
params.wUnicode = wUnicode;
params.wCodePage = wCodePage;
@@ -350,13 +350,13 @@
if (lf.lfFaceName[0] == L'@')
return 1;
FX_FONTDESCRIPTOR* pFont = FX_Alloc(FX_FONTDESCRIPTOR, 1);
- FXSYS_memset(pFont, 0, sizeof(FX_FONTDESCRIPTOR));
+ memset(pFont, 0, sizeof(FX_FONTDESCRIPTOR));
pFont->uCharSet = lf.lfCharSet;
pFont->dwFontStyles = FX_GetGdiFontStyles(lf);
FXSYS_wcsncpy(pFont->wsFontFace, (const wchar_t*)lf.lfFaceName, 31);
pFont->wsFontFace[31] = 0;
- FXSYS_memcpy(&pFont->FontSignature, &lpntme->ntmFontSig,
- sizeof(lpntme->ntmFontSig));
+ memcpy(&pFont->FontSignature, &lpntme->ntmFontSig,
+ sizeof(lpntme->ntmFontSig));
reinterpret_cast<std::deque<FX_FONTDESCRIPTOR>*>(lParam)->push_back(*pFont);
FX_Free(pFont);
return 1;
@@ -367,7 +367,7 @@
wchar_t wUnicode) {
HDC hDC = ::GetDC(nullptr);
LOGFONTW lfFind;
- FXSYS_memset(&lfFind, 0, sizeof(lfFind));
+ memset(&lfFind, 0, sizeof(lfFind));
lfFind.lfCharSet = DEFAULT_CHARSET;
if (pwsFaceName) {
FXSYS_wcsncpy(lfFind.lfFaceName, pwsFaceName, 31);
@@ -884,7 +884,7 @@
return nullptr;
FXFT_Stream ftStream = FX_Alloc(FXFT_StreamRec, 1);
- FXSYS_memset(ftStream, 0, sizeof(FXFT_StreamRec));
+ memset(ftStream, 0, sizeof(FXFT_StreamRec));
ftStream->base = nullptr;
ftStream->descriptor.pointer = static_cast<void*>(pFontStream.Get());
ftStream->pos = 0;
@@ -893,7 +893,7 @@
ftStream->close = _ftStreamClose;
FXFT_Open_Args ftArgs;
- FXSYS_memset(&ftArgs, 0, sizeof(FXFT_Open_Args));
+ memset(&ftArgs, 0, sizeof(FXFT_Open_Args));
ftArgs.flags |= FT_OPEN_STREAM;
ftArgs.stream = ftStream;
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index 5529967..d0dbf1f 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -532,7 +532,7 @@
bool bOrginPtIntersectWidthChild = false;
bool bOrginPtIntersectWidthDirty = rtDirty.Contains(rtWidget.TopLeft());
static FWL_NEEDREPAINTHITDATA hitPoint[kNeedRepaintHitPoints];
- FXSYS_memset(hitPoint, 0, sizeof(hitPoint));
+ memset(hitPoint, 0, sizeof(hitPoint));
float fxPiece = rtWidget.width / kNeedRepaintHitPiece;
float fyPiece = rtWidget.height / kNeedRepaintHitPiece;
hitPoint[2].hitPoint.x = hitPoint[6].hitPoint.x = rtWidget.left;
diff --git a/xfa/fxfa/app/cxfa_textlayout.cpp b/xfa/fxfa/app/cxfa_textlayout.cpp
index 9f4962e..2470459 100644
--- a/xfa/fxfa/app/cxfa_textlayout.cpp
+++ b/xfa/fxfa/app/cxfa_textlayout.cpp
@@ -601,7 +601,7 @@
pCharPos = FX_Alloc(FXTEXT_CHARPOS, iChars);
iCharCount = iChars;
}
- FXSYS_memset(pCharPos, 0, iCharCount * sizeof(FXTEXT_CHARPOS));
+ memset(pCharPos, 0, iCharCount * sizeof(FXTEXT_CHARPOS));
RenderString(pDevice.get(), pSolidBrush.get(), pPieceLine, j, pCharPos,
tmDoc2Device);
}
diff --git a/xfa/fxfa/cxfa_ffapp.cpp b/xfa/fxfa/cxfa_ffapp.cpp
index 40341ad..78de94e 100644
--- a/xfa/fxfa/cxfa_ffapp.cpp
+++ b/xfa/fxfa/cxfa_ffapp.cpp
@@ -70,7 +70,7 @@
const auto& acc = m_Data[index];
uint32_t dwSize = acc->GetSize();
size_t dwRead = std::min(size, static_cast<size_t>(dwSize - offset));
- FXSYS_memcpy(buffer, acc->GetData() + offset, dwRead);
+ memcpy(buffer, acc->GetData() + offset, dwRead);
size -= dwRead;
if (size == 0)
return true;
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index d38a671..83742d9 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -3557,8 +3557,8 @@
const wchar_t* const strName[] = {L"quot", L"amp", L"apos", L"lt", L"gt"};
int32_t iIndex = 0;
while (iIndex < 5) {
- if (FXSYS_memcmp(strString, strName[iIndex],
- FXSYS_wcslen(strName[iIndex])) == 0) {
+ if (memcmp(strString, strName[iIndex], FXSYS_wcslen(strName[iIndex])) ==
+ 0) {
break;
}
++iIndex;
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 75a125b..2828c98 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -3747,13 +3747,13 @@
void* pValue;
int32_t iBytes;
if (GetMapModuleBuffer(pKey, pValue, iBytes) && iBytes == sizeof(mValue)) {
- FXSYS_memcpy(&mValue, pValue, sizeof(mValue));
+ memcpy(&mValue, pValue, sizeof(mValue));
return true;
}
if (bUseDefault &&
XFA_GetAttributeDefaultValue(pValue, GetElementType(), eAttr,
XFA_ATTRIBUTETYPE_Measure, m_ePacket)) {
- FXSYS_memcpy(&mValue, pValue, sizeof(mValue));
+ memcpy(&mValue, pValue, sizeof(mValue));
return true;
}
return false;
@@ -4020,7 +4020,7 @@
if (!GetMapModuleBuffer(pKey, pData, iBytes, bProtoAlso)) {
return false;
}
- return iBytes == sizeof(void*) && FXSYS_memcpy(&pData, pData, iBytes);
+ return iBytes == sizeof(void*) && memcpy(&pData, pData, iBytes);
}
bool CXFA_Node::SetScriptContent(const CFX_WideString& wsContent,
@@ -4889,7 +4889,7 @@
pBuffer->pCallbackInfo = pCallbackInfo;
pBuffer->iBytes = iBytes;
- FXSYS_memcpy(pBuffer->GetData(), pValue, iBytes);
+ memcpy(pBuffer->GetData(), pValue, iBytes);
}
bool CXFA_Node::GetMapModuleBuffer(void* pKey,
@@ -5006,8 +5006,7 @@
}
pDstBuffer->pCallbackInfo = pSrcBuffer->pCallbackInfo;
pDstBuffer->iBytes = pSrcBuffer->iBytes;
- FXSYS_memcpy(pDstBuffer->GetData(), pSrcBuffer->GetData(),
- pSrcBuffer->iBytes);
+ memcpy(pDstBuffer->GetData(), pSrcBuffer->GetData(), pSrcBuffer->iBytes);
if (pDstBuffer->pCallbackInfo && pDstBuffer->pCallbackInfo->pCopy) {
pDstBuffer->pCallbackInfo->pCopy(*(void**)pDstBuffer->GetData());
}
diff --git a/xfa/fxgraphics/cfx_graphics.cpp b/xfa/fxgraphics/cfx_graphics.cpp
index 1f224c7..a3821dd 100644
--- a/xfa/fxgraphics/cfx_graphics.cpp
+++ b/xfa/fxgraphics/cfx_graphics.cpp
@@ -359,8 +359,7 @@
auto mask = pdfium::MakeRetain<CFX_DIBitmap>();
mask->Create(data.width, data.height, FXDIB_1bppMask);
- FXSYS_memcpy(mask->GetBuffer(), data.maskBits,
- mask->GetPitch() * data.height);
+ memcpy(mask->GetBuffer(), data.maskBits, mask->GetPitch() * data.height);
CFX_FloatRect rectf = path->GetPathData()->GetBoundingBox();
if (matrix)
matrix->TransformRect(rectf);