summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/fdrm/crypto/fx_crypt.cpp4
-rw-r--r--core/src/fdrm/crypto/fx_crypt_aes.cpp8
-rw-r--r--core/src/fdrm/crypto/fx_crypt_sha.cpp24
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp6
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font.cpp34
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp10
-rw-r--r--core/src/fpdfapi/fpdf_font/ttgsubtable.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp10
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp18
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp14
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp8
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp8
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp80
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp14
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp22
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp8
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp10
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp14
-rw-r--r--core/src/fpdfdoc/doc_form.cpp2
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp6
-rw-r--r--core/src/fxcodec/codec/codec_int.h6
-rw-r--r--core/src/fxcodec/codec/fx_codec.cpp40
-rw-r--r--core/src/fxcodec/codec/fx_codec_bmp.cpp2
-rw-r--r--core/src/fxcodec/codec/fx_codec_fax.cpp22
-rw-r--r--core/src/fxcodec/codec/fx_codec_flate.cpp22
-rw-r--r--core/src/fxcodec/codec/fx_codec_gif.cpp4
-rw-r--r--core/src/fxcodec/codec/fx_codec_icc.cpp2
-rw-r--r--core/src/fxcodec/codec/fx_codec_jbig.cpp6
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpeg.cpp18
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpx_opj.cpp8
-rw-r--r--core/src/fxcodec/codec/fx_codec_png.cpp10
-rw-r--r--core/src/fxcodec/codec/fx_codec_progress.cpp46
-rw-r--r--core/src/fxcodec/codec/fx_codec_tiff.cpp10
-rw-r--r--core/src/fxcodec/fx_zlib/zlib_v128/zutil.h6
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Define.h6
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp6
-rw-r--r--core/src/fxcodec/lbmp/fx_bmp.cpp34
-rw-r--r--core/src/fxcodec/lcms2/lcms2-2.6/src/cmserr.c4
-rw-r--r--core/src/fxcodec/lgif/fx_gif.cpp82
-rw-r--r--core/src/fxcodec/libjpeg/jinclude.h4
-rw-r--r--core/src/fxcrt/extension.h8
-rw-r--r--core/src/fxcrt/fx_basic_array.cpp16
-rw-r--r--core/src/fxcrt/fx_basic_bstring.cpp44
-rw-r--r--core/src/fxcrt/fx_basic_buffer.cpp18
-rw-r--r--core/src/fxcrt/fx_basic_maps.cpp8
-rw-r--r--core/src/fxcrt/fx_basic_wstring.cpp34
-rw-r--r--core/src/fxcrt/fx_extension.cpp2
-rw-r--r--core/src/fxcrt/fxcrt_posix.cpp2
-rw-r--r--core/src/fxge/agg/agg23/agg_scanline_u.h2
-rw-r--r--core/src/fxge/agg/agg23/fx_agg_path_storage.cpp4
-rw-r--r--core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp2
-rw-r--r--core/src/fxge/android/fpf_skiafontmgr.cpp2
-rw-r--r--core/src/fxge/android/fpf_skiafontmgr.h4
-rw-r--r--core/src/fxge/dib/fx_dib_composite.cpp16
-rw-r--r--core/src/fxge/dib/fx_dib_convert.cpp18
-rw-r--r--core/src/fxge/dib/fx_dib_engine.cpp2
-rw-r--r--core/src/fxge/dib/fx_dib_main.cpp48
-rw-r--r--core/src/fxge/dib/fx_dib_transform.cpp2
-rw-r--r--core/src/fxge/ge/fx_ge_font.cpp2
-rw-r--r--core/src/fxge/ge/fx_ge_fontmap.cpp4
-rw-r--r--core/src/fxge/ge/fx_ge_path.cpp10
-rw-r--r--core/src/fxge/ge/fx_ge_ps.cpp6
-rw-r--r--core/src/fxge/ge/fx_ge_text.cpp8
-rw-r--r--core/src/fxge/skia/fx_skia_blitter_new.cpp20
-rw-r--r--core/src/fxge/win32/fx_win32_device.cpp8
-rw-r--r--core/src/fxge/win32/fx_win32_dib.cpp14
-rw-r--r--core/src/fxge/win32/fx_win32_gdipext.cpp6
-rw-r--r--core/src/fxge/win32/fx_win32_print.cpp2
-rw-r--r--core/src/reflow/layoutprocessor_reflow.cpp6
78 files changed, 493 insertions, 493 deletions
diff --git a/core/src/fdrm/crypto/fx_crypt.cpp b/core/src/fdrm/crypto/fx_crypt.cpp
index f6b3148dba..8413649311 100644
--- a/core/src/fdrm/crypto/fx_crypt.cpp
+++ b/core/src/fdrm/crypto/fx_crypt.cpp
@@ -207,7 +207,7 @@ void CRYPT_MD5Update(void* pctx, const uint8_t* input, FX_DWORD length )
ctx->total[0] &= 0xFFFFFFFF;
ctx->total[1] += ctx->total[0] < length << 3;
if( left && length >= fill ) {
- FXSYS_memcpy32( (void *) (ctx->buffer + left), (void *) input, fill );
+ FXSYS_memcpy( (void *) (ctx->buffer + left), (void *) input, fill );
md5_process( ctx, ctx->buffer );
length -= fill;
input += fill;
@@ -219,7 +219,7 @@ void CRYPT_MD5Update(void* pctx, const uint8_t* input, FX_DWORD length )
input += 64;
}
if( length ) {
- FXSYS_memcpy32( (void *) (ctx->buffer + left), (void *) input, length );
+ FXSYS_memcpy( (void *) (ctx->buffer + left), (void *) input, length );
}
}
const uint8_t md5_padding[64] = {
diff --git a/core/src/fdrm/crypto/fx_crypt_aes.cpp b/core/src/fdrm/crypto/fx_crypt_aes.cpp
index 4de0f7e752..107bfeace0 100644
--- a/core/src/fdrm/crypto/fx_crypt_aes.cpp
+++ b/core/src/fdrm/crypto/fx_crypt_aes.cpp
@@ -949,7 +949,7 @@ static void aes_decrypt_cbc(unsigned char *dest, const unsigned char *src, int l
unsigned int iv[4], x[4], ct[4];
int i;
ASSERT((len & 15) == 0);
- FXSYS_memcpy32(iv, ctx->iv, sizeof(iv));
+ FXSYS_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);
@@ -963,7 +963,7 @@ static void aes_decrypt_cbc(unsigned char *dest, const unsigned char *src, int l
src += 16;
len -= 16;
}
- FXSYS_memcpy32(ctx->iv, iv, sizeof(iv));
+ FXSYS_memcpy(ctx->iv, iv, sizeof(iv));
}
static void aes_encrypt(AESContext * ctx, unsigned int * block)
{
@@ -974,7 +974,7 @@ static void aes_encrypt_cbc(unsigned char *dest, const unsigned char *src, int l
unsigned int iv[4];
int i;
ASSERT((len & 15) == 0);
- FXSYS_memcpy32(iv, ctx->iv, sizeof(iv));
+ FXSYS_memcpy(iv, ctx->iv, sizeof(iv));
while (len > 0) {
for (i = 0; i < 4; i++) {
iv[i] ^= GET_32BIT_MSB_FIRST(src + 4 * i);
@@ -987,7 +987,7 @@ static void aes_encrypt_cbc(unsigned char *dest, const unsigned char *src, int l
src += 16;
len -= 16;
}
- FXSYS_memcpy32(ctx->iv, iv, sizeof(iv));
+ FXSYS_memcpy(ctx->iv, iv, sizeof(iv));
}
void CRYPT_AESSetKey(void* context, FX_DWORD blocklen, const uint8_t* key, FX_DWORD keylen, FX_BOOL bEncrypt)
{
diff --git a/core/src/fdrm/crypto/fx_crypt_sha.cpp b/core/src/fdrm/crypto/fx_crypt_sha.cpp
index 55a3f0e5bf..ac77873702 100644
--- a/core/src/fdrm/crypto/fx_crypt_sha.cpp
+++ b/core/src/fdrm/crypto/fx_crypt_sha.cpp
@@ -100,11 +100,11 @@ void CRYPT_SHA1Update(void* context, const uint8_t* data, FX_DWORD size)
s->lenlo += lenw;
s->lenhi += (s->lenlo < lenw);
if (s->blkused && s->blkused + len < 64) {
- FXSYS_memcpy32(s->block + s->blkused, q, len);
+ FXSYS_memcpy(s->block + s->blkused, q, len);
s->blkused += len;
} else {
while (s->blkused + len >= 64) {
- FXSYS_memcpy32(s->block + s->blkused, q, 64 - s->blkused);
+ FXSYS_memcpy(s->block + s->blkused, q, 64 - s->blkused);
q += 64 - s->blkused;
len -= 64 - s->blkused;
for (i = 0; i < 16; i++) {
@@ -117,7 +117,7 @@ void CRYPT_SHA1Update(void* context, const uint8_t* data, FX_DWORD size)
SHATransform(s->h, wordblock);
s->blkused = 0;
}
- FXSYS_memcpy32(s->block, q, len);
+ FXSYS_memcpy(s->block, q, len);
s->blkused = len;
}
}
@@ -135,7 +135,7 @@ void CRYPT_SHA1Finish(void* context, uint8_t digest[20])
}
lenhi = (s->lenhi << 3) | (s->lenlo >> (32 - 3));
lenlo = (s->lenlo << 3);
- FXSYS_memset32(c, 0, pad);
+ FXSYS_memset(c, 0, pad);
c[0] = 0x80;
CRYPT_SHA1Update(s, c, pad);
c[0] = (lenhi >> 24) & 0xFF;
@@ -330,7 +330,7 @@ void CRYPT_SHA256Update( void* context, const uint8_t* input, FX_DWORD length )
ctx->total[1]++;
}
if( left && length >= fill ) {
- FXSYS_memcpy32( (void *) (ctx->buffer + left),
+ FXSYS_memcpy( (void *) (ctx->buffer + left),
(void *) input, fill );
sha256_process( ctx, ctx->buffer );
length -= fill;
@@ -343,7 +343,7 @@ void CRYPT_SHA256Update( void* context, const uint8_t* input, FX_DWORD length )
input += 64;
}
if( length ) {
- FXSYS_memcpy32( (void *) (ctx->buffer + left),
+ FXSYS_memcpy( (void *) (ctx->buffer + left),
(void *) input, length );
}
}
@@ -417,7 +417,7 @@ void CRYPT_SHA384Start(void* context)
return;
}
sha384_context *ctx = (sha384_context *)context;
- FXSYS_memset32(ctx, 0, sizeof(sha384_context));
+ FXSYS_memset(ctx, 0, sizeof(sha384_context));
ctx->state[0] = FX_ato64i("cbbb9d5dc1059ed8");
ctx->state[1] = FX_ato64i("629a292a367cd507");
ctx->state[2] = FX_ato64i("9159015a3070dd17");
@@ -638,7 +638,7 @@ void CRYPT_SHA384Update(void* context, const uint8_t* input, FX_DWORD length)
ctx->total[1]++;
}
if( left && length >= fill ) {
- FXSYS_memcpy32( (void *) (ctx->buffer + left),
+ FXSYS_memcpy( (void *) (ctx->buffer + left),
(void *) input, fill );
sha384_process( ctx, ctx->buffer );
length -= fill;
@@ -651,7 +651,7 @@ void CRYPT_SHA384Update(void* context, const uint8_t* input, FX_DWORD length)
input += 128;
}
if( length ) {
- FXSYS_memcpy32( (void *) (ctx->buffer + left),
+ FXSYS_memcpy( (void *) (ctx->buffer + left),
(void *) input, length );
}
}
@@ -660,7 +660,7 @@ void CRYPT_SHA384Finish(void* context, uint8_t digest[48])
sha384_context *ctx = (sha384_context *)context;
FX_DWORD last, padn;
uint8_t msglen[16];
- FXSYS_memset32(msglen, 0, 16);
+ FXSYS_memset(msglen, 0, 16);
uint64_t high, low;
high = ( ctx->total[0] >> 29 )
| ( ctx->total[1] << 3 );
@@ -691,7 +691,7 @@ void CRYPT_SHA512Start(void* context)
return;
}
sha384_context *ctx = (sha384_context *)context;
- FXSYS_memset32(ctx, 0, sizeof(sha384_context));
+ FXSYS_memset(ctx, 0, sizeof(sha384_context));
ctx->state[0] = FX_ato64i("6a09e667f3bcc908");
ctx->state[1] = FX_ato64i("bb67ae8584caa73b");
ctx->state[2] = FX_ato64i("3c6ef372fe94f82b");
@@ -710,7 +710,7 @@ void CRYPT_SHA512Finish(void* context, uint8_t digest[64])
sha384_context *ctx = (sha384_context *)context;
FX_DWORD last, padn;
uint8_t msglen[16];
- FXSYS_memset32(msglen, 0, 16);
+ FXSYS_memset(msglen, 0, 16);
uint64_t high, low;
high = ( ctx->total[0] >> 29 )
| ( ctx->total[1] << 3 );
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
index 8cfbd1b40e..948908e5eb 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
@@ -144,7 +144,7 @@ void CPDF_PageContentGenerate::TransformContent(CFX_Matrix& matrix)
int pos = 0;
uint8_t* pBuf = FX_Alloc(uint8_t, size);
for (i = 0; i < iCount; ++i) {
- FXSYS_memcpy32(pBuf + pos, pContentArray[i]->GetData(), pContentArray[i]->GetSize());
+ FXSYS_memcpy(pBuf + pos, pContentArray[i]->GetData(), pContentArray[i]->GetSize());
pos += pContentArray[i]->GetSize() + 1;
pBuf[pos - 1] = ' ';
delete pContentArray[i];
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 0091613120..93531de1ad 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -752,7 +752,7 @@ FX_BOOL CPDF_XRefStream::GenerateXRefStream(CPDF_Creator* pCreator, FX_BOOL bEOF
return -1;
}
FX_CHAR offset_buf[20];
- FXSYS_memset32(offset_buf, 0, sizeof(offset_buf));
+ FXSYS_memset(offset_buf, 0, sizeof(offset_buf));
FXSYS_i64toa(m_PrevOffset, offset_buf, 10);
int32_t len = (int32_t)FXSYS_strlen(offset_buf);
if (pFile->AppendBlock(offset_buf, len) < 0) {
@@ -1863,7 +1863,7 @@ int32_t CPDF_Creator::WriteDoc_Stage4(IFX_Pause *pPause)
return -1;
}
FX_CHAR offset_buf[20];
- FXSYS_memset32(offset_buf, 0, sizeof(offset_buf));
+ FXSYS_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;
@@ -1952,7 +1952,7 @@ int32_t CPDF_Creator::WriteDoc_Stage4(IFX_Pause *pPause)
return -1;
}
FX_CHAR offset_buf[20];
- FXSYS_memset32(offset_buf, 0, sizeof(offset_buf));
+ FXSYS_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/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 18913a0020..e6e688fecc 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -218,7 +218,7 @@ static void _InsertWidthArray(HDC hDC, int start, int end, CPDF_Array* pWidthArr
CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTW* pLogFont, FX_BOOL bVert, FX_BOOL bTranslateName)
{
LOGFONTA lfa;
- FXSYS_memcpy32(&lfa, pLogFont, (char*)lfa.lfFaceName - (char*)&lfa);
+ FXSYS_memcpy(&lfa, pLogFont, (char*)lfa.lfFaceName - (char*)&lfa);
CFX_ByteString face = CFX_ByteString::FromUnicode(pLogFont->lfFaceName);
if (face.GetLength() >= LF_FACESIZE) {
return NULL;
@@ -608,7 +608,7 @@ CPDF_Font* CPDF_Document::AddMacFont(CTFontRef pFont, FX_BOOL bVert, FX_BOOL bTr
CFX_ByteString basefont;
FX_BOOL bCJK = FALSE;
int flags = 0, italicangle = 0, ascend = 0, descend = 0, capheight = 0, bbox[4];
- FXSYS_memset32(bbox, 0, sizeof(int) * 4);
+ FXSYS_memset(bbox, 0, sizeof(int) * 4);
CFArrayRef languages = (CFArrayRef)CTFontDescriptorCopyAttribute(descriptor, kCTFontLanguagesAttribute);
if (languages == NULL) {
CFRelease(descriptor);
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
index fd715240a4..ba0358fc74 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
@@ -221,7 +221,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress, IFX_Fi
mask_buf = FX_Alloc2D(uint8_t, maskHeight, maskWidth);
mask_size = maskHeight * maskWidth; // Safe since checked alloc returned.
for (int32_t a = 0; a < maskHeight; a ++) {
- FXSYS_memcpy32(mask_buf + a * maskWidth, pMaskBitmap->GetScanline(a), maskWidth);
+ FXSYS_memcpy(mask_buf + a * maskWidth, pMaskBitmap->GetScanline(a), maskWidth);
}
}
pMaskDict->SetAtInteger(FX_BSTRC("Length"), mask_size);
@@ -303,7 +303,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, int32_t iCompress, IFX_Fi
uint8_t* pDest = dest_buf;
for (int32_t i = 0; i < BitmapHeight; i ++) {
if (!bStream) {
- FXSYS_memcpy32(pDest, src_buf, dest_pitch);
+ FXSYS_memcpy(pDest, src_buf, dest_pitch);
pDest += dest_pitch;
} else {
pFileWrite->WriteBlock(src_buf, dest_pitch);
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
index 48a96dc554..345e29113f 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -26,8 +26,8 @@ extern const FX_WORD* PDF_UnicodesForPredefinedCharSet(int);
CPDF_FontGlobals::CPDF_FontGlobals()
: m_pContrastRamps(NULL)
{
- FXSYS_memset32(m_EmbeddedCharsets, 0, sizeof(m_EmbeddedCharsets));
- FXSYS_memset32(m_EmbeddedToUnicodes, 0, sizeof(m_EmbeddedToUnicodes));
+ FXSYS_memset(m_EmbeddedCharsets, 0, sizeof(m_EmbeddedCharsets));
+ FXSYS_memset(m_EmbeddedToUnicodes, 0, sizeof(m_EmbeddedToUnicodes));
}
CPDF_FontGlobals::~CPDF_FontGlobals()
{
@@ -41,7 +41,7 @@ class CFX_StockFontArray
public:
CFX_StockFontArray()
{
- FXSYS_memset32(m_pStockFonts, 0, sizeof(m_pStockFonts));
+ FXSYS_memset(m_pStockFonts, 0, sizeof(m_pStockFonts));
}
~CFX_StockFontArray()
{
@@ -819,10 +819,10 @@ FX_BOOL CPDF_Font::IsStandardFont() const
extern const FX_CHAR* PDF_CharNameFromPredefinedCharSet(int encoding, uint8_t charcode);
CPDF_SimpleFont::CPDF_SimpleFont(int fonttype) : CPDF_Font(fonttype)
{
- FXSYS_memset8(m_CharBBox, 0xff, sizeof m_CharBBox);
- FXSYS_memset8(m_CharWidth, 0xff, sizeof m_CharWidth);
- FXSYS_memset8(m_GlyphIndex, 0xff, sizeof m_GlyphIndex);
- FXSYS_memset8(m_ExtGID, 0xff, sizeof m_ExtGID);
+ FXSYS_memset(m_CharBBox, 0xff, sizeof m_CharBBox);
+ FXSYS_memset(m_CharWidth, 0xff, sizeof m_CharWidth);
+ FXSYS_memset(m_GlyphIndex, 0xff, sizeof m_GlyphIndex);
+ FXSYS_memset(m_ExtGID, 0xff, sizeof m_ExtGID);
m_pCharNames = NULL;
m_BaseEncoding = PDFFONT_ENCODING_BUILTIN;
}
@@ -1153,7 +1153,7 @@ void CPDF_Type1Font::LoadGlyphMap()
if (bGotOne) {
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if (!bCoreText) {
- FXSYS_memcpy32(m_ExtGID, m_GlyphIndex, 256);
+ FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256);
}
#endif
return;
@@ -1197,7 +1197,7 @@ void CPDF_Type1Font::LoadGlyphMap()
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if (!bCoreText) {
- FXSYS_memcpy32(m_ExtGID, m_GlyphIndex, 256);
+ FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256);
}
#endif
return;
@@ -1223,7 +1223,7 @@ void CPDF_Type1Font::LoadGlyphMap()
unicode = FT_UnicodeFromCharCode(PDFFONT_ENCODING_STANDARD, charcode);
}
FX_CHAR name_glyph[256];
- FXSYS_memset32(name_glyph, 0, sizeof(name_glyph));
+ FXSYS_memset(name_glyph, 0, sizeof(name_glyph));
FXFT_Get_Glyph_Name(m_Font.m_Face, m_GlyphIndex[charcode], name_glyph, 256);
name_glyph[255] = 0;
if (unicode == 0 && name_glyph[0] != 0) {
@@ -1299,7 +1299,7 @@ void CPDF_Type1Font::LoadGlyphMap()
FX_WCHAR unicode = FT_UnicodeFromCharCode(PDFFONT_ENCODING_STANDARD, charcode);
if (unicode == 0) {
FX_CHAR name_glyph[256];
- FXSYS_memset32(name_glyph, 0, sizeof(name_glyph));
+ FXSYS_memset(name_glyph, 0, sizeof(name_glyph));
FXFT_Get_Glyph_Name(m_Font.m_Face, m_GlyphIndex[charcode], name_glyph, 256);
name_glyph[255] = 0;
if (name_glyph[0] != 0) {
@@ -1312,7 +1312,7 @@ void CPDF_Type1Font::LoadGlyphMap()
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if (!bCoreText) {
- FXSYS_memcpy32(m_ExtGID, m_GlyphIndex, 256);
+ FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256);
}
#endif
return;
@@ -1339,13 +1339,13 @@ void CPDF_Type1Font::LoadGlyphMap()
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if (!bCoreText) {
- FXSYS_memcpy32(m_ExtGID, m_GlyphIndex, 256);
+ FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256);
}
#endif
}
CPDF_FontEncoding::CPDF_FontEncoding()
{
- FXSYS_memset32(m_Unicodes, 0, sizeof(m_Unicodes));
+ FXSYS_memset(m_Unicodes, 0, sizeof(m_Unicodes));
}
int CPDF_FontEncoding::CharCodeFromUnicode(FX_WCHAR unicode) const
{
@@ -1359,7 +1359,7 @@ CPDF_FontEncoding::CPDF_FontEncoding(int PredefinedEncoding)
{
const FX_WORD* pSrc = PDF_UnicodesForPredefinedCharSet(PredefinedEncoding);
if (!pSrc) {
- FXSYS_memset32(m_Unicodes, 0, sizeof(m_Unicodes));
+ FXSYS_memset(m_Unicodes, 0, sizeof(m_Unicodes));
} else
for (int i = 0; i < 256; i++) {
m_Unicodes[i] = pSrc[i];
@@ -1367,7 +1367,7 @@ CPDF_FontEncoding::CPDF_FontEncoding(int PredefinedEncoding)
}
FX_BOOL CPDF_FontEncoding::IsIdentical(CPDF_FontEncoding* pAnother) const
{
- return FXSYS_memcmp32(m_Unicodes, pAnother->m_Unicodes, sizeof(m_Unicodes)) == 0;
+ return FXSYS_memcmp(m_Unicodes, pAnother->m_Unicodes, sizeof(m_Unicodes)) == 0;
}
CPDF_Object* CPDF_FontEncoding::Realize()
{
@@ -1597,7 +1597,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap()
CPDF_Type3Font::CPDF_Type3Font() : CPDF_SimpleFont(PDFFONT_TYPE3)
{
m_pPageResources = NULL;
- FXSYS_memset32(m_CharWidthL, 0, sizeof m_CharWidthL);
+ FXSYS_memset(m_CharWidthL, 0, sizeof m_CharWidthL);
}
CPDF_Type3Font::~CPDF_Type3Font()
{
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index ed5ef5c5fe..7726981bb8 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -17,7 +17,7 @@ extern const FX_CHAR* GetAdobeCharName(int iBaseEncoding, const CFX_ByteString*
CPDF_CMapManager::CPDF_CMapManager()
{
m_bPrompted = FALSE;
- FXSYS_memset32(m_CID2UnicodeMaps, 0, sizeof m_CID2UnicodeMaps);
+ FXSYS_memset(m_CID2UnicodeMaps, 0, sizeof m_CID2UnicodeMaps);
}
CPDF_CMapManager::~CPDF_CMapManager()
{
@@ -255,7 +255,7 @@ void CPDF_CMapParser::ParseWord(const CFX_ByteStringC& word)
m_pCMap->m_CodingScheme = CPDF_CMap::MixedFourBytes;
m_pCMap->m_nCodeRanges = nSegs;
m_pCMap->m_pLeadingBytes = FX_Alloc2D(uint8_t, nSegs, sizeof(_CMap_CodeRange));
- FXSYS_memcpy32(m_pCMap->m_pLeadingBytes, m_CodeRanges.GetData(), nSegs * sizeof(_CMap_CodeRange));
+ FXSYS_memcpy(m_pCMap->m_pLeadingBytes, m_CodeRanges.GetData(), nSegs * sizeof(_CMap_CodeRange));
} else if (nSegs == 1) {
m_pCMap->m_CodingScheme = (m_CodeRanges[0].m_CharSize == 2) ? CPDF_CMap::TwoBytes : CPDF_CMap::OneByte;
}
@@ -412,7 +412,7 @@ FX_BOOL CPDF_CMap::LoadEmbedded(const uint8_t* pData, FX_DWORD size)
if (m_CodingScheme == MixedFourBytes && parser.m_AddMaps.GetSize()) {
m_pAddMapping = FX_Alloc(uint8_t, parser.m_AddMaps.GetSize() + 4);
*(FX_DWORD*)m_pAddMapping = parser.m_AddMaps.GetSize() / 8;
- FXSYS_memcpy32(m_pAddMapping + 4, parser.m_AddMaps.GetBuffer(), parser.m_AddMaps.GetSize());
+ FXSYS_memcpy(m_pAddMapping + 4, parser.m_AddMaps.GetBuffer(), parser.m_AddMaps.GetSize());
FXSYS_qsort(m_pAddMapping + 4, parser.m_AddMaps.GetSize() / 8, 8, compare_dword);
}
return TRUE;
@@ -638,7 +638,7 @@ int CPDF_CMap::AppendChar(FX_CHAR* str, FX_DWORD charcode) const
iSize = 1;
}
if (iSize > 1) {
- FXSYS_memset32(str, 0, sizeof(uint8_t) * iSize);
+ FXSYS_memset(str, 0, sizeof(uint8_t) * iSize);
}
str[iSize - 1] = (uint8_t)charcode;
return iSize;
@@ -703,7 +703,7 @@ CPDF_CIDFont::CPDF_CIDFont() : CPDF_Font(PDFFONT_CIDFONT)
m_bCIDIsGID = FALSE;
m_bAdobeCourierStd = FALSE;
m_pTTGSUBTable = NULL;
- FXSYS_memset8(m_CharBBox, 0xff, 256 * sizeof(FX_SMALL_RECT));
+ FXSYS_memset(m_CharBBox, 0xff, 256 * sizeof(FX_SMALL_RECT));
}
CPDF_CIDFont::~CPDF_CIDFont()
{
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
index b6b2f57c02..62c9fe55d2 100644
--- a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
+++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
@@ -254,7 +254,7 @@ void CFX_CTTGSUBTable::ParseLangSys(FT_Bytes raw, struct TLangSys *rec)
return;
}
rec->FeatureIndex = new TT_uint16_t[rec->FeatureCount];
- FXSYS_memset32(rec->FeatureIndex, 0, sizeof(TT_uint16_t) * rec->FeatureCount);
+ FXSYS_memset(rec->FeatureIndex, 0, sizeof(TT_uint16_t) * rec->FeatureCount);
for (int i = 0; i < rec->FeatureCount; ++i) {
rec->FeatureIndex[i] = GetUInt16(sp);
}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
index 688066e3a3..8c6de8e341 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
@@ -586,9 +586,9 @@ void CPDF_TextObject::SetData(int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pCharP
m_pCharCodes = (FX_DWORD*)(uintptr_t) * pCharCodes;
} else {
m_pCharCodes = FX_Alloc(FX_DWORD, nChars);
- FXSYS_memcpy32(m_pCharCodes, pCharCodes, sizeof(FX_DWORD)*nChars);
+ FXSYS_memcpy(m_pCharCodes, pCharCodes, sizeof(FX_DWORD)*nChars);
m_pCharPos = FX_Alloc(FX_FLOAT, nChars - 1);
- FXSYS_memcpy32(m_pCharPos, pCharPos, sizeof(FX_FLOAT) * (nChars - 1));
+ FXSYS_memcpy(m_pCharPos, pCharPos, sizeof(FX_FLOAT) * (nChars - 1));
}
RecalcPositionData();
}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
index dc3d454656..8dd1359846 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
@@ -526,7 +526,7 @@ CPDF_IccProfile::CPDF_IccProfile(const uint8_t* pData, FX_DWORD dwSize):
m_pTransform(NULL),
m_nSrcComponents(0)
{
- if (dwSize == 3144 && FXSYS_memcmp32(pData + 0x190, "sRGB IEC61966-2.1", 17) == 0) {
+ if (dwSize == 3144 && FXSYS_memcmp(pData + 0x190, "sRGB IEC61966-2.1", 17) == 0) {
m_bsRGB = TRUE;
m_nSrcComponents = 3;
}
@@ -1351,7 +1351,7 @@ void CPDF_Color::SetValue(FX_FLOAT* comps)
return;
}
if (m_pCS->GetFamily() != PDFCS_PATTERN) {
- FXSYS_memcpy32(m_pBuffer, comps, m_pCS->CountComponents() * sizeof(FX_FLOAT));
+ FXSYS_memcpy(m_pBuffer, comps, m_pCS->CountComponents() * sizeof(FX_FLOAT));
}
}
void CPDF_Color::SetValue(CPDF_Pattern* pPattern, FX_FLOAT* comps, int ncomps)
@@ -1377,7 +1377,7 @@ void CPDF_Color::SetValue(CPDF_Pattern* pPattern, FX_FLOAT* comps, int ncomps)
pvalue->m_nComps = ncomps;
pvalue->m_pPattern = pPattern;
if (ncomps) {
- FXSYS_memcpy32(pvalue->m_Comps, comps, ncomps * sizeof(FX_FLOAT));
+ FXSYS_memcpy(pvalue->m_Comps, comps, ncomps * sizeof(FX_FLOAT));
}
pvalue->m_pCountedPattern = NULL;
if (pPattern && pPattern->m_pDocument)
@@ -1403,7 +1403,7 @@ void CPDF_Color::Copy(const CPDF_Color* pSrc)
return;
}
m_pBuffer = m_pCS->CreateBuf();
- FXSYS_memcpy32(m_pBuffer, pSrc->m_pBuffer, m_pCS->GetBufSize());
+ FXSYS_memcpy(m_pBuffer, pSrc->m_pBuffer, m_pCS->GetBufSize());
if (m_pCS->GetFamily() == PDFCS_PATTERN) {
PatternValue* pvalue = (PatternValue*)m_pBuffer;
if (pvalue->m_pPattern && pvalue->m_pPattern->m_pDocument) {
@@ -1453,5 +1453,5 @@ FX_BOOL CPDF_Color::IsEqual(const CPDF_Color& other) const
if (m_pCS != other.m_pCS || m_pCS == NULL) {
return FALSE;
}
- return FXSYS_memcmp32(m_pBuffer, other.m_pBuffer, m_pCS->GetBufSize()) == 0;
+ return FXSYS_memcmp(m_pBuffer, other.m_pBuffer, m_pCS->GetBufSize()) == 0;
}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
index 2cfb02869c..f1a8433f3c 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
@@ -873,7 +873,7 @@ FX_BOOL CPDF_Function::Init(CPDF_Object* pObj)
if (m_pRanges && m_nOutputs > (int)old_outputs) {
m_pRanges = FX_Realloc(FX_FLOAT, m_pRanges, m_nOutputs * 2);
if (m_pRanges) {
- FXSYS_memset32(m_pRanges + (old_outputs * 2), 0, sizeof(FX_FLOAT) * (m_nOutputs - old_outputs) * 2);
+ FXSYS_memset(m_pRanges + (old_outputs * 2), 0, sizeof(FX_FLOAT) * (m_nOutputs - old_outputs) * 2);
}
}
return ret;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
index 8752acf536..178db75cf8 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
@@ -61,7 +61,7 @@ CPDF_ClipPathData::CPDF_ClipPathData(const CPDF_ClipPathData& src)
m_pPathList[i] = src.m_pPathList[i];
}
m_pTypeList = FX_Alloc(uint8_t, alloc_size);
- FXSYS_memcpy32(m_pTypeList, src.m_pTypeList, m_PathCount);
+ FXSYS_memcpy(m_pTypeList, src.m_pTypeList, m_PathCount);
} else {
m_pPathList = NULL;
m_pTypeList = NULL;
@@ -156,7 +156,7 @@ void CPDF_ClipPath::AppendPath(CPDF_Path path, int type, FX_BOOL bAutoMerge)
}
delete[] pData->m_pPathList;
uint8_t* pNewType = FX_Alloc(uint8_t, pData->m_PathCount + 8);
- FXSYS_memcpy32(pNewType, pData->m_pTypeList, pData->m_PathCount);
+ FXSYS_memcpy(pNewType, pData->m_pTypeList, pData->m_PathCount);
if (pData->m_pTypeList) {
FX_Free(pData->m_pTypeList);
}
@@ -178,7 +178,7 @@ void CPDF_ClipPath::DeletePath(int index)
pData->m_pPathList[i] = pData->m_pPathList[i + 1];
}
pData->m_pPathList[pData->m_PathCount - 1].SetNull();
- FXSYS_memmove32(pData->m_pTypeList + index, pData->m_pTypeList + index + 1, pData->m_PathCount - index - 1);
+ FXSYS_memmove(pData->m_pTypeList + index, pData->m_pTypeList + index + 1, pData->m_PathCount - index - 1);
pData->m_PathCount --;
}
#define FPDF_CLIPPATH_MAX_TEXTS 1024
@@ -193,7 +193,7 @@ void CPDF_ClipPath::AppendTexts(CPDF_TextObject** pTexts, int count)
}
CPDF_TextObject** pNewList = FX_Alloc(CPDF_TextObject*, pData->m_TextCount + count + 1);
if (pData->m_pTextList) {
- FXSYS_memcpy32(pNewList, pData->m_pTextList, pData->m_TextCount * sizeof(CPDF_TextObject*));
+ FXSYS_memcpy(pNewList, pData->m_pTextList, pData->m_TextCount * sizeof(CPDF_TextObject*));
FX_Free(pData->m_pTextList);
}
pData->m_pTextList = pNewList;
@@ -294,7 +294,7 @@ CPDF_TextStateData::CPDF_TextStateData(const CPDF_TextStateData& src)
if (this == &src) {
return;
}
- FXSYS_memcpy32(this, &src, sizeof(CPDF_TextStateData));
+ FXSYS_memcpy(this, &src, sizeof(CPDF_TextStateData));
if (m_pDocument && m_pFont) {
m_pFont = m_pDocument->GetPageData()->GetFont(m_pFont->GetFontDict(), FALSE);
}
@@ -348,7 +348,7 @@ FX_FLOAT CPDF_TextState::GetShearAngle() const
}
CPDF_GeneralStateData::CPDF_GeneralStateData()
{
- FXSYS_memset32(this, 0, sizeof(CPDF_GeneralStateData));
+ FXSYS_memset(this, 0, sizeof(CPDF_GeneralStateData));
FXSYS_strcpy((FX_CHAR*)m_BlendMode, "Normal");
m_StrokeAlpha = 1.0f;
m_FillAlpha = 1.0f;
@@ -357,7 +357,7 @@ CPDF_GeneralStateData::CPDF_GeneralStateData()
}
CPDF_GeneralStateData::CPDF_GeneralStateData(const CPDF_GeneralStateData& src)
{
- FXSYS_memcpy32(this, &src, sizeof(CPDF_GeneralStateData));
+ FXSYS_memcpy(this, &src, sizeof(CPDF_GeneralStateData));
if (src.m_pTransferFunc && src.m_pTransferFunc->m_pPDFDoc) {
CPDF_DocRenderData* pDocCache = src.m_pTransferFunc->m_pPDFDoc->GetRenderData();
if (!pDocCache) {
@@ -422,7 +422,7 @@ void CPDF_GeneralStateData::SetBlendMode(const CFX_ByteStringC& blend_mode)
if (blend_mode.GetLength() > 15) {
return;
}
- FXSYS_memcpy32(m_BlendMode, blend_mode.GetPtr(), blend_mode.GetLength());
+ FXSYS_memcpy(m_BlendMode, blend_mode.GetPtr(), blend_mode.GetLength());
m_BlendMode[blend_mode.GetLength()] = 0;
m_BlendType = ::GetBlendType(blend_mode);
}
@@ -553,7 +553,7 @@ void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS, CPDF_StreamContentParser
case FXBSTR_ID('S', 'M', 'a', 's'):
if (pObject && pObject->GetType() == PDFOBJ_DICTIONARY) {
pGeneralState->m_pSoftMask = pObject;
- FXSYS_memcpy32(pGeneralState->m_SMaskMatrix, &pParser->m_pCurStates->m_CTM, sizeof(CPDF_Matrix));
+ FXSYS_memcpy(pGeneralState->m_SMaskMatrix, &pParser->m_pCurStates->m_CTM, sizeof(CPDF_Matrix));
} else {
pGeneralState->m_pSoftMask = NULL;
}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index ebe75484e0..87605470b0 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -20,7 +20,7 @@ CPDF_StreamContentParser::CPDF_StreamContentParser()
m_PathCurrentX = m_PathCurrentY = 0.0f;
m_bResourceMissing = FALSE;
m_bColored = FALSE;
- FXSYS_memset32(m_Type3Data, 0, sizeof(FX_FLOAT) * 6);
+ FXSYS_memset(m_Type3Data, 0, sizeof(FX_FLOAT) * 6);
m_ParamCount = 0;
m_ParamStartPos = 0;
m_bAbort = FALSE;
@@ -122,11 +122,11 @@ void CPDF_StreamContentParser::AddNameParam(const FX_CHAR* name, int len)
} else {
m_ParamBuf1[index].m_Type = PDFOBJ_NAME;
if (FXSYS_memchr(name, '#', len) == NULL) {
- FXSYS_memcpy32(m_ParamBuf1[index].m_Name.m_Buffer, name, len);
+ FXSYS_memcpy(m_ParamBuf1[index].m_Name.m_Buffer, name, len);
m_ParamBuf1[index].m_Name.m_Len = len;
} else {
CFX_ByteString str = PDF_NameDecode(CFX_ByteStringC(name, len));
- FXSYS_memcpy32(m_ParamBuf1[index].m_Name.m_Buffer, str.c_str(), str.GetLength());
+ FXSYS_memcpy(m_ParamBuf1[index].m_Name.m_Buffer, str.c_str(), str.GetLength());
m_ParamBuf1[index].m_Name.m_Len = str.GetLength();
}
}
@@ -442,7 +442,7 @@ static CFX_ByteStringC _PDF_FindFullName(const _FX_BSTR* table, int count, const
{
int i = 0;
while (i < count) {
- if (abbr.GetLength() == table[i + 1].m_Size && FXSYS_memcmp32(abbr.GetPtr(), table[i + 1].m_Ptr, abbr.GetLength()) == 0) {
+ if (abbr.GetLength() == table[i + 1].m_Size && FXSYS_memcmp(abbr.GetPtr(), table[i + 1].m_Ptr, abbr.GetLength()) == 0) {
return CFX_ByteStringC(table[i].m_Ptr, table[i].m_Size);
}
i += 2;
@@ -500,7 +500,7 @@ static CFX_ByteStringC _PDF_FindAbbrName(const _FX_BSTR* table, int count, const
{
int i = 0;
while (i < count) {
- if (fullName.GetLength() == table[i].m_Size && FXSYS_memcmp32(fullName.GetPtr(), table[i].m_Ptr, fullName.GetLength()) == 0) {
+ if (fullName.GetLength() == table[i].m_Size && FXSYS_memcmp(fullName.GetPtr(), table[i].m_Ptr, fullName.GetLength()) == 0) {
return CFX_ByteStringC(table[i + 1].m_Ptr, table[i + 1].m_Size);
}
i += 2;
@@ -1495,7 +1495,7 @@ void CPDF_StreamContentParser::AddPathPoint(FX_FLOAT x, FX_FLOAT y, int flag)
int newsize = m_PathPointCount + 256;
FX_PATHPOINT* pNewPoints = FX_Alloc(FX_PATHPOINT, newsize);
if (m_PathAllocSize) {
- FXSYS_memcpy32(pNewPoints, m_pPathPoints, m_PathAllocSize * sizeof(FX_PATHPOINT));
+ FXSYS_memcpy(pNewPoints, m_pPathPoints, m_PathAllocSize * sizeof(FX_PATHPOINT));
FX_Free(m_pPathPoints);
}
m_pPathPoints = pNewPoints;
@@ -1524,7 +1524,7 @@ void CPDF_StreamContentParser::AddPathObject(int FillType, FX_BOOL bStroke)
CPDF_Path Path;
CFX_PathData* pPathData = Path.New();
pPathData->SetPointCount(PathPointCount);
- FXSYS_memcpy32(pPathData->GetPoints(), m_pPathPoints, sizeof(FX_PATHPOINT) * PathPointCount);
+ FXSYS_memcpy(pPathData->GetPoints(), m_pPathPoints, sizeof(FX_PATHPOINT) * PathPointCount);
CFX_AffineMatrix matrix = m_pCurStates->m_CTM;
matrix.Concat(m_mtContentToUser);
if (bStroke || FillType) {
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
index ec2b69f70b..d829acb004 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
@@ -269,7 +269,7 @@ FX_DWORD _DecodeAllScanlines(ICodec_ScanlineDecoder* pDecoder, uint8_t*& dest_bu
if (pLine == NULL) {
break;
}
- FXSYS_memcpy32(dest_buf + row * pitch, pLine, pitch);
+ FXSYS_memcpy(dest_buf + row * pitch, pLine, pitch);
}
FX_DWORD srcoff = pDecoder->GetSrcOffset();
delete pDecoder;
@@ -374,7 +374,7 @@ CPDF_Stream* CPDF_StreamParser::ReadInlineStream(CPDF_Document* pDoc, CPDF_Dicti
OrigSize = m_Size - m_Pos;
}
pData = FX_Alloc(uint8_t, OrigSize);
- FXSYS_memcpy32(pData, m_pBuf + m_Pos, OrigSize);
+ FXSYS_memcpy(pData, m_pBuf + m_Pos, OrigSize);
dwStreamSize = OrigSize;
m_Pos += OrigSize;
} else {
@@ -422,7 +422,7 @@ CPDF_Stream* CPDF_StreamParser::ReadInlineStream(CPDF_Document* pDoc, CPDF_Dicti
}
m_Pos = dwSavePos;
pData = FX_Alloc(uint8_t, dwStreamSize);
- FXSYS_memcpy32(pData, m_pBuf + m_Pos, dwStreamSize);
+ FXSYS_memcpy(pData, m_pBuf + m_Pos, dwStreamSize);
m_Pos += dwStreamSize;
}
}
@@ -1052,7 +1052,7 @@ void CPDF_ContentParser::Continue(IFX_Pause* pPause)
m_pData = FX_Alloc(uint8_t, m_Size);
FX_DWORD pos = 0;
for (i = 0; i < m_nStreams; i ++) {
- FXSYS_memcpy32(m_pData + pos, m_pStreamArray[i]->GetData(), m_pStreamArray[i]->GetSize());
+ FXSYS_memcpy(m_pData + pos, m_pStreamArray[i]->GetData(), m_pStreamArray[i]->GetSize());
pos += m_pStreamArray[i]->GetSize() + 1;
m_pData[pos - 1] = ' ';
delete m_pStreamArray[i];
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
index d23d75a25d..2aa66d725a 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
@@ -217,7 +217,7 @@ void CPDF_MeshStream::GetColor(FX_FLOAT& r, FX_FLOAT& g, FX_FLOAT& b)
static const int kMaxResults = 8;
FX_FLOAT result[kMaxResults];
int nResults;
- FXSYS_memset32(result, 0, sizeof(result));
+ FXSYS_memset(result, 0, sizeof(result));
for (FX_DWORD i = 0; i < m_nFuncs; i ++) {
if (m_pFuncs[i] && m_pFuncs[i]->CountOutputs() <= kMaxResults) {
m_pFuncs[i]->Call(color_value, 1, result, nResults);
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
index bb490636a9..9736c3dc8e 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
@@ -49,7 +49,7 @@ FX_DWORD _A85Decode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& dest_bu
continue;
}
if (ch == 'z') {
- FXSYS_memset32(dest_buf + dest_size, 0, 4);
+ FXSYS_memset(dest_buf + dest_size, 0, 4);
state = 0;
res = 0;
dest_size += 4;
@@ -159,9 +159,9 @@ FX_DWORD RunLengthDecode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& de
if (buf_left < copy_len) {
FX_DWORD delta = copy_len - buf_left;
copy_len = buf_left;
- FXSYS_memset8(dest_buf + dest_count + copy_len, '\0', delta);
+ FXSYS_memset(dest_buf + dest_count + copy_len, '\0', delta);
}
- FXSYS_memcpy32(dest_buf + dest_count, src_buf + i + 1, copy_len);
+ FXSYS_memcpy(dest_buf + dest_count, src_buf + i + 1, copy_len);
dest_count += src_buf[i] + 1;
i += src_buf[i] + 2;
} else if (src_buf[i] > 128) {
@@ -169,7 +169,7 @@ FX_DWORD RunLengthDecode(const uint8_t* src_buf, FX_DWORD src_size, uint8_t*& de
if (i < src_size - 1) {
fill = src_buf[i + 1];
}
- FXSYS_memset8(dest_buf + dest_count, fill, 257 - src_buf[i]);
+ FXSYS_memset(dest_buf + dest_count, fill, 257 - src_buf[i]);
dest_count += 257 - src_buf[i];
i += 2;
} else {
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
index b4366ba277..43a5c5f170 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
@@ -47,8 +47,8 @@ void CalcEncryptKey(CPDF_Dictionary* pEncrypt, const uint8_t* password, FX_DWORD
CRYPT_MD5Generate(digest, copy_len, digest);
}
}
- FXSYS_memset32(key, 0, keylen);
- FXSYS_memcpy32(key, digest, copy_len);
+ FXSYS_memset(key, 0, keylen);
+ FXSYS_memcpy(key, digest, copy_len);
}
CPDF_CryptoHandler* CPDF_StandardSecurityHandler::CreateCryptoHandler()
{
@@ -285,7 +285,7 @@ void Revision6_Hash(const uint8_t* password, FX_DWORD size, const uint8_t* salt,
}
FX_Free(aes);
if (hash) {
- FXSYS_memcpy32(hash, input, 32);
+ FXSYS_memcpy(hash, input, 32);
}
}
FX_BOOL CPDF_StandardSecurityHandler::AES256_CheckPassword(const uint8_t* password, FX_DWORD size,
@@ -313,7 +313,7 @@ FX_BOOL CPDF_StandardSecurityHandler::AES256_CheckPassword(const uint8_t* passwo
}
CRYPT_SHA256Finish(sha, digest);
}
- if (FXSYS_memcmp32(digest, pkey, 32) != 0) {
+ if (FXSYS_memcmp(digest, pkey, 32) != 0) {
return FALSE;
}
if (key == NULL) {
@@ -337,7 +337,7 @@ FX_BOOL CPDF_StandardSecurityHandler::AES256_CheckPassword(const uint8_t* passwo
uint8_t* aes = FX_Alloc(uint8_t, 2048);
CRYPT_AESSetKey(aes, 16, digest, 32, FALSE);
uint8_t iv[16];
- FXSYS_memset32(iv, 0, 16);
+ FXSYS_memset(iv, 0, 16);
CRYPT_AESSetIV(aes, iv);
CRYPT_AESDecrypt(aes, key, ekey, 32);
CRYPT_AESSetKey(aes, 16, key, 32, FALSE);
@@ -347,12 +347,12 @@ FX_BOOL CPDF_StandardSecurityHandler::AES256_CheckPassword(const uint8_t* passwo
return FALSE;
}
uint8_t perms_buf[16];
- FXSYS_memset32(perms_buf, 0, sizeof(perms_buf));
+ FXSYS_memset(perms_buf, 0, sizeof(perms_buf));
FX_DWORD copy_len = sizeof(perms_buf);
if (copy_len > (FX_DWORD)perms.GetLength()) {
copy_len = perms.GetLength();
}
- FXSYS_memcpy32(perms_buf, (const uint8_t*)perms, copy_len);
+ FXSYS_memcpy(perms_buf, (const uint8_t*)perms, copy_len);
uint8_t buf[16];
CRYPT_AESDecrypt(aes, buf, perms_buf, 16);
FX_Free(aes);
@@ -396,7 +396,7 @@ FX_BOOL CPDF_StandardSecurityHandler::CheckUserPassword(const uint8_t* password,
}
uint8_t ukeybuf[32];
if (m_Revision == 2) {
- FXSYS_memcpy32(ukeybuf, defpasscode, 32);
+ FXSYS_memcpy(ukeybuf, defpasscode, 32);
CRYPT_ArcFourCryptBlock(ukeybuf, 32, key, key_len);
} else {
uint8_t test[32], tmpkey[32];
@@ -404,9 +404,9 @@ FX_BOOL CPDF_StandardSecurityHandler::CheckUserPassword(const uint8_t* password,
if (copy_len > (FX_DWORD)ukey.GetLength()) {
copy_len = ukey.GetLength();
}
- FXSYS_memset32(test, 0, sizeof(test));
- FXSYS_memset32(tmpkey, 0, sizeof(tmpkey));
- FXSYS_memcpy32(test, ukey.c_str(), copy_len);
+ FXSYS_memset(test, 0, sizeof(test));
+ FXSYS_memset(tmpkey, 0, sizeof(tmpkey));
+ FXSYS_memcpy(test, ukey.c_str(), copy_len);
for (int i = 19; i >= 0; i --) {
for (int j = 0; j < key_len; j ++) {
tmpkey[j] = key[j] ^ i;
@@ -422,9 +422,9 @@ FX_BOOL CPDF_StandardSecurityHandler::CheckUserPassword(const uint8_t* password,
CRYPT_MD5Update(md5, (uint8_t*)id.c_str(), id.GetLength());
}
CRYPT_MD5Finish(md5, ukeybuf);
- return FXSYS_memcmp32(test, ukeybuf, 16) == 0;
+ return FXSYS_memcmp(test, ukeybuf, 16) == 0;
}
- if (FXSYS_memcmp32((void*)ukey.c_str(), ukeybuf, 16) == 0) {
+ if (FXSYS_memcmp((void*)ukey.c_str(), ukeybuf, 16) == 0) {
return TRUE;
}
return FALSE;
@@ -449,25 +449,25 @@ CFX_ByteString CPDF_StandardSecurityHandler::GetUserPassword(const uint8_t* owne
}
}
uint8_t enckey[32];
- FXSYS_memset32(enckey, 0, sizeof(enckey));
+ FXSYS_memset(enckey, 0, sizeof(enckey));
FX_DWORD copy_len = key_len;
if (copy_len > sizeof(digest)) {
copy_len = sizeof(digest);
}
- FXSYS_memcpy32(enckey, digest, copy_len);
+ FXSYS_memcpy(enckey, digest, copy_len);
int okeylen = okey.GetLength();
if (okeylen > 32) {
okeylen = 32;
}
uint8_t okeybuf[64];
- FXSYS_memset32(okeybuf, 0, sizeof(okeybuf));
- FXSYS_memcpy32(okeybuf, okey.c_str(), okeylen);
+ FXSYS_memset(okeybuf, 0, sizeof(okeybuf));
+ FXSYS_memcpy(okeybuf, okey.c_str(), okeylen);
if (m_Revision == 2) {
CRYPT_ArcFourCryptBlock(okeybuf, okeylen, enckey, key_len);
} else {
for (int i = 19; i >= 0; i --) {
uint8_t tempkey[32];
- FXSYS_memset32(tempkey, 0, sizeof(tempkey));
+ FXSYS_memset(tempkey, 0, sizeof(tempkey));
for (int j = 0; j < m_KeyLen; j ++) {
tempkey[j] = enckey[j] ^ i;
}
@@ -538,7 +538,7 @@ void CPDF_StandardSecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_
}
}
uint8_t enckey[32];
- FXSYS_memcpy32(enckey, digest, key_len);
+ FXSYS_memcpy(enckey, digest, key_len);
for (i = 0; i < 32; i ++) {
passcode[i] = i < user_size ? user_pass[i] : defpasscode[i - user_size];
}
@@ -557,7 +557,7 @@ void CPDF_StandardSecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict, CPDF_
CalcEncryptKey(m_pEncryptDict, (uint8_t*)user_pass, user_size, m_EncryptKey, key_len, FALSE, pIdArray);
if (m_Revision < 3) {
uint8_t tempbuf[32];
- FXSYS_memcpy32(tempbuf, defpasscode, 32);
+ FXSYS_memcpy(tempbuf, defpasscode, 32);
CRYPT_ArcFourCryptBlock(tempbuf, 32, m_EncryptKey, key_len);
pEncryptDict->SetAtString(FX_BSTRC("U"), CFX_ByteString(tempbuf, 32));
} else {
@@ -613,7 +613,7 @@ void CPDF_StandardSecurityHandler::AES256_SetPassword(CPDF_Dictionary* pEncryptD
}
CRYPT_SHA256Finish(sha, digest1);
}
- FXSYS_memcpy32(digest1 + 32, digest, 16);
+ FXSYS_memcpy(digest1 + 32, digest, 16);
pEncryptDict->SetAtString(bOwner ? FX_BSTRC("O") : FX_BSTRC("U"), CFX_ByteString(digest1, 48));
if (m_Revision >= 6) {
Revision6_Hash(password, size, digest + 8, (bOwner ? (const uint8_t*)ukey : NULL), digest1);
@@ -629,7 +629,7 @@ void CPDF_StandardSecurityHandler::AES256_SetPassword(CPDF_Dictionary* pEncryptD
uint8_t* aes = FX_Alloc(uint8_t, 2048);
CRYPT_AESSetKey(aes, 16, digest1, 32, TRUE);
uint8_t iv[16];
- FXSYS_memset32(iv, 0, 16);
+ FXSYS_memset(iv, 0, 16);
CRYPT_AESSetIV(aes, iv);
CRYPT_AESEncrypt(aes, digest1, key, 32);
FX_Free(aes);
@@ -654,7 +654,7 @@ void CPDF_StandardSecurityHandler::AES256_SetPerms(CPDF_Dictionary* pEncryptDict
uint8_t* aes = FX_Alloc(uint8_t, 2048);
CRYPT_AESSetKey(aes, 16, key, 32, TRUE);
uint8_t iv[16], buf1[16];
- FXSYS_memset32(iv, 0, 16);
+ FXSYS_memset(iv, 0, 16);
CRYPT_AESSetIV(aes, iv);
CRYPT_AESEncrypt(aes, buf1, buf, 16);
FX_Free(aes);
@@ -664,23 +664,23 @@ void CPDF_StandardCryptoHandler::CryptBlock(FX_BOOL bEncrypt, FX_DWORD objnum, F
uint8_t* dest_buf, FX_DWORD& dest_size)
{
if (m_Cipher == FXCIPHER_NONE) {
- FXSYS_memcpy32(dest_buf, src_buf, src_size);
+ FXSYS_memcpy(dest_buf, src_buf, src_size);
return;
}
uint8_t realkey[16];
int realkeylen = 16;
if (m_Cipher != FXCIPHER_AES || m_KeyLen != 32) {
uint8_t key1[32];
- FXSYS_memcpy32(key1, m_EncryptKey, m_KeyLen);
+ FXSYS_memcpy(key1, m_EncryptKey, m_KeyLen);
key1[m_KeyLen + 0] = (uint8_t)objnum;
key1[m_KeyLen + 1] = (uint8_t)(objnum >> 8);
key1[m_KeyLen + 2] = (uint8_t)(objnum >> 16);
key1[m_KeyLen + 3] = (uint8_t)gennum;
key1[m_KeyLen + 4] = (uint8_t)(gennum >> 8);
- FXSYS_memcpy32(key1 + m_KeyLen, &objnum, 3);
- FXSYS_memcpy32(key1 + m_KeyLen + 3, &gennum, 2);
+ FXSYS_memcpy(key1 + m_KeyLen, &objnum, 3);
+ FXSYS_memcpy(key1 + m_KeyLen + 3, &gennum, 2);
if (m_Cipher == FXCIPHER_AES) {
- FXSYS_memcpy32(key1 + m_KeyLen + 5, "sAlT", 4);
+ FXSYS_memcpy(key1 + m_KeyLen + 5, "sAlT", 4);
}
CRYPT_MD5Generate(key1, m_Cipher == FXCIPHER_AES ? m_KeyLen + 9 : m_KeyLen + 5, realkey);
realkeylen = m_KeyLen + 5;
@@ -696,12 +696,12 @@ void CPDF_StandardCryptoHandler::CryptBlock(FX_BOOL bEncrypt, FX_DWORD objnum, F
iv[i] = (uint8_t)rand();
}
CRYPT_AESSetIV(m_pAESContext, iv);
- FXSYS_memcpy32(dest_buf, iv, 16);
+ FXSYS_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_memcpy32(padding, src_buf + nblocks * 16, src_size % 16);
- FXSYS_memset8(padding + src_size % 16, 16 - src_size % 16, 16 - src_size % 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);
CRYPT_AESEncrypt(m_pAESContext, dest_buf + nblocks * 16 + 16, padding, 16);
dest_size = 32 + nblocks * 16;
} else {
@@ -713,7 +713,7 @@ void CPDF_StandardCryptoHandler::CryptBlock(FX_BOOL bEncrypt, FX_DWORD objnum, F
} else {
ASSERT(dest_size == src_size);
if (dest_buf != src_buf) {
- FXSYS_memcpy32(dest_buf, src_buf, src_size);
+ FXSYS_memcpy(dest_buf, src_buf, src_size);
}
CRYPT_ArcFourCryptBlock(dest_buf, dest_size, realkey, realkeylen);
}
@@ -743,11 +743,11 @@ void* CPDF_StandardCryptoHandler::CryptStart(FX_DWORD objnum, FX_DWORD gennum, F
return pContext;
}
uint8_t key1[48];
- FXSYS_memcpy32(key1, m_EncryptKey, m_KeyLen);
- FXSYS_memcpy32(key1 + m_KeyLen, &objnum, 3);
- FXSYS_memcpy32(key1 + m_KeyLen + 3, &gennum, 2);
+ FXSYS_memcpy(key1, m_EncryptKey, m_KeyLen);
+ FXSYS_memcpy(key1 + m_KeyLen, &objnum, 3);
+ FXSYS_memcpy(key1 + m_KeyLen + 3, &gennum, 2);
if (m_Cipher == FXCIPHER_AES) {
- FXSYS_memcpy32(key1 + m_KeyLen + 5, "sAlT", 4);
+ FXSYS_memcpy(key1 + m_KeyLen + 5, "sAlT", 4);
}
uint8_t realkey[16];
CRYPT_MD5Generate(key1, m_Cipher == FXCIPHER_AES ? m_KeyLen + 9 : m_KeyLen + 5, realkey);
@@ -799,7 +799,7 @@ FX_BOOL CPDF_StandardCryptoHandler::CryptStream(void* context, const uint8_t* sr
if (copy_size > src_left) {
copy_size = src_left;
}
- FXSYS_memcpy32(pContext->m_Block + pContext->m_BlockOffset, src_buf + src_off, copy_size);
+ FXSYS_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;
@@ -845,7 +845,7 @@ FX_BOOL CPDF_StandardCryptoHandler::CryptFinish(void* context, CFX_BinaryBuf& de
dest_buf.AppendBlock(block_buf, 16);
pContext->m_BlockOffset = 0;
}
- FXSYS_memset8(pContext->m_Block + pContext->m_BlockOffset, (uint8_t)(16 - pContext->m_BlockOffset), 16 - pContext->m_BlockOffset);
+ FXSYS_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) {
@@ -876,7 +876,7 @@ FX_BOOL CPDF_StandardCryptoHandler::Init(CPDF_Dictionary* pEncryptDict, CPDF_Sec
return FALSE;
}
if (m_Cipher != FXCIPHER_NONE) {
- FXSYS_memcpy32(m_EncryptKey, key, m_KeyLen);
+ FXSYS_memcpy(m_EncryptKey, key, m_KeyLen);
}
if (m_Cipher == FXCIPHER_AES) {
m_pAESContext = FX_Alloc(uint8_t, 2048);
@@ -909,7 +909,7 @@ FX_BOOL CPDF_StandardCryptoHandler::Init(int cipher, const uint8_t* key, int key
}
m_Cipher = cipher;
m_KeyLen = keylen;
- FXSYS_memcpy32(m_EncryptKey, key, keylen);
+ FXSYS_memcpy(m_EncryptKey, key, keylen);
if (m_Cipher == FXCIPHER_AES) {
m_pAESContext = FX_Alloc(uint8_t, 2048);
}
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
index f0cabe5412..c00b193413 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
@@ -255,7 +255,7 @@ FX_DWORD CPDF_StreamFilter::ReadLeftOver(uint8_t* buffer, FX_DWORD buf_size)
if (read_size > buf_size) {
read_size = buf_size;
}
- FXSYS_memcpy32(buffer, m_pBuffer->GetBuffer() + m_BufOffset, read_size);
+ FXSYS_memcpy(buffer, m_pBuffer->GetBuffer() + m_BufOffset, read_size);
m_BufOffset += read_size;
if (m_BufOffset == (FX_DWORD)m_pBuffer->GetSize()) {
delete m_pBuffer;
@@ -548,7 +548,7 @@ void CPDF_PredictorFilter::v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size,
if (read_size > src_size) {
read_size = src_size;
}
- FXSYS_memcpy32(m_pCurLine + m_LineInSize, src_buf, read_size);
+ FXSYS_memcpy(m_pCurLine + m_LineInSize, src_buf, read_size);
m_LineInSize += read_size;
if (m_LineInSize < m_Pitch) {
break;
@@ -696,7 +696,7 @@ void CPDF_RunLenFilter::v_FilterIn(const uint8_t* src_buf, FX_DWORD src_size, CF
break;
case 2: {
dest_buf.AppendBlock(NULL, m_Count);
- FXSYS_memset8(dest_buf.GetBuffer() + dest_buf.GetSize() - m_Count, byte, m_Count);
+ FXSYS_memset(dest_buf.GetBuffer() + dest_buf.GetSize() - m_Count, byte, m_Count);
m_State = 0;
break;
}
@@ -805,8 +805,8 @@ FX_BOOL CPDF_FaxFilter::Initialize(int Encoding, int bEndOfLine, int bByteAlign,
m_Pitch = (m_nColumns + 7) / 8;
m_pScanlineBuf = FX_Alloc(uint8_t, m_Pitch);
m_pRefBuf = FX_Alloc(uint8_t, m_Pitch);
- FXSYS_memset8(m_pScanlineBuf, 0xff, m_Pitch);
- FXSYS_memset8(m_pRefBuf, 0xff, m_Pitch);
+ FXSYS_memset(m_pScanlineBuf, 0xff, m_Pitch);
+ FXSYS_memset(m_pRefBuf, 0xff, m_Pitch);
m_iRow = 0;
m_InputBitPos = 0;
return TRUE;
@@ -851,13 +851,13 @@ void CPDF_FaxFilter::ProcessData(const uint8_t* src_buf, FX_DWORD src_size, int&
return;
}
int start_bitpos = bitpos;
- FXSYS_memset8(m_pScanlineBuf, 0xff, m_Pitch);
+ FXSYS_memset(m_pScanlineBuf, 0xff, m_Pitch);
if (!ReadLine(src_buf, bitsize, bitpos)) {
bitpos = start_bitpos;
return;
}
if (m_Encoding) {
- FXSYS_memcpy32(m_pRefBuf, m_pScanlineBuf, m_Pitch);
+ FXSYS_memcpy(m_pRefBuf, m_pScanlineBuf, m_Pitch);
}
if (m_bBlack) {
for (int i = 0; i < m_Pitch; i ++) {
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
index 8533859bef..cc2cc6f4ad 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
@@ -122,7 +122,7 @@ int CPDF_Object::GetInteger() const
case PDFOBJ_REFERENCE: {
CPDF_Reference* pRef = (CPDF_Reference*)(void*)this;
PARSE_CONTEXT context;
- FXSYS_memset32(&context, 0, sizeof(PARSE_CONTEXT));
+ FXSYS_memset(&context, 0, sizeof(PARSE_CONTEXT));
if (pRef->m_pObjList == NULL) {
return 0;
}
@@ -898,7 +898,7 @@ void CPDF_Stream::InitStream(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDi
m_GenNum = (FX_DWORD) - 1;
m_pDataBuf = FX_Alloc(uint8_t, size);
if (pData) {
- FXSYS_memcpy32(m_pDataBuf, pData, size);
+ FXSYS_memcpy(m_pDataBuf, pData, size);
}
m_dwSize = size;
if (m_pDict) {
@@ -920,7 +920,7 @@ void CPDF_Stream::SetData(const uint8_t* pData, FX_DWORD size, FX_BOOL bCompress
} else {
m_pDataBuf = FX_Alloc(uint8_t, size);
if (pData) {
- FXSYS_memcpy32(m_pDataBuf, pData, size);
+ FXSYS_memcpy(m_pDataBuf, pData, size);
}
}
m_dwSize = size;
@@ -939,7 +939,7 @@ FX_BOOL CPDF_Stream::ReadRawData(FX_FILESIZE offset, uint8_t* buf, FX_DWORD size
return m_pFile->ReadBlock(buf, m_FileOffset + offset, size);
}
if (m_pDataBuf) {
- FXSYS_memcpy32(buf, m_pDataBuf + offset, size);
+ FXSYS_memcpy(buf, m_pDataBuf + offset, size);
}
return TRUE;
}
@@ -982,7 +982,7 @@ FX_BOOL CPDF_Stream::Identical(CPDF_Stream* pOther) const
FX_DWORD actualSize = size > 1024 ? 1024 : size;
m_pFile->ReadBlock(srcBuf, srcOffset, actualSize);
pOther->m_pFile->ReadBlock(destBuf, destOffset, actualSize);
- if (FXSYS_memcmp32(srcBuf, destBuf, actualSize) != 0) {
+ if (FXSYS_memcmp(srcBuf, destBuf, actualSize) != 0) {
return FALSE;
}
size -= actualSize;
@@ -1011,9 +1011,9 @@ FX_BOOL CPDF_Stream::Identical(CPDF_Stream* pOther) const
uint8_t srcBuf[1024];
FX_DWORD size = m_dwSize;
while (size > 0) {
- FX_DWORD actualSize = size > 1024 ? 1024 : size;
- m_pFile->ReadBlock(srcBuf, offset, actualSize);
- if (FXSYS_memcmp32(srcBuf, pBuf, actualSize) != 0) {
+ FX_DWORD actualSize = std::min(size, 1024U);
+ pFile->ReadBlock(srcBuf, offset, actualSize);
+ if (FXSYS_memcmp(srcBuf, pBuf, actualSize) != 0) {
return FALSE;
}
pBuf += actualSize;
@@ -1022,7 +1022,7 @@ FX_BOOL CPDF_Stream::Identical(CPDF_Stream* pOther) const
}
return TRUE;
}
- return FXSYS_memcmp32(m_pDataBuf, pOther->m_pDataBuf, m_dwSize) == 0;
+ return FXSYS_memcmp(m_pDataBuf, pOther->m_pDataBuf, m_dwSize) == 0;
}
CPDF_Stream* CPDF_Stream::Clone(FX_BOOL bDirect, FPDF_LPFCloneStreamCallback lpfCallback, void* pUserData) const
{
@@ -1166,7 +1166,7 @@ uint8_t* CPDF_StreamAcc::DetachData()
return p;
}
uint8_t* p = FX_Alloc(uint8_t, m_dwSize);
- FXSYS_memcpy32(p, m_pData, m_dwSize);
+ FXSYS_memcpy(p, m_pData, m_dwSize);
return p;
}
void CPDF_Reference::SetRef(CPDF_IndirectObjects* pDoc, FX_DWORD objnum)
@@ -1235,7 +1235,7 @@ int CPDF_IndirectObjects::GetIndirectType(FX_DWORD objnum)
}
if (m_pParser) {
PARSE_CONTEXT context;
- FXSYS_memset32(&context, 0, sizeof(PARSE_CONTEXT));
+ FXSYS_memset(&context, 0, sizeof(PARSE_CONTEXT));
context.m_Flags = PDFPARSE_TYPEONLY;
return (int)(uintptr_t)m_pParser->ParseIndirectObject(this, objnum, &context);
}
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index f4fa8ff499..401fc0d5f4 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -1028,7 +1028,7 @@ FX_BOOL CPDF_Parser::LoadCrossRefV5(FX_FILESIZE pos, FX_FILESIZE& prev, FX_BOOL
m_pTrailer = (CPDF_Dictionary*)pStream->GetDict()->Clone();
m_CrossRef.SetSize(size);
if (m_V5Type.SetSize(size)) {
- FXSYS_memset32(m_V5Type.GetData(), 0, size);
+ FXSYS_memset(m_V5Type.GetData(), 0, size);
}
} else {
m_Trailers.Add((CPDF_Dictionary*)pStream->GetDict()->Clone());
@@ -1302,7 +1302,7 @@ void CPDF_Parser::GetIndirectBinary(FX_DWORD objnum, uint8_t*& pBuffer, FX_DWORD
size = nextoff - thisoff;
}
pBuffer = FX_Alloc(uint8_t, size);
- FXSYS_memcpy32(pBuffer, pData + thisoff + offset, size);
+ FXSYS_memcpy(pBuffer, pData + thisoff + offset, size);
return;
}
n --;
@@ -2449,7 +2449,7 @@ CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict, PARSE_CONTEXT
m_Pos = pos.ValueOrDie();
}
GetNextWord();
- if (m_WordSize < 9 || FXSYS_memcmp32(m_WordBuffer, "endstream", 9)) {
+ if (m_WordSize < 9 || FXSYS_memcmp(m_WordBuffer, "endstream", 9)) {
m_Pos = StreamStartPos;
FX_FILESIZE offset = FindTag(FX_BSTRC("endstream"), 0);
if (offset >= 0) {
@@ -2500,7 +2500,7 @@ CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict, PARSE_CONTEXT
}
StreamStartPos = m_Pos;
GetNextWord();
- if (m_WordSize == 6 && 0 == FXSYS_memcmp32(m_WordBuffer, "endobj", 6)) {
+ if (m_WordSize == 6 && 0 == FXSYS_memcmp(m_WordBuffer, "endobj", 6)) {
m_Pos = StreamStartPos;
}
return pStream;
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
index 61134f5df4..0bb0b51907 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
@@ -198,7 +198,7 @@ FX_BOOL CPDF_SimpleParser::SearchToken(const CFX_ByteStringC& token)
{
int token_len = token.GetLength();
while (m_dwCurPos < m_dwSize - token_len) {
- if (FXSYS_memcmp32(m_pData + m_dwCurPos, token.GetPtr(), token_len) == 0) {
+ if (FXSYS_memcmp(m_pData + m_dwCurPos, token.GetPtr(), token_len) == 0) {
break;
}
m_dwCurPos ++;
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
index a98c57d86c..10d125a87b 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -843,7 +843,7 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj,
m_bStopped = bitmap_render.m_bStopped;
if (pSMaskDict) {
CFX_AffineMatrix smask_matrix;
- FXSYS_memcpy32(&smask_matrix, pGeneralState->m_SMaskMatrix, sizeof smask_matrix);
+ FXSYS_memcpy(&smask_matrix, pGeneralState->m_SMaskMatrix, sizeof smask_matrix);
smask_matrix.Concat(*pObj2Device);
CFX_DIBSource* pSMaskSource = LoadSMask(pSMaskDict, &rect, &smask_matrix);
if (pSMaskSource) {
@@ -1217,7 +1217,7 @@ CPDF_TransferFunc* CPDF_DocRenderData::GetTransferFunc(CPDF_Object* pObj)
m_TransferFuncMap.SetAt(pObj, pTransferCounter);
static const int kMaxOutputs = 16;
FX_FLOAT output[kMaxOutputs];
- FXSYS_memset32(output, 0, sizeof(output));
+ FXSYS_memset(output, 0, sizeof(output));
FX_FLOAT input;
int noutput;
for (int v = 0; v < 256; v ++) {
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
index 669ba4da49..1aa1df15d2 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
@@ -1020,7 +1020,7 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
if (!num_floats.IsValid()) {
return NULL;
}
- FXSYS_memset32(pFloats, 0, num_floats.ValueOrDie());
+ FXSYS_memset(pFloats, 0, num_floats.ValueOrDie());
int count = pBC->GetCount() > 8 ? 8 : pBC->GetCount();
for (int i = 0; i < count; i ++) {
pFloats[i] = pBC->GetNumber(i);
@@ -1083,7 +1083,7 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
dest_buf[i] = pTransfer[src_buf[i]];
}
} else {
- FXSYS_memcpy32(dest_buf, src_buf, dest_pitch * height);
+ FXSYS_memcpy(dest_buf, src_buf, dest_pitch * height);
}
if (pFunc) {
delete pFunc;
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 5851aabbe0..bbb21e2a64 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -1102,7 +1102,7 @@ const uint8_t* CPDF_DIBSource::GetScanline(int line) const
}
if (pSrcLine == NULL) {
uint8_t* pLineBuf = m_pMaskedLine ? m_pMaskedLine : m_pLineBuf;
- FXSYS_memset8(pLineBuf, 0xff, m_Pitch);
+ FXSYS_memset(pLineBuf, 0xff, m_Pitch);
return pLineBuf;
}
if (m_bpc * m_nComponents == 1) {
@@ -1133,13 +1133,13 @@ const uint8_t* CPDF_DIBSource::GetScanline(int line) const
}
return m_pMaskedLine;
} else {
- FXSYS_memcpy32(m_pLineBuf, pSrcLine, src_pitch_value);
+ FXSYS_memcpy(m_pLineBuf, pSrcLine, src_pitch_value);
}
return m_pLineBuf;
}
if (m_bpc * m_nComponents <= 8) {
if (m_bpc == 8) {
- FXSYS_memcpy32(m_pLineBuf, pSrcLine, src_pitch_value);
+ FXSYS_memcpy(m_pLineBuf, pSrcLine, src_pitch_value);
} else {
int src_bit_pos = 0;
for (int col = 0; col < m_Width; col ++) {
@@ -1183,7 +1183,7 @@ const uint8_t* CPDF_DIBSource::GetScanline(int line) const
pPixel[2] < m_pCompData[2].m_ColorKeyMin || pPixel[2] > m_pCompData[2].m_ColorKeyMax) ? 0xff : 0;
}
} else {
- FXSYS_memset8(m_pMaskedLine, 0xff, m_Pitch);
+ FXSYS_memset(m_pMaskedLine, 0xff, m_Pitch);
}
}
if (m_pColorSpace) {
@@ -1243,7 +1243,7 @@ void CPDF_DIBSource::DownSampleScanline(int line, uint8_t* dest_scan, int dest_b
int orig_Bpp = m_bpc * m_nComponents / 8;
int dest_Bpp = dest_bpp / 8;
if (pSrcLine == NULL) {
- FXSYS_memset32(dest_scan, 0xff, dest_Bpp * clip_width);
+ FXSYS_memset(dest_scan, 0xff, dest_Bpp * clip_width);
return;
}
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
index 2243bff979..8a20b46805 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
@@ -53,7 +53,7 @@ static void _DrawAxialShading(CFX_DIBitmap* pBitmap, CFX_AffineMatrix* pObject2B
}
CFX_FixedBufGrow<FX_FLOAT, 16> result_array(total_results);
FX_FLOAT* pResults = result_array;
- FXSYS_memset32(pResults, 0, total_results * sizeof(FX_FLOAT));
+ FXSYS_memset(pResults, 0, total_results * sizeof(FX_FLOAT));
FX_DWORD rgb_array[SHADING_STEPS];
for (int i = 0; i < SHADING_STEPS; i ++) {
FX_FLOAT input = (t_max - t_min) * i / SHADING_STEPS + t_min;
@@ -133,7 +133,7 @@ static void _DrawRadialShading(CFX_DIBitmap* pBitmap, CFX_AffineMatrix* pObject2
}
CFX_FixedBufGrow<FX_FLOAT, 16> result_array(total_results);
FX_FLOAT* pResults = result_array;
- FXSYS_memset32(pResults, 0, total_results * sizeof(FX_FLOAT));
+ FXSYS_memset(pResults, 0, total_results * sizeof(FX_FLOAT));
FX_DWORD rgb_array[SHADING_STEPS];
for (int i = 0; i < SHADING_STEPS; i ++) {
FX_FLOAT input = (t_max - t_min) * i / SHADING_STEPS + t_min;
@@ -254,7 +254,7 @@ static void _DrawFuncShading(CFX_DIBitmap* pBitmap, CFX_AffineMatrix* pObject2Bi
}
CFX_FixedBufGrow<FX_FLOAT, 16> result_array(total_results);
FX_FLOAT* pResults = result_array;
- FXSYS_memset32(pResults, 0, total_results * sizeof(FX_FLOAT));
+ FXSYS_memset(pResults, 0, total_results * sizeof(FX_FLOAT));
for (int row = 0; row < height; row ++) {
FX_DWORD* dib_buf = (FX_DWORD*)(pBitmap->GetBuffer() + row * pitch);
for (int column = 0; column < width; column ++) {
@@ -386,7 +386,7 @@ static void _DrawFreeGouraudShading(CFX_DIBitmap* pBitmap, CFX_AffineMatrix* pOb
return;
}
CPDF_MeshVertex triangle[3];
- FXSYS_memset32(triangle, 0, sizeof(triangle));
+ FXSYS_memset(triangle, 0, sizeof(triangle));
while (!stream.m_BitStream.IsEOF()) {
CPDF_MeshVertex vertex;
@@ -568,7 +568,7 @@ static int _BiInterpol(int c0, int c1, int c2, int c3, int x, int y, int x_scale
struct Coon_Color {
Coon_Color()
{
- FXSYS_memset32(comp, 0, sizeof(int) * 3);
+ FXSYS_memset(comp, 0, sizeof(int) * 3);
}
int comp[3];
void BiInterpol(Coon_Color colors[4], int x, int y, int x_scale, int y_scale)
@@ -733,11 +733,11 @@ static void _DrawCoonPatchMeshes(FX_BOOL bTensor, CFX_DIBitmap* pBitmap, CFX_Aff
for (i = 0; i < 4; i ++) {
tempCoords[i] = coords[(flag * 3 + i) % 12];
}
- FXSYS_memcpy32(coords, tempCoords, sizeof(CFX_FloatPoint) * 4);
+ FXSYS_memcpy(coords, tempCoords, sizeof(CFX_FloatPoint) * 4);
Coon_Color tempColors[2];
tempColors[0] = patch.patch_colors[flag];
tempColors[1] = patch.patch_colors[(flag + 1) % 4];
- FXSYS_memcpy32(patch.patch_colors, tempColors, sizeof(Coon_Color) * 2);
+ FXSYS_memcpy(patch.patch_colors, tempColors, sizeof(Coon_Color) * 2);
}
for (i = iStartPoint; i < point_count; i ++) {
stream.GetCoords(coords[i].x, coords[i].y);
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp
index deb77111a1..7af61f265a 100644
--- a/core/src/fpdfdoc/doc_form.cpp
+++ b/core/src/fpdfdoc/doc_form.cpp
@@ -142,7 +142,7 @@ CFieldTree::_Node *CFieldTree::_Lookup(_Node *pParent, const CFX_WideString &sho
for (int i = 0; i < ptr_array.GetSize(); i ++) {
_Node *pNode = (_Node *)ptr_array[i];
if (pNode->short_name.GetLength() == short_name.GetLength() &&
- FXSYS_memcmp32(pNode->short_name.c_str(), short_name.c_str(), short_name.GetLength()*sizeof(FX_WCHAR)) == 0) {
+ FXSYS_memcmp(pNode->short_name.c_str(), short_name.c_str(), short_name.GetLength()*sizeof(FX_WCHAR)) == 0) {
return pNode;
}
}
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 0bdbfa91ea..a9e8169b7b 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -1003,8 +1003,8 @@ int32_t CPDF_TextPage::FindTextlineFlowDirection()
if (minH >= maxH || minV >= maxV) {
continue;
}
- FXSYS_memset8(pDataH + minH, 1, maxH - minH);
- FXSYS_memset8(pDataV + minV, 1, maxV - minV);
+ FXSYS_memset(pDataH + minH, 1, maxH - minH);
+ FXSYS_memset(pDataV + minV, 1, maxV - minV);
if (fLineHeight <= 0.0f) {
fLineHeight = pPageObj->m_Top - pPageObj->m_Bottom;
}
@@ -2578,7 +2578,7 @@ FX_BOOL CPDF_TextPageFind::ExtractSubString(CFX_WideString& rString, const FX_WC
int nLen = (lpchEnd == NULL) ?
(int)FXSYS_wcslen(lpszFullString) : (int)(lpchEnd - lpszFullString);
ASSERT(nLen >= 0);
- FXSYS_memcpy32(rString.GetBuffer(nLen), lpszFullString, nLen * sizeof(FX_WCHAR));
+ FXSYS_memcpy(rString.GetBuffer(nLen), lpszFullString, nLen * sizeof(FX_WCHAR));
rString.ReleaseBuffer();
return TRUE;
}
diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h
index 90e8b8c02c..7e3b2e12e0 100644
--- a/core/src/fxcodec/codec/codec_int.h
+++ b/core/src/fxcodec/codec/codec_int.h
@@ -164,7 +164,7 @@ class CCodec_PngModule : public ICodec_PngModule
public:
CCodec_PngModule()
{
- FXSYS_memset8(m_szLastError, '\0', PNG_ERROR_SIZE);
+ FXSYS_memset(m_szLastError, '\0', PNG_ERROR_SIZE);
}
virtual void* Start(void* pModule);
@@ -178,7 +178,7 @@ class CCodec_GifModule : public ICodec_GifModule
public:
CCodec_GifModule()
{
- FXSYS_memset8(m_szLastError, '\0', 256);
+ FXSYS_memset(m_szLastError, '\0', 256);
}
virtual void* Start(void* pModule);
virtual void Finish(void* pContext);
@@ -200,7 +200,7 @@ class CCodec_BmpModule : public ICodec_BmpModule
public:
CCodec_BmpModule()
{
- FXSYS_memset8(m_szLastError, '\0', 256);
+ FXSYS_memset(m_szLastError, '\0', 256);
}
virtual void* Start(void* pModule);
virtual void Finish(void* pContext);
diff --git a/core/src/fxcodec/codec/fx_codec.cpp b/core/src/fxcodec/codec/fx_codec.cpp
index ed007fdcb1..319e66e69b 100644
--- a/core/src/fxcodec/codec/fx_codec.cpp
+++ b/core/src/fxcodec/codec/fx_codec.cpp
@@ -102,7 +102,7 @@ uint8_t* CCodec_ScanlineDecoder::ReadNextLine()
return NULL;
}
if (m_pDataCache && m_NextLine == m_pDataCache->m_nCachedLines) {
- FXSYS_memcpy32(&m_pDataCache->m_Data + m_NextLine * m_Pitch, pLine, m_Pitch);
+ FXSYS_memcpy(&m_pDataCache->m_Data + m_NextLine * m_Pitch, pLine, m_Pitch);
m_pDataCache->m_nCachedLines ++;
}
return pLine;
@@ -255,7 +255,7 @@ void CCodec_ModuleMgr::Destroy()
}
CFX_DIBAttribute::CFX_DIBAttribute()
{
- FXSYS_memset32(this, 0, sizeof(CFX_DIBAttribute));
+ FXSYS_memset(this, 0, sizeof(CFX_DIBAttribute));
m_nXDPI = -1;
m_nYDPI = -1;
m_fAspectRatio = -1.0f;
@@ -328,7 +328,7 @@ uint8_t* CFX_DIBAttributeExif::ParseExifIFH(uint8_t* data, FX_DWORD len, _Read2B
{
if (len > 8) {
FX_BOOL tag = FALSE;
- if (FXSYS_memcmp32(data, "\x49\x49\x2a\x00", 4) == 0) {
+ if (FXSYS_memcmp(data, "\x49\x49\x2a\x00", 4) == 0) {
if (pReadWord) {
*pReadWord = _Read2BytesL;
}
@@ -336,7 +336,7 @@ uint8_t* CFX_DIBAttributeExif::ParseExifIFH(uint8_t* data, FX_DWORD len, _Read2B
*pReadDword = _Read4BytesL;
}
tag = TRUE;
- } else if (FXSYS_memcmp32(data, "\x4d\x4d\x00\x2a", 4) == 0) {
+ } else if (FXSYS_memcmp(data, "\x4d\x4d\x00\x2a", 4) == 0) {
if (pReadWord) {
*pReadWord = _Read2BytesB;
}
@@ -372,7 +372,7 @@ FX_BOOL CFX_DIBAttributeExif::ParseExifIFD(CFX_MapPtrTemplate<FX_DWORD, uint8_t*
if (buf == NULL) {
return FALSE;
}
- FXSYS_memcpy32(buf, data, 10);
+ FXSYS_memcpy(buf, data, 10);
pMap->SetAt(wTag, buf);
}
data += 10;
@@ -391,7 +391,7 @@ FX_BOOL CFX_DIBAttributeExif::ParseExifIFD(CFX_MapPtrTemplate<FX_DWORD, uint8_t*
if (buf == NULL) {
return FALSE;
}
- FXSYS_memcpy32(buf, data, 10);
+ FXSYS_memcpy(buf, data, 10);
pMap->SetAt(wTag, buf);
}
data += 10;
@@ -459,9 +459,9 @@ FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>*
return FALSE;
}
if (dwSize > 4) {
- FXSYS_memcpy32(val, old_data + m_readDword(head), dwSize);
+ FXSYS_memcpy(val, old_data + m_readDword(head), dwSize);
} else {
- FXSYS_memcpy32(val, head, dwSize);
+ FXSYS_memcpy(val, head, dwSize);
}
break;
case FX_UnsignedShort:
@@ -472,9 +472,9 @@ FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>*
return FALSE;
}
if (dwSize > 4) {
- FXSYS_memcpy32(val, old_data + m_readDword(head), dwSize);
+ FXSYS_memcpy(val, old_data + m_readDword(head), dwSize);
} else {
- FXSYS_memcpy32(val, head, dwSize);
+ FXSYS_memcpy(val, head, dwSize);
}
buf = val;
for(i = 0; i < (int)dwModuleNum; i ++) {
@@ -491,9 +491,9 @@ FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>*
return FALSE;
}
if (dwSize > 4) {
- FXSYS_memcpy32(val, old_data + m_readDword(head), dwSize);
+ FXSYS_memcpy(val, old_data + m_readDword(head), dwSize);
} else {
- FXSYS_memcpy32(val, head, dwSize);
+ FXSYS_memcpy(val, head, dwSize);
}
buf = val;
for(i = 0; i < (int)dwModuleNum; i ++) {
@@ -509,9 +509,9 @@ FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>*
return FALSE;
}
if (dwSize > 4) {
- FXSYS_memcpy32(buf, old_data + m_readDword(head), dwSize);
+ FXSYS_memcpy(buf, old_data + m_readDword(head), dwSize);
} else {
- FXSYS_memcpy32(buf, head, dwSize);
+ FXSYS_memcpy(buf, head, dwSize);
}
temp = buf;
val = FX_Alloc(uint8_t, dwSize / 2);
@@ -537,9 +537,9 @@ FX_BOOL CFX_DIBAttributeExif::ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>*
return FALSE;
}
if (dwSize > 4) {
- FXSYS_memcpy32(val, old_data + m_readDword(head), dwSize);
+ FXSYS_memcpy(val, old_data + m_readDword(head), dwSize);
} else {
- FXSYS_memcpy32(val, head, dwSize);
+ FXSYS_memcpy(val, head, dwSize);
}
buf = val;
for(i = 0; i < (int)dwModuleNum; i ++) {
@@ -680,7 +680,7 @@ FX_BOOL CCodec_RLScanlineDecoder::Create(const uint8_t* src_buf, FX_DWORD src_si
}
FX_BOOL CCodec_RLScanlineDecoder::v_Rewind()
{
- FXSYS_memset32(m_pScanline, 0, m_Pitch);
+ FXSYS_memset(m_pScanline, 0, m_Pitch);
m_SrcOffset = 0;
m_bEOD = FALSE;
m_Operator = 0;
@@ -695,7 +695,7 @@ uint8_t* CCodec_RLScanlineDecoder::v_GetNextLine()
return NULL;
}
}
- FXSYS_memset32(m_pScanline, 0, m_Pitch);
+ FXSYS_memset(m_pScanline, 0, m_Pitch);
FX_DWORD col_pos = 0;
FX_BOOL eol = FALSE;
while (m_SrcOffset < m_SrcSize && !eol) {
@@ -709,7 +709,7 @@ uint8_t* CCodec_RLScanlineDecoder::v_GetNextLine()
copy_len = m_SrcSize - m_SrcOffset;
m_bEOD = TRUE;
}
- FXSYS_memcpy32(m_pScanline + col_pos, m_pSrcBuf + m_SrcOffset, copy_len);
+ FXSYS_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) {
@@ -722,7 +722,7 @@ uint8_t* CCodec_RLScanlineDecoder::v_GetNextLine()
duplicate_len = m_dwLineBytes - col_pos;
eol = TRUE;
}
- FXSYS_memset8(m_pScanline + col_pos, fill, duplicate_len);
+ FXSYS_memset(m_pScanline + col_pos, fill, duplicate_len);
col_pos += duplicate_len;
UpdateOperator((uint8_t)duplicate_len);
} else {
diff --git a/core/src/fxcodec/codec/fx_codec_bmp.cpp b/core/src/fxcodec/codec/fx_codec_bmp.cpp
index 554ce358e0..da7a8bf1a6 100644
--- a/core/src/fxcodec/codec/fx_codec_bmp.cpp
+++ b/core/src/fxcodec/codec/fx_codec_bmp.cpp
@@ -51,7 +51,7 @@ void* CCodec_BmpModule::Start(void* pModule)
if (p == NULL) {
return NULL;
}
- FXSYS_memset32(p, 0, sizeof(FXBMP_Context));
+ FXSYS_memset(p, 0, sizeof(FXBMP_Context));
if(p == NULL) {
return NULL;
}
diff --git a/core/src/fxcodec/codec/fx_codec_fax.cpp b/core/src/fxcodec/codec/fx_codec_fax.cpp
index 40502362d5..148d3d49fc 100644
--- a/core/src/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/src/fxcodec/codec/fx_codec_fax.cpp
@@ -130,7 +130,7 @@ void _FaxFillBits(uint8_t* dest_buf, int columns, int startpos, int endpos)
dest_buf[last_byte] -= 1 << (7 - i);
}
if (last_byte > first_byte + 1) {
- FXSYS_memset32(dest_buf + first_byte + 1, 0, last_byte - first_byte - 1);
+ FXSYS_memset(dest_buf + first_byte + 1, 0, last_byte - first_byte - 1);
}
}
#define NEXTBIT src_buf[bitpos/8] & (1 << (7-bitpos%8)); bitpos ++;
@@ -633,7 +633,7 @@ FX_BOOL CCodec_FaxDecoder::Create(const uint8_t* src_buf, FX_DWORD src_size, int
}
FX_BOOL CCodec_FaxDecoder::v_Rewind()
{
- FXSYS_memset8(m_pRefBuf, 0xff, m_Pitch);
+ FXSYS_memset(m_pRefBuf, 0xff, m_Pitch);
bitpos = 0;
return TRUE;
}
@@ -644,10 +644,10 @@ uint8_t* CCodec_FaxDecoder::v_GetNextLine()
if (bitpos >= bitsize) {
return NULL;
}
- FXSYS_memset8(m_pScanlineBuf, 0xff, m_Pitch);
+ FXSYS_memset(m_pScanlineBuf, 0xff, m_Pitch);
if (m_Encoding < 0) {
_FaxG4GetRow(m_pSrcBuf, bitsize, bitpos, m_pScanlineBuf, m_pRefBuf, m_OrigWidth);
- FXSYS_memcpy32(m_pRefBuf, m_pScanlineBuf, m_Pitch);
+ FXSYS_memcpy(m_pRefBuf, m_pScanlineBuf, m_Pitch);
} else if (m_Encoding == 0) {
_FaxGet1DLine(m_pSrcBuf, bitsize, bitpos, m_pScanlineBuf, m_OrigWidth);
} else {
@@ -658,7 +658,7 @@ uint8_t* CCodec_FaxDecoder::v_GetNextLine()
} else {
_FaxG4GetRow(m_pSrcBuf, bitsize, bitpos, m_pScanlineBuf, m_pRefBuf, m_OrigWidth);
}
- FXSYS_memcpy32(m_pRefBuf, m_pScanlineBuf, m_Pitch);
+ FXSYS_memcpy(m_pRefBuf, m_pScanlineBuf, m_Pitch);
}
if (m_bEndOfLine) {
_FaxSkipEOL(m_pSrcBuf, bitsize, bitpos);
@@ -700,13 +700,13 @@ extern "C" {
pitch = (width + 7) / 8;
}
uint8_t* ref_buf = FX_Alloc(uint8_t, pitch);
- FXSYS_memset8(ref_buf, 0xff, pitch);
+ FXSYS_memset(ref_buf, 0xff, pitch);
int bitpos = *pbitpos;
for (int iRow = 0; iRow < height; iRow ++) {
uint8_t* line_buf = dest_buf + iRow * pitch;
- FXSYS_memset8(line_buf, 0xff, pitch);
+ FXSYS_memset(line_buf, 0xff, pitch);
_FaxG4GetRow(src_buf, src_size << 3, bitpos, line_buf, ref_buf, width);
- FXSYS_memcpy32(ref_buf, line_buf, pitch);
+ FXSYS_memcpy(ref_buf, line_buf, pitch);
}
FX_Free(ref_buf);
*pbitpos = bitpos;
@@ -938,7 +938,7 @@ CCodec_FaxEncoder::CCodec_FaxEncoder(const uint8_t* src_buf, int width, int heig
m_Rows = height;
m_Pitch = pitch;
m_pRefLine = FX_Alloc(uint8_t, m_Pitch);
- FXSYS_memset8(m_pRefLine, 0xff, m_Pitch);
+ FXSYS_memset(m_pRefLine, 0xff, m_Pitch);
m_pLineBuf = FX_Alloc2D(uint8_t, m_Pitch, 8);
m_DestBuf.EstimateSize(0, 10240);
}
@@ -957,13 +957,13 @@ void CCodec_FaxEncoder::Encode(uint8_t*& dest_buf, FX_DWORD& dest_size)
uint8_t last_byte = 0;
for (int i = 0; i < m_Rows; i ++) {
const uint8_t* scan_line = m_pSrcBuf + i * m_Pitch;
- FXSYS_memset32(m_pLineBuf, 0, m_Pitch * 8);
+ FXSYS_memset(m_pLineBuf, 0, m_Pitch * 8);
m_pLineBuf[0] = last_byte;
_FaxEncode2DLine(m_pLineBuf, dest_bitpos, scan_line, m_pRefLine, m_Cols);
m_DestBuf.AppendBlock(m_pLineBuf, dest_bitpos / 8);
last_byte = m_pLineBuf[dest_bitpos / 8];
dest_bitpos %= 8;
- FXSYS_memcpy32(m_pRefLine, scan_line, m_Pitch);
+ FXSYS_memcpy(m_pRefLine, scan_line, m_Pitch);
}
if (dest_bitpos) {
m_DestBuf.AppendByte(last_byte);
diff --git a/core/src/fxcodec/codec/fx_codec_flate.cpp b/core/src/fxcodec/codec/fx_codec_flate.cpp
index 2e6cf4e8db..f9925c323c 100644
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp
@@ -26,7 +26,7 @@ extern "C"
if (p == NULL) {
return NULL;
}
- FXSYS_memset32(p, 0, sizeof(z_stream));
+ FXSYS_memset(p, 0, sizeof(z_stream));
p->zalloc = alloc_func;
p->zfree = free_func;
inflateInit(p);
@@ -50,7 +50,7 @@ extern "C"
unsigned int post_pos = (unsigned int)FPDFAPI_FlateGetTotalOut(context);
unsigned int written = post_pos - pre_pos;
if (written < dest_size) {
- FXSYS_memset8(dest_buf + written, '\0', dest_size - written);
+ FXSYS_memset(dest_buf + written, '\0', dest_size - written);
}
return ret;
}
@@ -252,7 +252,7 @@ static FX_BOOL PNG_PredictorEncode(uint8_t*& data_buf, FX_DWORD& data_size,
if (move_size * (row + 1) > (int)data_size) {
move_size = data_size - (move_size * row);
}
- FXSYS_memmove32(pDestData + 1, pSrcData, move_size);
+ FXSYS_memmove(pDestData + 1, pSrcData, move_size);
pDestData += (move_size + 1);
pSrcData += move_size;
byte_cnt += move_size;
@@ -330,7 +330,7 @@ static void PNG_PredictLine(uint8_t* pDestData, const uint8_t* pSrcData, const u
int BytesPerPixel = (bpc * nColors + 7) / 8;
uint8_t tag = pSrcData[0];
if (tag == 0) {
- FXSYS_memmove32(pDestData, pSrcData + 1, row_size);
+ FXSYS_memmove(pDestData, pSrcData + 1, row_size);
return;
}
for (int byte = 0; byte < row_size; byte ++) {
@@ -407,7 +407,7 @@ static FX_BOOL PNG_Predictor(uint8_t*& data_buf, FX_DWORD& data_size,
if ((row + 1) * (move_size + 1) > (int)data_size) {
move_size = last_row_size - 1;
}
- FXSYS_memmove32(pDestData, pSrcData + 1, move_size);
+ FXSYS_memmove(pDestData, pSrcData + 1, move_size);
pSrcData += move_size + 1;
pDestData += move_size;
byte_cnt += move_size;
@@ -685,7 +685,7 @@ uint8_t* CCodec_FlateScanlineDecoder::v_GetNextLine()
if (m_Predictor == 2) {
FPDFAPI_FlateOutput(m_pFlate, m_pPredictRaw, m_PredictPitch + 1);
PNG_PredictLine(m_pScanline, m_pPredictRaw, m_pLastLine, m_BitsPerComponent, m_Colors, m_Columns);
- FXSYS_memcpy32(m_pLastLine, m_pScanline, m_PredictPitch);
+ FXSYS_memcpy(m_pLastLine, m_pScanline, m_PredictPitch);
} else {
FPDFAPI_FlateOutput(m_pFlate, m_pScanline, m_Pitch);
TIFF_PredictLine(m_pScanline, m_PredictPitch, m_bpc, m_nComps, m_OutputWidth);
@@ -694,7 +694,7 @@ uint8_t* CCodec_FlateScanlineDecoder::v_GetNextLine()
int bytes_to_go = m_Pitch;
int read_leftover = m_LeftOver > bytes_to_go ? bytes_to_go : m_LeftOver;
if (read_leftover) {
- FXSYS_memcpy32(m_pScanline, m_pPredictBuffer + m_PredictPitch - m_LeftOver, read_leftover);
+ FXSYS_memcpy(m_pScanline, m_pPredictBuffer + m_PredictPitch - m_LeftOver, read_leftover);
m_LeftOver -= read_leftover;
bytes_to_go -= read_leftover;
}
@@ -702,13 +702,13 @@ uint8_t* CCodec_FlateScanlineDecoder::v_GetNextLine()
if (m_Predictor == 2) {
FPDFAPI_FlateOutput(m_pFlate, m_pPredictRaw, m_PredictPitch + 1);
PNG_PredictLine(m_pPredictBuffer, m_pPredictRaw, m_pLastLine, m_BitsPerComponent, m_Colors, m_Columns);
- FXSYS_memcpy32(m_pLastLine, m_pPredictBuffer, m_PredictPitch);
+ FXSYS_memcpy(m_pLastLine, m_pPredictBuffer, m_PredictPitch);
} else {
FPDFAPI_FlateOutput(m_pFlate, m_pPredictBuffer, m_PredictPitch);
TIFF_PredictLine(m_pPredictBuffer, m_PredictPitch, m_BitsPerComponent, m_Colors, m_Columns);
}
int read_bytes = m_PredictPitch > bytes_to_go ? bytes_to_go : m_PredictPitch;
- FXSYS_memcpy32(m_pScanline + m_Pitch - bytes_to_go, m_pPredictBuffer, read_bytes);
+ FXSYS_memcpy(m_pScanline + m_Pitch - bytes_to_go, m_pPredictBuffer, read_bytes);
m_LeftOver += m_PredictPitch - read_bytes;
bytes_to_go -= read_bytes;
}
@@ -809,7 +809,7 @@ static void FlateUncompress(const uint8_t* src_buf, FX_DWORD src_size, FX_DWORD
if (i == result_tmp_bufs.GetSize() - 1) {
tmp_buf_size = last_buf_size;
}
- FXSYS_memcpy32(result_buf + result_pos, tmp_buf, tmp_buf_size);
+ FXSYS_memcpy(result_buf + result_pos, tmp_buf, tmp_buf_size);
result_pos += tmp_buf_size;
FX_Free(result_tmp_bufs[i]);
}
@@ -888,7 +888,7 @@ FX_BOOL CCodec_FlateModule::Encode(const uint8_t* src_buf, FX_DWORD src_size,
}
uint8_t* pSrcBuf = NULL;
pSrcBuf = FX_Alloc(uint8_t, src_size);
- FXSYS_memcpy32(pSrcBuf, src_buf, src_size);
+ FXSYS_memcpy(pSrcBuf, src_buf, src_size);
FX_BOOL ret = TRUE;
if (predictor == 2) {
ret = TIFF_PredictorEncode(pSrcBuf, src_size, Colors, BitsPerComponent,
diff --git a/core/src/fxcodec/codec/fx_codec_gif.cpp b/core/src/fxcodec/codec/fx_codec_gif.cpp
index d22c156fdb..4281a0d492 100644
--- a/core/src/fxcodec/codec/fx_codec_gif.cpp
+++ b/core/src/fxcodec/codec/fx_codec_gif.cpp
@@ -70,7 +70,7 @@ void* CCodec_GifModule::Start(void* pModule)
if (p == NULL) {
return NULL;
}
- FXSYS_memset32(p, 0, sizeof(FXGIF_Context));
+ FXSYS_memset(p, 0, sizeof(FXGIF_Context));
p->m_AllocFunc = _gif_alloc_func;
p->m_FreeFunc = _gif_free_func;
p->gif_ptr = NULL;
@@ -156,7 +156,7 @@ int32_t CCodec_GifModule::LoadFrame(void* pContext, int frame_num, CFX_DIBAttrib
buf += size;
size = *buf++;
if (size == 20) {
- FXSYS_memcpy32(pAttribute->m_strTime, buf, size);
+ FXSYS_memcpy(pAttribute->m_strTime, buf, size);
}
}
}
diff --git a/core/src/fxcodec/codec/fx_codec_icc.cpp b/core/src/fxcodec/codec/fx_codec_icc.cpp
index 6fe92ff240..26537b541c 100644
--- a/core/src/fxcodec/codec/fx_codec_icc.cpp
+++ b/core/src/fxcodec/codec/fx_codec_icc.cpp
@@ -414,7 +414,7 @@ void* CCodec_IccModule::CreateProfile(ICodec_IccModule::IccParam* pIccParam, Icc
MD5ComputeID(pIccParam->pProfileData, pIccParam->dwProfileSize, ID);
break;
case Icc_PARAMTYPE_PARAM:
- FXSYS_memset32(ID, 0, 16);
+ FXSYS_memset(ID, 0, 16);
switch (pIccParam->ColorSpace) {
case IccCS_Gray:
text.Format("%lf", pIccParam->Gamma);
diff --git a/core/src/fxcodec/codec/fx_codec_jbig.cpp b/core/src/fxcodec/codec/fx_codec_jbig.cpp
index b908915227..b50ae6460d 100644
--- a/core/src/fxcodec/codec/fx_codec_jbig.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jbig.cpp
@@ -8,7 +8,7 @@
#include "codec_int.h"
CCodec_Jbig2Context::CCodec_Jbig2Context()
{
- FXSYS_memset32(this, 0, sizeof(CCodec_Jbig2Context));
+ FXSYS_memset(this, 0, sizeof(CCodec_Jbig2Context));
}
CCodec_Jbig2Module::~CCodec_Jbig2Module()
{
@@ -28,7 +28,7 @@ void CCodec_Jbig2Module::DestroyJbig2Context(void* pJbig2Content)
FX_BOOL CCodec_Jbig2Module::Decode(FX_DWORD width, FX_DWORD height, const uint8_t* src_buf, FX_DWORD src_size,
const uint8_t* global_data, FX_DWORD global_size, uint8_t* dest_buf, FX_DWORD dest_pitch)
{
- FXSYS_memset32(dest_buf, 0, height * dest_pitch);
+ FXSYS_memset(dest_buf, 0, height * dest_pitch);
CJBig2_Context* pContext = CJBig2_Context::CreateContext(&m_Module,
(uint8_t*)global_data, global_size, (uint8_t*)src_buf, src_size, JBIG2_EMBED_STREAM, &m_SymbolDictCache);
if (pContext == NULL) {
@@ -97,7 +97,7 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(void* pJbig2Context, FX_DWORD wid
m_pJbig2Context->m_dest_pitch = dest_pitch;
m_pJbig2Context->m_pPause = pPause;
m_pJbig2Context->m_bFileReader = FALSE;
- FXSYS_memset32(dest_buf, 0, height * dest_pitch);
+ FXSYS_memset(dest_buf, 0, height * dest_pitch);
m_pJbig2Context->m_pContext = CJBig2_Context::CreateContext(&m_Module,
(uint8_t*)global_data, global_size, (uint8_t*)src_buf, src_size, JBIG2_EMBED_STREAM, &m_SymbolDictCache, pPause);
if(!m_pJbig2Context->m_pContext) {
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index df0ef5e9b6..b61fd49b3b 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -81,7 +81,7 @@ static FX_BOOL _JpegIsIccMarker(jpeg_saved_marker_ptr marker)
{
if (marker->marker == JPEG_MARKER_ICC &&
marker->data_length >= JPEG_OVERHEAD_LEN &&
- (FXSYS_memcmp32(marker->data, "\x49\x43\x43\x5f\x50\x52\x4f\x46\x49\x4c\x45\x00", 12) == 0)) {
+ (FXSYS_memcmp(marker->data, "\x49\x43\x43\x5f\x50\x52\x4f\x46\x49\x4c\x45\x00", 12) == 0)) {
return TRUE;
}
return FALSE;
@@ -134,7 +134,7 @@ static FX_BOOL _JpegLoadIccProfile(j_decompress_ptr cinfo, uint8_t** icc_buf_ptr
*icc_length = icc_data_len;
for (int idx = 0; idx < num_icc_marker; idx++) {
icc_data_len = marker_list[idx]->data_length - JPEG_OVERHEAD_LEN;
- FXSYS_memcpy32(icc_data_ptr, marker_list[idx]->data + JPEG_OVERHEAD_LEN, icc_data_len);
+ FXSYS_memcpy(icc_data_ptr, marker_list[idx]->data + JPEG_OVERHEAD_LEN, icc_data_len);
icc_data_ptr += icc_data_len;
}
return TRUE;
@@ -151,16 +151,16 @@ static FX_BOOL _JpegEmbedIccProfile(j_compress_ptr cinfo, const uint8_t* icc_buf
}
FX_DWORD icc_data_length = JPEG_OVERHEAD_LEN + (icc_segment_num > 1 ? icc_segment_size : icc_length);
uint8_t* icc_data = FX_Alloc(uint8_t, icc_data_length);
- FXSYS_memcpy32(icc_data, "\x49\x43\x43\x5f\x50\x52\x4f\x46\x49\x4c\x45\x00", 12);
+ FXSYS_memcpy(icc_data, "\x49\x43\x43\x5f\x50\x52\x4f\x46\x49\x4c\x45\x00", 12);
icc_data[13] = (uint8_t)icc_segment_num;
for (uint8_t i = 0; i < (icc_segment_num - 1); i++) {
icc_data[12] = i + 1;
- FXSYS_memcpy32(icc_data + JPEG_OVERHEAD_LEN, icc_buf_ptr + i * icc_segment_size, icc_segment_size);
+ FXSYS_memcpy(icc_data + JPEG_OVERHEAD_LEN, icc_buf_ptr + i * icc_segment_size, icc_segment_size);
jpeg_write_marker(cinfo, JPEG_MARKER_ICC, icc_data, icc_data_length);
}
icc_data[12] = (uint8_t)icc_segment_num;
FX_DWORD icc_size = (icc_segment_num - 1) * icc_segment_size;
- FXSYS_memcpy32(icc_data + JPEG_OVERHEAD_LEN, icc_buf_ptr + icc_size, icc_length - icc_size);
+ FXSYS_memcpy(icc_data + JPEG_OVERHEAD_LEN, icc_buf_ptr + icc_size, icc_length - icc_size);
jpeg_write_marker(cinfo, JPEG_MARKER_ICC, icc_data, JPEG_OVERHEAD_LEN + icc_length - icc_size);
FX_Free(icc_data);
return TRUE;
@@ -385,9 +385,9 @@ CCodec_JpegDecoder::CCodec_JpegDecoder()
m_bInited = FALSE;
m_pExtProvider = NULL;
m_pExtContext = NULL;
- FXSYS_memset32(&cinfo, 0, sizeof(cinfo));
- FXSYS_memset32(&jerr, 0, sizeof(jerr));
- FXSYS_memset32(&src, 0, sizeof(src));
+ FXSYS_memset(&cinfo, 0, sizeof(cinfo));
+ FXSYS_memset(&jerr, 0, sizeof(jerr));
+ FXSYS_memset(&src, 0, sizeof(src));
m_nDefaultScaleDenom = 1;
}
CCodec_JpegDecoder::~CCodec_JpegDecoder()
@@ -461,7 +461,7 @@ FX_BOOL CCodec_JpegDecoder::Create(const uint8_t* src_buf, FX_DWORD src_size, in
src.fill_input_buffer = _src_fill_buffer;
src.resync_to_restart = _src_resync;
m_bJpegTransform = ColorTransform;
- if(src_size > 1 && FXSYS_memcmp32(src_buf + src_size - 2, "\xFF\xD9", 2) != 0) {
+ if(src_size > 1 && FXSYS_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/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 312ce78759..a397a4504a 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -472,9 +472,9 @@ void color_apply_icc_profile(opj_image_t *image)
image->comps[1] = image->comps[0];
image->comps[2] = image->comps[0];
image->comps[1].data = FX_Alloc(int, (size_t)max);
- FXSYS_memset8(image->comps[1].data, 0, sizeof(int) * (size_t)max);
+ FXSYS_memset(image->comps[1].data, 0, sizeof(int) * (size_t)max);
image->comps[2].data = FX_Alloc(int, (size_t)max);
- FXSYS_memset8(image->comps[2].data, 0, sizeof(int) * (size_t)max);
+ FXSYS_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) {
@@ -630,7 +630,7 @@ FX_BOOL CJPX_Decoder::Init(const unsigned char* src_data, int src_size)
opj_set_default_decoder_parameters(&parameters);
parameters.decod_format = 0;
parameters.cod_format = 3;
- if(FXSYS_memcmp32(m_SrcData, szJP2Header, sizeof(szJP2Header)) == 0) {
+ if(FXSYS_memcmp(m_SrcData, szJP2Header, sizeof(szJP2Header)) == 0) {
l_codec = opj_create_decompress(OPJ_CODEC_JP2);
parameters.decod_format = 1;
} else {
@@ -715,7 +715,7 @@ FX_BOOL CJPX_Decoder::Decode(uint8_t* dest_buf, int pitch, FX_BOOL bTranslateCol
if(pitch < (int)(image->comps[0].w * 8 * image->numcomps + 31) >> 5 << 2) {
return FALSE;
}
- FXSYS_memset8(dest_buf, 0xff, image->y1 * pitch);
+ FXSYS_memset(dest_buf, 0xff, image->y1 * pitch);
uint8_t** channel_bufs = FX_Alloc(uint8_t*, image->numcomps);
FX_BOOL result = FALSE;
int* adjust_comps = FX_Alloc(int, image->numcomps);
diff --git a/core/src/fxcodec/codec/fx_codec_png.cpp b/core/src/fxcodec/codec/fx_codec_png.cpp
index 55d66a3ccf..b96ccf6dec 100644
--- a/core/src/fxcodec/codec/fx_codec_png.cpp
+++ b/core/src/fxcodec/codec/fx_codec_png.cpp
@@ -50,7 +50,7 @@ static void _png_load_bmp_attribute(png_structp png_ptr, png_infop info_ptr, CFX
png_timep t = NULL;
png_get_tIME(png_ptr, info_ptr, &t);
if (t) {
- FXSYS_memset32(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
+ FXSYS_memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
FXSYS_snprintf((FX_CHAR*)pAttribute->m_strTime, sizeof(pAttribute->m_strTime), "%4d:%2d:%2d %2d:%2d:%2d",
t->year, t->month, t->day, t->hour, t->minute, t->second);
pAttribute->m_strTime[sizeof(pAttribute->m_strTime) - 1] = 0;
@@ -67,15 +67,15 @@ static void _png_load_bmp_attribute(png_structp png_ptr, png_infop info_ptr, CFX
for (i = 0; i < num_text; i++) {
len = (FX_DWORD)FXSYS_strlen(text[i].key);
buf = "Time";
- if (!FXSYS_memcmp32(buf, text[i].key, FX_MIN(len, FXSYS_strlen(buf)))) {
+ if (!FXSYS_memcmp(buf, text[i].key, FX_MIN(len, FXSYS_strlen(buf)))) {
if (!bTime) {
- FXSYS_memset32(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
- FXSYS_memcpy32(pAttribute->m_strTime, text[i].text,
+ FXSYS_memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
+ FXSYS_memcpy(pAttribute->m_strTime, text[i].text,
FX_MIN(sizeof(pAttribute->m_strTime) - 1, text[i].text_length));
}
} else {
buf = "Author";
- if (!FXSYS_memcmp32(buf, text[i].key, FX_MIN(len, FXSYS_strlen(buf)))) {
+ if (!FXSYS_memcmp(buf, text[i].key, FX_MIN(len, FXSYS_strlen(buf)))) {
pAttribute->m_strAuthor.Empty();
pAttribute->m_strAuthor.Load((uint8_t*)text[i].text, (FX_STRSIZE)text[i].text_length);
}
diff --git a/core/src/fxcodec/codec/fx_codec_progress.cpp b/core/src/fxcodec/codec/fx_codec_progress.cpp
index da64eed42f..33398f0663 100644
--- a/core/src/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/src/fxcodec/codec/fx_codec_progress.cpp
@@ -107,7 +107,7 @@ void CFXCODEC_HorzTable::Calc(int dest_len, int src_len, FX_BOOL bInterpol)
if(m_pWeightTables == NULL) {
return;
}
- FXSYS_memset32(m_pWeightTables, 0, size);
+ FXSYS_memset(m_pWeightTables, 0, size);
if(scale > 1) {
int pre_des_col = 0;
for (int src_col = 0; src_col < src_len; src_col++) {
@@ -164,7 +164,7 @@ void CFXCODEC_VertTable::Calc(int dest_len, int src_len)
if(m_pWeightTables == NULL) {
return;
}
- FXSYS_memset32(m_pWeightTables, 0, size);
+ FXSYS_memset(m_pWeightTables, 0, size);
if(scale > 1) {
double step = 0.0;
int src_row = 0;
@@ -296,7 +296,7 @@ FX_BOOL CCodec_ProgressiveDecoder::JpegReadMoreData(ICodec_JpegModule* pJpegModu
} else {
FX_DWORD dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memcpy32(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ FXSYS_memcpy(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -540,7 +540,7 @@ FX_BOOL CCodec_ProgressiveDecoder::GifReadMoreData(ICodec_GifModule* pGifModule,
} else {
FX_DWORD dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memcpy32(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ FXSYS_memcpy(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -621,7 +621,7 @@ FX_BOOL CCodec_ProgressiveDecoder::GifInputRecordPositionBufCallback(void* pModu
switch(pCodec->m_TransMethod) {
case 3: {
uint8_t gray = FXRGB2GRAY(FXARGB_R(argb), FXARGB_G(argb), FXARGB_B(argb));
- FXSYS_memset8(pScanline, gray, sizeX);
+ FXSYS_memset(pScanline, gray, sizeX);
break;
}
case 8: {
@@ -663,11 +663,11 @@ void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule, int32_t r
if (pCodec->m_GifTransIndex != -1 && pCodec->m_pDeviceBitmap->HasAlpha()) {
pal_index = pCodec->m_GifTransIndex;
}
- FXSYS_memset8(pCodec->m_pDecodeBuf, pal_index, pCodec->m_SrcWidth);
+ FXSYS_memset(pCodec->m_pDecodeBuf, pal_index, pCodec->m_SrcWidth);
FX_BOOL bLastPass = ((row_num % 2) == 1) ? TRUE : FALSE;
int32_t line = row_num + pCodec->m_GifFrameRect.top;
int32_t left = pCodec->m_GifFrameRect.left;
- FXSYS_memcpy32(pCodec->m_pDecodeBuf + left, row_buf, img_width);
+ FXSYS_memcpy(pCodec->m_pDecodeBuf + left, row_buf, img_width);
int src_top = pCodec->m_clipBox.top;
int src_bottom = pCodec->m_clipBox.bottom;
int des_top = pCodec->m_startY;
@@ -695,7 +695,7 @@ void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule, int32_t r
while (++cur_row < des_bottom) {
uint8_t* scan_des = (uint8_t*)pDIBitmap->GetScanline(cur_row) + des_ScanOffet;
FX_DWORD size = pCodec->m_sizeX * des_Bpp;
- FXSYS_memcpy32(scan_des, scan_src, size);
+ FXSYS_memcpy(scan_des, scan_src, size);
}
}
if(bLastPass) {
@@ -799,7 +799,7 @@ FX_BOOL CCodec_ProgressiveDecoder::BmpReadMoreData(ICodec_BmpModule* pBmpModule,
} else {
FX_DWORD dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memcpy32(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ FXSYS_memcpy(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -828,7 +828,7 @@ void CCodec_ProgressiveDecoder::BmpReadScanlineCallback(void* pModule, int32_t r
CCodec_ProgressiveDecoder* pCodec = (CCodec_ProgressiveDecoder*)pModule;
CFX_DIBitmap* pDIBitmap = pCodec->m_pDeviceBitmap;
ASSERT(pDIBitmap != NULL);
- FXSYS_memcpy32(pCodec->m_pDecodeBuf, row_buf, pCodec->m_ScanlineSize);
+ FXSYS_memcpy(pCodec->m_pDecodeBuf, row_buf, pCodec->m_ScanlineSize);
int src_top = pCodec->m_clipBox.top;
int src_bottom = pCodec->m_clipBox.bottom;
int des_top = pCodec->m_startY;
@@ -864,7 +864,7 @@ void CCodec_ProgressiveDecoder::ResampleVertBT(CFX_DIBitmap* pDeviceBitmap, doub
while (++des_row < des_bottom) {
uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
FX_DWORD size = m_sizeX * des_Bpp;
- FXSYS_memcpy32(scan_des, scan_src, size);
+ FXSYS_memcpy(scan_des, scan_src, size);
}
return;
}
@@ -945,7 +945,7 @@ FX_BOOL CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
m_status = FXCODEC_STATUS_ERR_MEMORY;
return FALSE;
}
- FXSYS_memset32(m_pSrcBuf, 0, size);
+ FXSYS_memset(m_pSrcBuf, 0, size);
m_SrcSize = size;
switch(imageType) {
case FXCODEC_IMAGE_BMP: {
@@ -993,7 +993,7 @@ FX_BOOL CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
m_status = FXCODEC_STATUS_ERR_MEMORY;
return FALSE;
}
- FXSYS_memcpy32(m_pSrcPalette, pPalette, m_SrcPaletteNumber * sizeof(FX_DWORD));
+ FXSYS_memcpy(m_pSrcPalette, pPalette, m_SrcPaletteNumber * sizeof(FX_DWORD));
}
return TRUE;
}
@@ -1084,7 +1084,7 @@ FX_BOOL CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
m_status = FXCODEC_STATUS_ERR_MEMORY;
return FALSE;
}
- FXSYS_memset32(m_pSrcBuf, 0, input_size);
+ FXSYS_memset(m_pSrcBuf, 0, input_size);
m_SrcSize = input_size;
}
bResult = m_pFile->ReadBlock(m_pSrcBuf, m_offSet, input_size);
@@ -1466,7 +1466,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];
des_g += pixel_weight * src_scan[j];
}
- FXSYS_memset8(des_scan, (uint8_t)(des_g >> 16), 3);
+ FXSYS_memset(des_scan, (uint8_t)(des_g >> 16), 3);
des_scan += des_Bpp;
}
break;
@@ -1585,7 +1585,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
while (++des_row < des_bottom) {
uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
FX_DWORD size = m_sizeX * des_Bpp;
- FXSYS_memcpy32(scan_des, scan_src, size);
+ FXSYS_memcpy(scan_des, scan_src, size);
}
}
return;
@@ -1656,7 +1656,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
while (++des_row < des_bottom) {
uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
FX_DWORD size = m_sizeX * des_Bpp;
- FXSYS_memcpy32(scan_des, scan_src, size);
+ FXSYS_memcpy(scan_des, scan_src, size);
}
}
return;
@@ -1670,7 +1670,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
}
uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row + i) + des_ScanOffet;
FX_DWORD size = m_sizeX * des_Bpp;
- FXSYS_memcpy32(scan_des, scan_src, size);
+ FXSYS_memcpy(scan_des, scan_src, size);
}
}
}
@@ -1815,7 +1815,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(CFX_DIBitmap* pDIBitmap,
m_pFile = NULL;
return m_status = FXCODEC_STATUS_ERR_MEMORY;
}
- FXSYS_memset32(m_pDecodeBuf, 0, scanline_size);
+ FXSYS_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());
switch(m_SrcComponents) {
@@ -1884,7 +1884,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(CFX_DIBitmap* pDIBitmap,
m_pFile = NULL;
return m_status = FXCODEC_STATUS_ERR_MEMORY;
}
- FXSYS_memset32(m_pDecodeBuf, 0, scanline_size);
+ FXSYS_memset(m_pDecodeBuf, 0, scanline_size);
m_WeightHorzOO.Calc(m_sizeX, m_clipBox.Width(), m_bInterpol);
m_WeightVert.Calc(m_sizeY, m_clipBox.Height());
return m_status = FXCODEC_STATUS_DECODE_TOBECONTINUE;
@@ -1910,7 +1910,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(CFX_DIBitmap* pDIBitmap,
m_pFile = NULL;
return m_status = FXCODEC_STATUS_ERR_MEMORY;
}
- FXSYS_memset32(m_pDecodeBuf, 0, scanline_size);
+ FXSYS_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());
m_FrameCur = frames;
@@ -1947,7 +1947,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(CFX_DIBitmap* pDIBitmap,
m_pFile = NULL;
return m_status = FXCODEC_STATUS_ERR_MEMORY;
}
- FXSYS_memset32(m_pDecodeBuf, 0, m_ScanlineSize);
+ FXSYS_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());
return m_status = FXCODEC_STATUS_DECODE_TOBECONTINUE;
@@ -2018,7 +2018,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause)
m_pFile = NULL;
return m_status = FXCODEC_STATUS_ERR_MEMORY;
}
- FXSYS_memset32(m_pSrcBuf, 0, input_size);
+ FXSYS_memset(m_pSrcBuf, 0, input_size);
m_SrcSize = input_size;
}
FX_BOOL bResult = m_pFile->ReadBlock(m_pSrcBuf, m_offSet, input_size);
diff --git a/core/src/fxcodec/codec/fx_codec_tiff.cpp b/core/src/fxcodec/codec/fx_codec_tiff.cpp
index d057ff8020..13909476d1 100644
--- a/core/src/fxcodec/codec/fx_codec_tiff.cpp
+++ b/core/src/fxcodec/codec/fx_codec_tiff.cpp
@@ -160,15 +160,15 @@ void* _TIFFrealloc(void* ptr, tmsize_t size)
}
void _TIFFmemset(void* ptr, int val, tmsize_t size)
{
- FXSYS_memset8(ptr, val, (size_t)size);
+ FXSYS_memset(ptr, val, (size_t)size);
}
void _TIFFmemcpy(void* des, const void* src, tmsize_t size)
{
- FXSYS_memcpy32(des, src, (size_t)size);
+ FXSYS_memcpy(des, src, (size_t)size);
}
int _TIFFmemcmp(const void* ptr1, const void* ptr2, tmsize_t size)
{
- return FXSYS_memcmp32(ptr1, ptr2, (size_t)size);
+ return FXSYS_memcmp(ptr1, ptr2, (size_t)size);
}
static void _tiff_warning_ext(thandle_t context, const char* module, const char* fmt, va_list ap)
{
@@ -228,7 +228,7 @@ void CCodec_TiffContext::GetFrames(int32_t& frames)
if (size && buf) {\
(key) = FX_Alloc(uint8_t,size);\
if ((key)) {\
- FXSYS_memcpy32((key),buf,size);\
+ FXSYS_memcpy((key),buf,size);\
pExif->m_TagVal.SetAt(tag,(key));}}}\
(key) = NULL;
template <class T>
@@ -260,7 +260,7 @@ static void Tiff_Exif_GetStringInfo(TIFF* tif_ctx, ttag_t tag, CFX_DIBAttributeE
if ((key) == NULL) {
return;
}
- FXSYS_memcpy32((key), buf, size);
+ FXSYS_memcpy((key), buf, size);
key[size] = 0;
pExif->m_TagVal.SetAt(tag, (key));
}
diff --git a/core/src/fxcodec/fx_zlib/zlib_v128/zutil.h b/core/src/fxcodec/fx_zlib/zlib_v128/zutil.h
index 582d1b5f3c..e4ec2bdd91 100644
--- a/core/src/fxcodec/fx_zlib/zlib_v128/zutil.h
+++ b/core/src/fxcodec/fx_zlib/zlib_v128/zutil.h
@@ -207,9 +207,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define zmemcmp _fmemcmp
# define zmemzero(dest, len) _fmemset(dest, 0, len)
# else
-# define zmemcpy FXSYS_memcpy32
-# define zmemcmp FXSYS_memcmp32
-# define zmemzero(dest, len) FXSYS_memset32(dest, 0, len)
+# define zmemcpy FXSYS_memcpy
+# define zmemcmp FXSYS_memcmp
+# define zmemzero(dest, len) FXSYS_memset(dest, 0, len)
# endif
#else
void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
diff --git a/core/src/fxcodec/jbig2/JBig2_Define.h b/core/src/fxcodec/jbig2/JBig2_Define.h
index cc1e3904bd..f3bdd5a620 100644
--- a/core/src/fxcodec/jbig2/JBig2_Define.h
+++ b/core/src/fxcodec/jbig2/JBig2_Define.h
@@ -7,9 +7,9 @@
#ifndef _JBIG2_DEFINE_H_
#define _JBIG2_DEFINE_H_
#include "../../../include/fxcrt/fx_system.h"
-#define JBIG2_memset FXSYS_memset8
-#define JBIG2_memcmp FXSYS_memcmp32
-#define JBIG2_memcpy FXSYS_memcpy32
+#define JBIG2_memset FXSYS_memset
+#define JBIG2_memcmp FXSYS_memcmp
+#define JBIG2_memcpy FXSYS_memcpy
#include "JBig2_Object.h"
#define JBIG2_OOB 1
typedef struct {
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
index bad595e6b7..929180e0b5 100644
--- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
@@ -2376,7 +2376,7 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecod
}
JBIG2_ALLOC(IAID, CJBig2_ArithIaidDecoder((uint8_t)nTmp));
SDNEWSYMS = (CJBig2_Image**)m_pModule->JBig2_Malloc2(SDNUMNEWSYMS, sizeof(CJBig2_Image*));
- FXSYS_memset32(SDNEWSYMS, 0 , SDNUMNEWSYMS * sizeof(CJBig2_Image*));
+ FXSYS_memset(SDNEWSYMS, 0 , SDNUMNEWSYMS * sizeof(CJBig2_Image*));
HCHEIGHT = 0;
NSYMSDECODED = 0;
while(NSYMSDECODED < SDNUMNEWSYMS) {
@@ -2699,12 +2699,12 @@ CJBig2_SymbolDict *CJBig2_SDDProc::decode_Huffman(CJBig2_BitStream *pStream,
CJBig2_SymbolDict *pDict;
JBIG2_ALLOC(pHuffmanDecoder, CJBig2_HuffmanDecoder(pStream));
SDNEWSYMS = (CJBig2_Image**)m_pModule->JBig2_Malloc2(SDNUMNEWSYMS, sizeof(CJBig2_Image*));
- FXSYS_memset32(SDNEWSYMS, 0 , SDNUMNEWSYMS * sizeof(CJBig2_Image*));
+ FXSYS_memset(SDNEWSYMS, 0 , SDNUMNEWSYMS * sizeof(CJBig2_Image*));
SDNEWSYMWIDTHS = NULL;
BHC = NULL;
if(SDREFAGG == 0) {
SDNEWSYMWIDTHS = (FX_DWORD *)m_pModule->JBig2_Malloc2(SDNUMNEWSYMS, sizeof(FX_DWORD));
- FXSYS_memset32(SDNEWSYMWIDTHS, 0 , SDNUMNEWSYMS * sizeof(FX_DWORD));
+ FXSYS_memset(SDNEWSYMWIDTHS, 0 , SDNUMNEWSYMS * sizeof(FX_DWORD));
}
HCHEIGHT = 0;
NSYMSDECODED = 0;
diff --git a/core/src/fxcodec/lbmp/fx_bmp.cpp b/core/src/fxcodec/lbmp/fx_bmp.cpp
index 986a3272c4..7553ec7fac 100644
--- a/core/src/fxcodec/lbmp/fx_bmp.cpp
+++ b/core/src/fxcodec/lbmp/fx_bmp.cpp
@@ -37,7 +37,7 @@ bmp_decompress_struct_p _bmp_create_decompress()
if(bmp_ptr == NULL) {
return NULL;
}
- FXSYS_memset32(bmp_ptr, 0, sizeof(bmp_decompress_struct));
+ FXSYS_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;
@@ -199,7 +199,7 @@ int32_t _bmp_read_header(bmp_decompress_struct_p bmp_ptr)
}
bmp_ptr->out_row_buffer = FX_Alloc(uint8_t, bmp_ptr->out_row_bytes);
BMP_PTR_NOT_NULL(bmp_ptr->out_row_buffer, bmp_ptr);
- FXSYS_memset32(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ FXSYS_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) {
@@ -362,7 +362,7 @@ int32_t _bmp_decode_rgb(bmp_decompress_struct_p bmp_ptr)
case 8:
case 24:
case 32:
- FXSYS_memcpy32(bmp_ptr->out_row_buffer, des_buf, bmp_ptr->src_row_bytes);
+ FXSYS_memcpy(bmp_ptr->out_row_buffer, des_buf, bmp_ptr->src_row_bytes);
break;
}
row_buf = bmp_ptr->out_row_buffer;
@@ -400,7 +400,7 @@ int32_t _bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr)
bmp_ptr->imgTB_flag ? bmp_ptr->row_num++ : (bmp_ptr->height - 1 - bmp_ptr->row_num++),
bmp_ptr->out_row_buffer);
bmp_ptr->col_num = 0;
- FXSYS_memset32(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ FXSYS_memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
_bmp_save_decoding_status(bmp_ptr, BMP_D_STATUS_DATA);
continue;
}
@@ -426,7 +426,7 @@ int32_t _bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr)
return 0;
}
while(bmp_ptr->row_num < bmp_row_num_next) {
- FXSYS_memset32(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ FXSYS_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++ : (bmp_ptr->height - 1 - bmp_ptr->row_num++),
bmp_ptr->out_row_buffer);
@@ -443,7 +443,7 @@ int32_t _bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr)
bmp_ptr->skip_size = skip_size_org;
return 2;
}
- FXSYS_memcpy32(bmp_ptr->out_row_buffer + bmp_ptr->col_num, second_byte_ptr, *first_byte_ptr);
+ FXSYS_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);
}
}
@@ -458,7 +458,7 @@ int32_t _bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr)
_bmp_error(bmp_ptr, "The Bmp File Is Corrupt");
return 0;
}
- FXSYS_memset8(bmp_ptr->out_row_buffer + bmp_ptr->col_num, *second_byte_ptr, *first_byte_ptr);
+ FXSYS_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);
}
}
@@ -493,7 +493,7 @@ int32_t _bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr)
bmp_ptr->imgTB_flag ? bmp_ptr->row_num++ : (bmp_ptr->height - 1 - bmp_ptr->row_num++),
bmp_ptr->out_row_buffer);
bmp_ptr->col_num = 0;
- FXSYS_memset32(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ FXSYS_memset(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
_bmp_save_decoding_status(bmp_ptr, BMP_D_STATUS_DATA);
continue;
}
@@ -519,7 +519,7 @@ int32_t _bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr)
return 0;
}
while(bmp_ptr->row_num < bmp_row_num_next) {
- FXSYS_memset32(bmp_ptr->out_row_buffer, 0, bmp_ptr->out_row_bytes);
+ FXSYS_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++ : (bmp_ptr->height - 1 - bmp_ptr->row_num++),
bmp_ptr->out_row_buffer);
@@ -614,7 +614,7 @@ bmp_compress_struct_p _bmp_create_compress()
bmp_compress_struct_p bmp_ptr;
bmp_ptr = FX_Alloc(bmp_compress_struct, 1);
if (bmp_ptr) {
- FXSYS_memset32(bmp_ptr, 0, sizeof(bmp_compress_struct));
+ FXSYS_memset(bmp_ptr, 0, sizeof(bmp_compress_struct));
}
return bmp_ptr;
}
@@ -683,7 +683,7 @@ static void _bmp_encode_bitfields(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_b
if (dst_buf == NULL) {
return;
}
- FXSYS_memset32(&dst_buf[dst_pos], 0, size);
+ FXSYS_memset(&dst_buf[dst_pos], 0, size);
FX_DWORD mask_red;
FX_DWORD mask_green;
FX_DWORD mask_blue;
@@ -770,9 +770,9 @@ static void _bmp_encode_rgb(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, FX
if (dst_buf == NULL) {
return;
}
- FXSYS_memset32(&dst_buf[dst_pos], 0, size);
+ FXSYS_memset(&dst_buf[dst_pos], 0, size);
for (int32_t row_num = bmp_ptr->src_row - 1; row_num > -1; row_num--) {
- FXSYS_memcpy32(&dst_buf[dst_pos], &bmp_ptr->src_buf[row_num * bmp_ptr->src_pitch], bmp_ptr->src_pitch);
+ FXSYS_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;
@@ -800,7 +800,7 @@ static void _bmp_encode_rle8(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, F
if (dst_buf == NULL) {
return;
}
- FXSYS_memset32(&dst_buf[dst_pos], 0, size);
+ FXSYS_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);
@@ -848,7 +848,7 @@ static void _bmp_encode_rle4(bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, F
if (dst_buf == NULL) {
return;
}
- FXSYS_memset32(&dst_buf[dst_pos], 0, size);
+ FXSYS_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;
rle[0] = _bmp_rle4_search(&bmp_ptr->src_buf[index + i], size - index - i);
@@ -886,10 +886,10 @@ FX_BOOL _bmp_encode_image( bmp_compress_struct_p bmp_ptr, uint8_t*& dst_buf, FX_
if (dst_buf == NULL) {
return FALSE;
}
- FXSYS_memset32(dst_buf, 0, dst_size);
+ FXSYS_memset(dst_buf, 0, dst_size);
bmp_ptr->file_header.bfOffBits = head_size;
if (bmp_ptr->pal_ptr && pal_size) {
- FXSYS_memcpy32(&dst_buf[head_size], bmp_ptr->pal_ptr, pal_size);
+ FXSYS_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/src/fxcodec/lcms2/lcms2-2.6/src/cmserr.c b/core/src/fxcodec/lcms2/lcms2-2.6/src/cmserr.c
index 964182ae38..a32b6e2303 100644
--- a/core/src/fxcodec/lcms2/lcms2-2.6/src/cmserr.c
+++ b/core/src/fxcodec/lcms2/lcms2-2.6/src/cmserr.c
@@ -269,7 +269,7 @@ void* CMSEXPORT _cmsMalloc(cmsContext ContextID, cmsUInt32Number size)
void* CMSEXPORT _cmsMallocZero(cmsContext ContextID, cmsUInt32Number size)
{
void* p = FXMEM_DefaultAlloc(size, 1);
- if (p) FXSYS_memset32(p, 0, size);
+ if (p) FXSYS_memset(p, 0, size);
return p;
}
@@ -299,7 +299,7 @@ void CMSEXPORT _cmsFree(cmsContext ContextID, void* Ptr)
void* CMSEXPORT _cmsDupMem(cmsContext ContextID, const void* Org, cmsUInt32Number size)
{
void* p = FXMEM_DefaultAlloc(size, 1);
- FXSYS_memmove32(p, Org, size);
+ FXSYS_memmove(p, Org, size);
return p;
}
diff --git a/core/src/fxcodec/lgif/fx_gif.cpp b/core/src/fxcodec/lgif/fx_gif.cpp
index 29e99f2abf..6d22f58c16 100644
--- a/core/src/fxcodec/lgif/fx_gif.cpp
+++ b/core/src/fxcodec/lgif/fx_gif.cpp
@@ -32,8 +32,8 @@ void CGifLZWDecoder::ClearTable()
code_size_cur = code_size + 1;
code_next = code_end + 1;
code_old = (FX_WORD) - 1;
- FXSYS_memset32(code_table, 0, sizeof(tag_Table)*GIF_MAX_LZW_CODE);
- FXSYS_memset32(stack, 0, GIF_MAX_LZW_CODE);
+ FXSYS_memset(code_table, 0, sizeof(tag_Table)*GIF_MAX_LZW_CODE);
+ FXSYS_memset(stack, 0, GIF_MAX_LZW_CODE);
for (FX_WORD i = 0; i < code_clear; i++) {
code_table[i].suffix = (uint8_t)i;
}
@@ -73,11 +73,11 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size)
FX_DWORD i = 0;
if(stack_size != 0) {
if(des_size < stack_size) {
- FXSYS_memcpy32(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size);
+ FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size);
stack_size -= (FX_WORD)des_size;
return 3;
}
- FXSYS_memcpy32(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
+ FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
des_buf += stack_size;
i += stack_size;
stack_size = 0;
@@ -127,11 +127,11 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size)
}
code_old = code;
if(i + stack_size > des_size) {
- FXSYS_memcpy32(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size - i);
+ FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size - i);
stack_size -= (FX_WORD)(des_size - i);
return 3;
}
- FXSYS_memcpy32(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
+ FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
des_buf += stack_size;
i += stack_size;
stack_size = 0;
@@ -159,7 +159,7 @@ static FX_BOOL _gif_grow_buf(uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD size
return FALSE;
}
}
- FXSYS_memset32(dst_buf + len_org, 0, dst_len - len_org);
+ FXSYS_memset(dst_buf + len_org, 0, dst_len - len_org);
return dst_buf != NULL;
}
return TRUE;
@@ -191,7 +191,7 @@ static inline uint8_t _gif_cut_buf(const uint8_t* buf, FX_DWORD& offset, uint8_t
}
CGifLZWEncoder::CGifLZWEncoder()
{
- FXSYS_memset32(this, 0, sizeof(CGifLZWEncoder));
+ FXSYS_memset(this, 0, sizeof(CGifLZWEncoder));
}
CGifLZWEncoder::~CGifLZWEncoder()
{
@@ -231,9 +231,9 @@ void CGifLZWEncoder::WriteBlock(uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD&
longjmp(jmp, 1);
}
dst_buf[offset++] = index_buf_len;
- FXSYS_memcpy32(&dst_buf[offset], index_buf, index_buf_len);
+ FXSYS_memcpy(&dst_buf[offset], index_buf, index_buf_len);
offset += index_buf_len;
- FXSYS_memset32(index_buf, 0, GIF_DATA_BLOCK);
+ FXSYS_memset(index_buf, 0, GIF_DATA_BLOCK);
index_buf_len = 0;
}
void CGifLZWEncoder::EncodeString( FX_DWORD index, uint8_t*& dst_buf, FX_DWORD& dst_len, FX_DWORD& offset )
@@ -340,7 +340,7 @@ gif_decompress_struct_p _gif_create_decompress()
if(gif_ptr == NULL) {
return NULL;
}
- FXSYS_memset32(gif_ptr, 0, sizeof(gif_decompress_struct));
+ FXSYS_memset(gif_ptr, 0, sizeof(gif_decompress_struct));
gif_ptr->decode_status = GIF_D_STATUS_SIG;
gif_ptr->img_ptr_arr_ptr = new CFX_ArrayTemplate<GifImage*>;
#ifdef GIF_SUPPORT_COMMENT_EXTENSION
@@ -427,7 +427,7 @@ gif_compress_struct_p _gif_create_compress()
if (gif_ptr == NULL) {
return NULL;
}
- FXSYS_memset32(gif_ptr, 0, sizeof(gif_compress_struct));
+ FXSYS_memset(gif_ptr, 0, sizeof(gif_compress_struct));
gif_ptr->img_encoder_ptr = new CGifLZWEncoder;
gif_ptr->header_ptr = (GifHeader*)FX_Alloc(uint8_t, sizeof(GifHeader));
if (gif_ptr->header_ptr == NULL) {
@@ -435,8 +435,8 @@ gif_compress_struct_p _gif_create_compress()
FX_Free(gif_ptr);
return NULL;
}
- FXSYS_memcpy32(gif_ptr->header_ptr->signature, GIF_SIGNATURE, 3);
- FXSYS_memcpy32(gif_ptr->header_ptr->version, "89a", 3);
+ FXSYS_memcpy(gif_ptr->header_ptr->signature, GIF_SIGNATURE, 3);
+ FXSYS_memcpy(gif_ptr->header_ptr->version, "89a", 3);
gif_ptr->lsd_ptr = (GifLSD*)FX_Alloc(uint8_t, sizeof(GifLSD));
if (gif_ptr->lsd_ptr == NULL) {
FX_Free(gif_ptr->header_ptr);
@@ -444,7 +444,7 @@ gif_compress_struct_p _gif_create_compress()
FX_Free(gif_ptr);
return NULL;
}
- FXSYS_memset32(gif_ptr->lsd_ptr, 0, sizeof(GifLSD));
+ FXSYS_memset(gif_ptr->lsd_ptr, 0, sizeof(GifLSD));
gif_ptr->image_info_ptr = (GifImageInfo*)FX_Alloc(uint8_t, sizeof(GifImageInfo));
if (gif_ptr->image_info_ptr == NULL) {
FX_Free(gif_ptr->lsd_ptr);
@@ -453,10 +453,10 @@ gif_compress_struct_p _gif_create_compress()
FX_Free(gif_ptr);
return NULL;
}
- FXSYS_memset32(gif_ptr->image_info_ptr, 0, sizeof(GifImageInfo));
+ FXSYS_memset(gif_ptr->image_info_ptr, 0, sizeof(GifImageInfo));
#ifdef GIF_SUPPORT_APPLICATION_EXTENSION
- FXSYS_memcpy32(gif_ptr->app_identify, "netscape", 8);
- FXSYS_memcpy32(gif_ptr->app_authentication, "2.0", 3);
+ FXSYS_memcpy(gif_ptr->app_identify, "netscape", 8);
+ FXSYS_memcpy(gif_ptr->app_authentication, "2.0", 3);
#endif
#ifdef GIF_SUPPORT_GRAPHIC_CONTROL_EXTENSION
gif_ptr->gce_ptr = (GifGCE*)FX_Alloc(uint8_t, sizeof(GifGCE));
@@ -480,7 +480,7 @@ gif_compress_struct_p _gif_create_compress()
FX_Free(gif_ptr);
return NULL;
}
- FXSYS_memset32(gif_ptr->pte_ptr, 0, sizeof(GifPTE));
+ FXSYS_memset(gif_ptr->pte_ptr, 0, sizeof(GifPTE));
gif_ptr->pte_ptr->block_size = 12;
#endif
return gif_ptr;
@@ -579,7 +579,7 @@ int32_t _gif_read_header(gif_decompress_struct_p gif_ptr)
gif_ptr->global_pal_ptr = NULL;
gif_ptr->global_pal_ptr = (GifPalette*)FX_Alloc(uint8_t, global_pal_size);
GIF_PTR_NOT_NULL(gif_ptr->global_pal_ptr, gif_ptr);
- FXSYS_memcpy32(gif_ptr->global_pal_ptr, global_pal_ptr, global_pal_size);
+ FXSYS_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);
@@ -736,8 +736,8 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
}
gif_ae_data_str += CFX_ByteString((const uint8_t*)data_ptr, data_size);
}
- FXSYS_memcpy32(gif_ptr->app_identify, gif_ae_ptr->app_identify, 8);
- FXSYS_memcpy32(gif_ptr->app_authentication, gif_ae_ptr->app_authentication, 3);
+ FXSYS_memcpy(gif_ptr->app_identify, gif_ae_ptr->app_identify, 8);
+ FXSYS_memcpy(gif_ptr->app_authentication, gif_ae_ptr->app_authentication, 3);
gif_ptr->app_data_size = gif_ae_data_str.GetLength();
if(gif_ptr->app_data != NULL) {
FX_Free(gif_ptr->app_data);
@@ -745,7 +745,7 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
}
gif_ptr->app_data = FX_Alloc(uint8_t, gif_ptr->app_data_size);
GIF_PTR_NOT_NULL(gif_ptr->app_data, gif_ptr);
- FXSYS_memcpy32(gif_ptr->app_data, const uint8_t*(gif_ae_data_str), gif_ptr->app_data_size);
+ FXSYS_memcpy(gif_ptr->app_data, const uint8_t*(gif_ae_data_str), gif_ptr->app_data_size);
}
break;
#endif
@@ -777,7 +777,7 @@ int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr)
}
GifPlainText* gif_pt_ptr = FX_Alloc(GifPlainText, 1);
GIF_PTR_NOT_NULL(gif_pt_ptr, gif_ptr);
- FXSYS_memset32(gif_pt_ptr, 0, sizeof(GifPlainText));
+ FXSYS_memset(gif_pt_ptr, 0, sizeof(GifPlainText));
_gif_takeover_gce_ptr(gif_ptr, &gif_pt_ptr->gce_ptr);
gif_pt_ptr->pte_ptr = (GifPTE*)FX_Alloc(uint8_t, sizeof(GifPTE));
GIF_PTR_NOT_NULL(gif_pt_ptr->pte_ptr, gif_ptr);
@@ -891,7 +891,7 @@ int32_t _gif_decode_image_info(gif_decompress_struct_p gif_ptr)
}
GifImage* gif_image_ptr = (GifImage*)FX_Alloc(uint8_t, sizeof(GifImage));
GIF_PTR_NOT_NULL(gif_image_ptr, gif_ptr);
- FXSYS_memset32(gif_image_ptr, 0, sizeof(GifImage));
+ FXSYS_memset(gif_image_ptr, 0, sizeof(GifImage));
gif_image_ptr->image_info_ptr = (GifImageInfo*)FX_Alloc(uint8_t, sizeof(GifImageInfo));
GIF_PTR_NOT_NULL(gif_image_ptr->image_info_ptr, gif_ptr);
gif_image_ptr->image_info_ptr->left = _GetWord_LSBFirst((uint8_t*)&gif_img_info_ptr->left);
@@ -929,7 +929,7 @@ int32_t _gif_decode_image_info(gif_decompress_struct_p gif_ptr)
}
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 != NULL) {
- FXSYS_memcpy32((uint8_t*)gif_image_ptr->local_pal_ptr, loc_pal_ptr, loc_pal_size);
+ FXSYS_memcpy((uint8_t*)gif_image_ptr->local_pal_ptr, loc_pal_ptr, loc_pal_size);
}
}
uint8_t* code_size_ptr = NULL;
@@ -1151,8 +1151,8 @@ static FX_BOOL _gif_write_header( gif_compress_struct_p gif_ptr, uint8_t*& dst_b
if (dst_buf == NULL) {
return FALSE;
}
- FXSYS_memset32(dst_buf, 0, dst_len);
- FXSYS_memcpy32(dst_buf, gif_ptr->header_ptr, sizeof(GifHeader));
+ FXSYS_memset(dst_buf, 0, dst_len);
+ FXSYS_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;
@@ -1166,7 +1166,7 @@ static FX_BOOL _gif_write_header( gif_compress_struct_p gif_ptr, uint8_t*& dst_b
if (!_gif_grow_buf(dst_buf, dst_len, gif_ptr->cur_offset + size)) {
return FALSE;
}
- FXSYS_memcpy32(&dst_buf[gif_ptr->cur_offset], gif_ptr->global_pal, size);
+ FXSYS_memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->global_pal, size);
gif_ptr->cur_offset += size;
}
return TRUE;
@@ -1192,13 +1192,13 @@ void interlace_buf(const uint8_t* buf, FX_DWORD pitch, FX_DWORD height)
if (temp == NULL) {
return;
}
- FXSYS_memcpy32(temp, &buf[pitch * row], pitch);
+ FXSYS_memcpy(temp, &buf[pitch * row], pitch);
pass[j].Add(temp);
row ++;
}
for (i = 0, row = 0; i < 4; i++) {
for (j = 0; j < pass[i].GetSize(); j++, row++) {
- FXSYS_memcpy32((uint8_t*)&buf[pitch * row], pass[i].GetAt(j), pitch);
+ FXSYS_memcpy((uint8_t*)&buf[pitch * row], pass[i].GetAt(j), pitch);
FX_Free(pass[i].GetAt(j));
}
}
@@ -1208,13 +1208,13 @@ static void _gif_write_block_data(const uint8_t* src_buf, FX_DWORD src_len, uint
FX_DWORD src_offset = 0;
while (src_len > GIF_DATA_BLOCK) {
dst_buf[dst_offset++] = GIF_DATA_BLOCK;
- FXSYS_memcpy32(&dst_buf[dst_offset], &src_buf[src_offset], GIF_DATA_BLOCK);
+ FXSYS_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_memcpy32(&dst_buf[dst_offset], &src_buf[src_offset], src_len);
+ FXSYS_memcpy(&dst_buf[dst_offset], &src_buf[src_offset], src_len);
dst_offset += src_len;
}
static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf, FX_DWORD& dst_len )
@@ -1223,7 +1223,7 @@ static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf
return FALSE;
}
#ifdef GIF_SUPPORT_GRAPHIC_CONTROL_EXTENSION
- if (FXSYS_memcmp32(gif_ptr->header_ptr->version, "89a", 3) == 0) {
+ if (FXSYS_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;
@@ -1254,7 +1254,7 @@ static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf
if (!_gif_grow_buf(dst_buf, dst_len, pal_size + gif_ptr->cur_offset)) {
return FALSE;
}
- FXSYS_memcpy32(&dst_buf[gif_ptr->cur_offset], gif_ptr->local_pal, pal_size);
+ FXSYS_memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->local_pal, pal_size);
gif_ptr->cur_offset += pal_size;
}
if (lf.interlace) {
@@ -1276,7 +1276,7 @@ static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf
gif_ptr->img_encoder_ptr->Finish(dst_buf, dst_len, gif_ptr->cur_offset);
dst_buf[gif_ptr->cur_offset++] = 0;
#ifdef GIF_SUPPORT_COMMENT_EXTENSION
- if (FXSYS_memcmp32(gif_ptr->header_ptr->version, "89a", 3) == 0 && gif_ptr->cmt_data_ptr) {
+ if (FXSYS_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;
_gif_write_block_data(gif_ptr->cmt_data_ptr, gif_ptr->cmt_data_len, dst_buf, dst_len, gif_ptr->cur_offset);
@@ -1284,7 +1284,7 @@ static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf
}
#endif
#ifdef GIF_SUPPORT_PLAIN_TEXT_EXTENSION
- if (FXSYS_memcmp32(gif_ptr->header_ptr->version, "89a", 3) == 0 && gif_ptr->pte_data_ptr) {
+ if (FXSYS_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;
dst_buf[gif_ptr->cur_offset++] = gif_ptr->pte_ptr->block_size;
@@ -1310,15 +1310,15 @@ static FX_BOOL _gif_write_data( gif_compress_struct_p gif_ptr, uint8_t*& dst_buf
}
#endif
#ifdef GIF_SUPPORT_APPLICATION_EXTENSION
- if (FXSYS_memcmp32(gif_ptr->header_ptr->version, "89a", 3) == 0 && gif_ptr->app_data) {
+ if (FXSYS_memcmp(gif_ptr->header_ptr->version, "89a", 3) == 0 && gif_ptr->app_data) {
dst_buf[gif_ptr->cur_offset++] = GIF_SIG_EXTENSION;
dst_buf[gif_ptr->cur_offset++] = GIF_BLOCK_AE;
dst_buf[gif_ptr->cur_offset++] = 11;
- FXSYS_memcpy32(&dst_buf[gif_ptr->cur_offset], gif_ptr->app_identify, 8);
+ FXSYS_memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->app_identify, 8);
gif_ptr->cur_offset += 8;
- FXSYS_memcpy32(&dst_buf[gif_ptr->cur_offset], gif_ptr->app_authentication, 8);
+ FXSYS_memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->app_authentication, 8);
gif_ptr->cur_offset += 3;
- FXSYS_memcpy32(&dst_buf[gif_ptr->cur_offset], gif_ptr->app_data, gif_ptr->app_data_size);
+ FXSYS_memcpy(&dst_buf[gif_ptr->cur_offset], gif_ptr->app_data, gif_ptr->app_data_size);
gif_ptr->cur_offset += gif_ptr->app_data_size;
dst_buf[gif_ptr->cur_offset++] = 0;
}
diff --git a/core/src/fxcodec/libjpeg/jinclude.h b/core/src/fxcodec/libjpeg/jinclude.h
index 0c7aa68360..5cfc6e1fc9 100644
--- a/core/src/fxcodec/libjpeg/jinclude.h
+++ b/core/src/fxcodec/libjpeg/jinclude.h
@@ -75,8 +75,8 @@
#else /* not BSD, assume ANSI/SysV string lib */
//#include <string.h>
-#define MEMZERO(target,size) FXSYS_memset32((void *)(target), 0, (size_t)(size))
-#define MEMCOPY(dest,src,size) FXSYS_memcpy32((void *)(dest), (const void *)(src), (size_t)(size))
+#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))
#endif
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
index 869cf30aad..e83671a670 100644
--- a/core/src/fxcrt/extension.h
+++ b/core/src/fxcrt/extension.h
@@ -278,7 +278,7 @@ public:
m_nCurPos = newPos.ValueOrDie();
if (m_dwFlags & FX_MEMSTREAM_Consecutive) {
- FXSYS_memcpy32(buffer, (uint8_t*)m_Blocks[0] + (size_t)offset, size);
+ FXSYS_memcpy(buffer, (uint8_t*)m_Blocks[0] + (size_t)offset, size);
return TRUE;
}
size_t nStartBlock = (size_t)offset / m_nGrowSize;
@@ -288,7 +288,7 @@ public:
if (nRead > size) {
nRead = size;
}
- FXSYS_memcpy32(buffer, (uint8_t*)m_Blocks[(int)nStartBlock] + (size_t)offset, nRead);
+ FXSYS_memcpy(buffer, (uint8_t*)m_Blocks[(int)nStartBlock] + (size_t)offset, nRead);
buffer = ((uint8_t*)buffer) + nRead;
size -= nRead;
nStartBlock ++;
@@ -341,7 +341,7 @@ public:
return FALSE;
}
}
- FXSYS_memcpy32((uint8_t*)m_Blocks[0] + (size_t)offset, buffer, size);
+ FXSYS_memcpy((uint8_t*)m_Blocks[0] + (size_t)offset, buffer, size);
if (m_nCurSize < m_nCurPos) {
m_nCurSize = m_nCurPos;
}
@@ -365,7 +365,7 @@ public:
if (nWrite > size) {
nWrite = size;
}
- FXSYS_memcpy32((uint8_t*)m_Blocks[(int)nStartBlock] + (size_t)offset, buffer, nWrite);
+ FXSYS_memcpy((uint8_t*)m_Blocks[(int)nStartBlock] + (size_t)offset, buffer, nWrite);
buffer = ((uint8_t*)buffer) + nWrite;
size -= nWrite;
nStartBlock ++;
diff --git a/core/src/fxcrt/fx_basic_array.cpp b/core/src/fxcrt/fx_basic_array.cpp
index d21909f861..56b2f57f3c 100644
--- a/core/src/fxcrt/fx_basic_array.cpp
+++ b/core/src/fxcrt/fx_basic_array.cpp
@@ -42,7 +42,7 @@ FX_BOOL CFX_BasicArray::SetSize(int nNewSize)
m_nSize = m_nMaxSize = nNewSize;
} else if (nNewSize <= m_nMaxSize) {
if (nNewSize > m_nSize) {
- FXSYS_memset32(m_pData + m_nSize * m_nUnitSize, 0, (nNewSize - m_nSize) * m_nUnitSize);
+ FXSYS_memset(m_pData + m_nSize * m_nUnitSize, 0, (nNewSize - m_nSize) * m_nUnitSize);
}
m_nSize = nNewSize;
} else {
@@ -56,7 +56,7 @@ FX_BOOL CFX_BasicArray::SetSize(int nNewSize)
if (pNewData == NULL) {
return FALSE;
}
- FXSYS_memset32(pNewData + m_nSize * m_nUnitSize, 0, (nNewMax - m_nSize) * m_nUnitSize);
+ FXSYS_memset(pNewData + m_nSize * m_nUnitSize, 0, (nNewMax - m_nSize) * m_nUnitSize);
m_pData = pNewData;
m_nSize = nNewSize;
m_nMaxSize = nNewMax;
@@ -72,7 +72,7 @@ FX_BOOL CFX_BasicArray::Append(const CFX_BasicArray& src)
return FALSE;
}
- FXSYS_memcpy32(m_pData + nOldSize * m_nUnitSize, src.m_pData, src.m_nSize * m_nUnitSize);
+ FXSYS_memcpy(m_pData + nOldSize * m_nUnitSize, src.m_pData, src.m_nSize * m_nUnitSize);
return TRUE;
}
FX_BOOL CFX_BasicArray::Copy(const CFX_BasicArray& src)
@@ -80,7 +80,7 @@ FX_BOOL CFX_BasicArray::Copy(const CFX_BasicArray& src)
if (!SetSize(src.m_nSize)) {
return FALSE;
}
- FXSYS_memcpy32(m_pData, src.m_pData, src.m_nSize * m_nUnitSize);
+ FXSYS_memcpy(m_pData, src.m_pData, src.m_nSize * m_nUnitSize);
return TRUE;
}
uint8_t* CFX_BasicArray::InsertSpaceAt(int nIndex, int nCount)
@@ -97,9 +97,9 @@ uint8_t* CFX_BasicArray::InsertSpaceAt(int nIndex, int nCount)
if (!SetSize(m_nSize + nCount)) {
return NULL;
}
- FXSYS_memmove32(m_pData + (nIndex + nCount)*m_nUnitSize, m_pData + nIndex * m_nUnitSize,
+ FXSYS_memmove(m_pData + (nIndex + nCount)*m_nUnitSize, m_pData + nIndex * m_nUnitSize,
(nOldSize - nIndex) * m_nUnitSize);
- FXSYS_memset32(m_pData + nIndex * m_nUnitSize, 0, nCount * m_nUnitSize);
+ FXSYS_memset(m_pData + nIndex * m_nUnitSize, 0, nCount * m_nUnitSize);
}
return m_pData + nIndex * m_nUnitSize;
}
@@ -110,7 +110,7 @@ FX_BOOL CFX_BasicArray::RemoveAt(int nIndex, int nCount)
}
int nMoveCount = m_nSize - (nIndex + nCount);
if (nMoveCount) {
- FXSYS_memmove32(m_pData + nIndex * m_nUnitSize, m_pData + (nIndex + nCount) * m_nUnitSize, nMoveCount * m_nUnitSize);
+ FXSYS_memmove(m_pData + nIndex * m_nUnitSize, m_pData + (nIndex + nCount) * m_nUnitSize, nMoveCount * m_nUnitSize);
}
m_nSize -= nCount;
return TRUE;
@@ -126,7 +126,7 @@ FX_BOOL CFX_BasicArray::InsertAt(int nStartIndex, const CFX_BasicArray* pNewArra
if (!InsertSpaceAt(nStartIndex, pNewArray->m_nSize)) {
return FALSE;
}
- FXSYS_memcpy32(m_pData + nStartIndex * m_nUnitSize, pNewArray->m_pData, pNewArray->m_nSize * m_nUnitSize);
+ FXSYS_memcpy(m_pData + nStartIndex * m_nUnitSize, pNewArray->m_pData, pNewArray->m_nSize * m_nUnitSize);
return TRUE;
}
const void* CFX_BasicArray::GetDataPtr(int index) const
diff --git a/core/src/fxcrt/fx_basic_bstring.cpp b/core/src/fxcrt/fx_basic_bstring.cpp
index c6fa998077..9f54414110 100644
--- a/core/src/fxcrt/fx_basic_bstring.cpp
+++ b/core/src/fxcrt/fx_basic_bstring.cpp
@@ -89,7 +89,7 @@ CFX_ByteString::CFX_ByteString(const FX_CHAR* lpsz, FX_STRSIZE nLen)
if (nLen) {
m_pData = StringData::Create(nLen);
if (m_pData) {
- FXSYS_memcpy32(m_pData->m_String, lpsz, nLen);
+ FXSYS_memcpy(m_pData->m_String, lpsz, nLen);
}
} else {
m_pData = NULL;
@@ -100,7 +100,7 @@ CFX_ByteString::CFX_ByteString(const uint8_t* lpsz, FX_STRSIZE nLen)
if (nLen > 0) {
m_pData = StringData::Create(nLen);
if (m_pData) {
- FXSYS_memcpy32(m_pData->m_String, lpsz, nLen);
+ FXSYS_memcpy(m_pData->m_String, lpsz, nLen);
}
} else {
m_pData = NULL;
@@ -146,8 +146,8 @@ CFX_ByteString::CFX_ByteString(const CFX_ByteStringC& str1, const CFX_ByteString
}
m_pData = StringData::Create(nNewLen);
if (m_pData) {
- FXSYS_memcpy32(m_pData->m_String, str1.GetCStr(), str1.GetLength());
- FXSYS_memcpy32(m_pData->m_String + str1.GetLength(), str2.GetCStr(), str2.GetLength());
+ FXSYS_memcpy(m_pData->m_String, str1.GetCStr(), str1.GetLength());
+ FXSYS_memcpy(m_pData->m_String + str1.GetLength(), str2.GetCStr(), str2.GetLength());
}
}
const CFX_ByteString& CFX_ByteString::operator=(const FX_CHAR* lpsz)
@@ -198,7 +198,7 @@ void CFX_ByteString::Load(const uint8_t* buf, FX_STRSIZE len)
if (len) {
m_pData = StringData::Create(len);
if (m_pData) {
- FXSYS_memcpy32(m_pData->m_String, buf, len);
+ FXSYS_memcpy(m_pData->m_String, buf, len);
}
} else {
m_pData = NULL;
@@ -241,7 +241,7 @@ bool CFX_ByteString::Equal(const char* ptr) const
return m_pData->m_nDataLength == 0;
}
return FXSYS_strlen(ptr) == m_pData->m_nDataLength &&
- FXSYS_memcmp32(ptr, m_pData->m_String, m_pData->m_nDataLength) == 0;
+ FXSYS_memcmp(ptr, m_pData->m_String, m_pData->m_nDataLength) == 0;
}
bool CFX_ByteString::Equal(const CFX_ByteStringC& str) const
{
@@ -249,7 +249,7 @@ bool CFX_ByteString::Equal(const CFX_ByteStringC& str) const
return str.IsEmpty();
}
return m_pData->m_nDataLength == str.GetLength() &&
- FXSYS_memcmp32(m_pData->m_String, str.GetCStr(), str.GetLength()) == 0;
+ FXSYS_memcmp(m_pData->m_String, str.GetCStr(), str.GetLength()) == 0;
}
bool CFX_ByteString::Equal(const CFX_ByteString& other) const
{
@@ -260,7 +260,7 @@ bool CFX_ByteString::Equal(const CFX_ByteString& other) const
return false;
}
return other.m_pData->m_nDataLength == m_pData->m_nDataLength &&
- FXSYS_memcmp32(other.m_pData->m_String,
+ FXSYS_memcmp(other.m_pData->m_String,
m_pData->m_String,
m_pData->m_nDataLength) == 0;
}
@@ -304,7 +304,7 @@ bool CFX_ByteString::EqualNoCase(const CFX_ByteStringC& str) const
void CFX_ByteString::AssignCopy(FX_STRSIZE nSrcLen, const FX_CHAR* lpszSrcData)
{
AllocBeforeWrite(nSrcLen);
- FXSYS_memcpy32(m_pData->m_String, lpszSrcData, nSrcLen);
+ FXSYS_memcpy(m_pData->m_String, lpszSrcData, nSrcLen);
m_pData->m_nDataLength = nSrcLen;
m_pData->m_String[nSrcLen] = 0;
}
@@ -318,7 +318,7 @@ void CFX_ByteString::CopyBeforeWrite()
FX_STRSIZE nDataLength = pData->m_nDataLength;
m_pData = StringData::Create(nDataLength);
if (m_pData != NULL) {
- FXSYS_memcpy32(m_pData->m_String, pData->m_String, nDataLength + 1);
+ FXSYS_memcpy(m_pData->m_String, pData->m_String, nDataLength + 1);
}
}
void CFX_ByteString::AllocBeforeWrite(FX_STRSIZE nLen)
@@ -377,7 +377,7 @@ FX_CHAR* CFX_ByteString::GetBuffer(FX_STRSIZE nMinBufLength)
if (!m_pData) {
return NULL;
}
- FXSYS_memcpy32(m_pData->m_String, pOldData->m_String, (nOldLen + 1));
+ FXSYS_memcpy(m_pData->m_String, pOldData->m_String, (nOldLen + 1));
m_pData->m_nDataLength = nOldLen;
pOldData->Release();
return m_pData->m_String;
@@ -399,7 +399,7 @@ FX_STRSIZE CFX_ByteString::Delete(FX_STRSIZE nIndex, FX_STRSIZE nCount)
}
CopyBeforeWrite();
int nBytesToCopy = nOldLength - mLength + 1;
- FXSYS_memmove32(m_pData->m_String + nIndex,
+ FXSYS_memmove(m_pData->m_String + nIndex,
m_pData->m_String + mLength, nBytesToCopy);
m_pData->m_nDataLength = nOldLength - nCount;
}
@@ -415,13 +415,13 @@ void CFX_ByteString::ConcatInPlace(FX_STRSIZE nSrcLen, const FX_CHAR* lpszSrcDat
if (!m_pData) {
return;
}
- FXSYS_memcpy32(m_pData->m_String, lpszSrcData, nSrcLen);
+ FXSYS_memcpy(m_pData->m_String, lpszSrcData, nSrcLen);
return;
}
if (m_pData->m_nRefs > 1 || m_pData->m_nDataLength + nSrcLen > m_pData->m_nAllocLength) {
ConcatCopy(m_pData->m_nDataLength, m_pData->m_String, nSrcLen, lpszSrcData);
} else {
- FXSYS_memcpy32(m_pData->m_String + m_pData->m_nDataLength, lpszSrcData, nSrcLen);
+ FXSYS_memcpy(m_pData->m_String + m_pData->m_nDataLength, lpszSrcData, nSrcLen);
m_pData->m_nDataLength += nSrcLen;
m_pData->m_String[m_pData->m_nDataLength] = 0;
}
@@ -480,7 +480,7 @@ void CFX_ByteString::AllocCopy(CFX_ByteString& dest, FX_STRSIZE nCopyLen, FX_STR
ASSERT(dest.m_pData == NULL);
dest.m_pData = StringData::Create(nCopyLen);
if (dest.m_pData) {
- FXSYS_memcpy32(dest.m_pData->m_String, m_pData->m_String + nCopyIndex, nCopyLen);
+ FXSYS_memcpy(dest.m_pData->m_String, m_pData->m_String + nCopyIndex, nCopyLen);
}
}
#define FORCE_ANSI 0x10000
@@ -726,13 +726,13 @@ FX_STRSIZE CFX_ByteString::Insert(FX_STRSIZE nIndex, FX_CHAR ch)
return 0;
}
if(pOldData != NULL) {
- FXSYS_memmove32(m_pData->m_String, pstr, (pOldData->m_nDataLength + 1));
+ FXSYS_memmove(m_pData->m_String, pstr, (pOldData->m_nDataLength + 1));
pOldData->Release();
} else {
m_pData->m_String[0] = 0;
}
}
- FXSYS_memmove32(m_pData->m_String + nIndex + 1,
+ FXSYS_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;
@@ -911,13 +911,13 @@ FX_STRSIZE CFX_ByteString::Replace(const CFX_ByteStringC& lpszOld, const CFX_Byt
FX_CHAR* pDest = pNewData->m_String;
for (FX_STRSIZE i = 0; i < nCount; i ++) {
const FX_CHAR* pTarget = FX_strstr(pStart, (FX_STRSIZE)(pEnd - pStart), lpszOld.GetCStr(), nSourceLen);
- FXSYS_memcpy32(pDest, pStart, pTarget - pStart);
+ FXSYS_memcpy(pDest, pStart, pTarget - pStart);
pDest += pTarget - pStart;
- FXSYS_memcpy32(pDest, lpszNew.GetCStr(), lpszNew.GetLength());
+ FXSYS_memcpy(pDest, lpszNew.GetCStr(), lpszNew.GetLength());
pDest += lpszNew.GetLength();
pStart = pTarget + nSourceLen;
}
- FXSYS_memcpy32(pDest, pStart, pEnd - pStart);
+ FXSYS_memcpy(pDest, pStart, pEnd - pStart);
m_pData->Release();
m_pData = pNewData;
return nCount;
@@ -1041,7 +1041,7 @@ void CFX_ByteString::TrimLeft(const CFX_ByteStringC& lpszTargets)
}
if (pos) {
FX_STRSIZE nDataLength = len - pos;
- FXSYS_memmove32(m_pData->m_String, m_pData->m_String + pos, (nDataLength + 1)*sizeof(FX_CHAR));
+ FXSYS_memmove(m_pData->m_String, m_pData->m_String + pos, (nDataLength + 1)*sizeof(FX_CHAR));
m_pData->m_nDataLength = nDataLength;
}
}
@@ -1110,7 +1110,7 @@ FX_STRSIZE FX_ftoa(FX_FLOAT d, FX_CHAR* buf)
int i = scaled / scale;
FXSYS_itoa(i, buf2, 10);
FX_STRSIZE len = FXSYS_strlen(buf2);
- FXSYS_memcpy32(buf + buf_size, buf2, len);
+ FXSYS_memcpy(buf + buf_size, buf2, len);
buf_size += len;
int fraction = scaled % scale;
if (fraction == 0) {
diff --git a/core/src/fxcrt/fx_basic_buffer.cpp b/core/src/fxcrt/fx_basic_buffer.cpp
index 43da8e9ebf..9fc400e183 100644
--- a/core/src/fxcrt/fx_basic_buffer.cpp
+++ b/core/src/fxcrt/fx_basic_buffer.cpp
@@ -31,7 +31,7 @@ void CFX_BinaryBuf::Delete(int start_index, int count)
if (!m_pBuffer || start_index < 0 || start_index + count > m_DataSize) {
return;
}
- FXSYS_memmove32(m_pBuffer + start_index, m_pBuffer + start_index + count, m_DataSize - start_index - count);
+ FXSYS_memmove(m_pBuffer + start_index, m_pBuffer + start_index + count, m_DataSize - start_index - count);
m_DataSize -= count;
}
void CFX_BinaryBuf::Clear()
@@ -103,14 +103,14 @@ void CFX_BinaryBuf::CopyData(const void* pStr, FX_STRSIZE size)
if (!m_pBuffer) {
return;
}
- FXSYS_memcpy32(m_pBuffer, pStr, size);
+ FXSYS_memcpy(m_pBuffer, pStr, size);
m_DataSize = size;
}
void CFX_BinaryBuf::AppendBlock(const void* pBuf, FX_STRSIZE size)
{
ExpandBuf(size);
if (pBuf && m_pBuffer) {
- FXSYS_memcpy32(m_pBuffer + m_DataSize, pBuf, size);
+ FXSYS_memcpy(m_pBuffer + m_DataSize, pBuf, size);
}
m_DataSize += size;
}
@@ -120,9 +120,9 @@ void CFX_BinaryBuf::InsertBlock(FX_STRSIZE pos, const void* pBuf, FX_STRSIZE siz
if (!m_pBuffer) {
return;
}
- FXSYS_memmove32(m_pBuffer + pos + size, m_pBuffer + pos, m_DataSize - pos);
+ FXSYS_memmove(m_pBuffer + pos + size, m_pBuffer + pos, m_DataSize - pos);
if (pBuf) {
- FXSYS_memcpy32(m_pBuffer + pos, pBuf, size);
+ FXSYS_memcpy(m_pBuffer + pos, pBuf, size);
}
m_DataSize += size;
}
@@ -132,7 +132,7 @@ void CFX_BinaryBuf::AppendFill(uint8_t byte, FX_STRSIZE count)
if (!m_pBuffer) {
return;
}
- FXSYS_memset8(m_pBuffer + m_DataSize, byte, count);
+ FXSYS_memset(m_pBuffer + m_DataSize, byte, count);
m_DataSize += count;
}
CFX_ByteStringC CFX_BinaryBuf::GetByteString() const
@@ -360,7 +360,7 @@ CFX_ArchiveLoader& CFX_ArchiveLoader::operator >> (CFX_ByteString& str)
return *this;
}
FX_CHAR* buffer = str.GetBuffer(len);
- FXSYS_memcpy32(buffer, m_pLoadingBuf + m_LoadingPos, len);
+ FXSYS_memcpy(buffer, m_pLoadingBuf + m_LoadingPos, len);
str.ReleaseBuffer(len);
m_LoadingPos += len;
return *this;
@@ -377,7 +377,7 @@ FX_BOOL CFX_ArchiveLoader::Read(void* pBuf, FX_DWORD dwSize)
if (m_LoadingPos + dwSize > m_LoadingSize) {
return FALSE;
}
- FXSYS_memcpy32(pBuf, m_pLoadingBuf + m_LoadingPos, dwSize);
+ FXSYS_memcpy(pBuf, m_pLoadingBuf + m_LoadingPos, dwSize);
m_LoadingPos += dwSize;
return TRUE;
}
@@ -459,7 +459,7 @@ int32_t IFX_BufferArchive::AppendBlock(const void* pBuf, size_t size)
FX_STRSIZE temp_size = (FX_STRSIZE)size;
while (temp_size > 0) {
FX_STRSIZE buf_size = FX_MIN(m_BufSize - m_Length, (FX_STRSIZE)temp_size);
- FXSYS_memcpy32(m_pBuffer + m_Length, buffer, buf_size);
+ FXSYS_memcpy(m_pBuffer + m_Length, buffer, buf_size);
m_Length += buf_size;
if (m_Length == m_BufSize) {
if (!Flush()) {
diff --git a/core/src/fxcrt/fx_basic_maps.cpp b/core/src/fxcrt/fx_basic_maps.cpp
index afc7c8219e..8a886f88ea 100644
--- a/core/src/fxcrt/fx_basic_maps.cpp
+++ b/core/src/fxcrt/fx_basic_maps.cpp
@@ -395,25 +395,25 @@ static FX_BOOL _CompactStringSame(_CompactString* pCompact, const uint8_t* pStr,
if (pCompact->m_CompactLen != len) {
return FALSE;
}
- return FXSYS_memcmp32(&pCompact->m_LenHigh, pStr, len) == 0;
+ return FXSYS_memcmp(&pCompact->m_LenHigh, pStr, len) == 0;
}
if (pCompact->m_CompactLen != 0xff || pCompact->m_LenHigh * 256 + pCompact->m_LenLow != len) {
return FALSE;
}
- return FXSYS_memcmp32(pCompact->m_pBuffer, pStr, len) == 0;
+ return FXSYS_memcmp(pCompact->m_pBuffer, pStr, len) == 0;
}
static void _CompactStringStore(_CompactString* pCompact, const uint8_t* pStr, int len)
{
if (len < (int)sizeof(_CompactString)) {
pCompact->m_CompactLen = (uint8_t)len;
- FXSYS_memcpy32(&pCompact->m_LenHigh, pStr, len);
+ FXSYS_memcpy(&pCompact->m_LenHigh, pStr, len);
return;
}
pCompact->m_CompactLen = 0xff;
pCompact->m_LenHigh = len / 256;
pCompact->m_LenLow = len % 256;
pCompact->m_pBuffer = FX_Alloc(uint8_t, len);
- FXSYS_memcpy32(pCompact->m_pBuffer, pStr, len);
+ FXSYS_memcpy(pCompact->m_pBuffer, pStr, len);
}
static CFX_ByteStringC _CompactStringGet(_CompactString* pCompact)
{
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp
index 1108a3ca52..2442daed27 100644
--- a/core/src/fxcrt/fx_basic_wstring.cpp
+++ b/core/src/fxcrt/fx_basic_wstring.cpp
@@ -63,7 +63,7 @@ CFX_WideString::CFX_WideString(const FX_WCHAR* lpsz, FX_STRSIZE nLen) {
if (nLen) {
m_pData = StringData::Create(nLen);
if (m_pData) {
- FXSYS_memcpy32(m_pData->m_String, lpsz, nLen * sizeof(FX_WCHAR));
+ FXSYS_memcpy(m_pData->m_String, lpsz, nLen * sizeof(FX_WCHAR));
}
} else {
m_pData = NULL;
@@ -84,7 +84,7 @@ CFX_WideString::CFX_WideString(const CFX_WideStringC& str)
}
m_pData = StringData::Create(str.GetLength());
if (m_pData) {
- FXSYS_memcpy32(m_pData->m_String, str.GetPtr(), str.GetLength()*sizeof(FX_WCHAR));
+ FXSYS_memcpy(m_pData->m_String, str.GetPtr(), str.GetLength()*sizeof(FX_WCHAR));
}
}
CFX_WideString::CFX_WideString(const CFX_WideStringC& str1, const CFX_WideStringC& str2)
@@ -96,8 +96,8 @@ CFX_WideString::CFX_WideString(const CFX_WideStringC& str1, const CFX_WideString
}
m_pData = StringData::Create(nNewLen);
if (m_pData) {
- FXSYS_memcpy32(m_pData->m_String, str1.GetPtr(), str1.GetLength()*sizeof(FX_WCHAR));
- FXSYS_memcpy32(m_pData->m_String + str1.GetLength(), str2.GetPtr(), str2.GetLength()*sizeof(FX_WCHAR));
+ FXSYS_memcpy(m_pData->m_String, str1.GetPtr(), str1.GetLength()*sizeof(FX_WCHAR));
+ FXSYS_memcpy(m_pData->m_String + str1.GetLength(), str2.GetPtr(), str2.GetLength()*sizeof(FX_WCHAR));
}
}
void CFX_WideString::ReleaseBuffer(FX_STRSIZE nNewLength)
@@ -229,14 +229,14 @@ void CFX_WideString::ConcatInPlace(FX_STRSIZE nSrcLen, const FX_WCHAR* lpszSrcDa
if (m_pData == NULL) {
m_pData = StringData::Create(nSrcLen);
if (m_pData) {
- FXSYS_memcpy32(m_pData->m_String, lpszSrcData, nSrcLen * sizeof(FX_WCHAR));
+ FXSYS_memcpy(m_pData->m_String, lpszSrcData, nSrcLen * sizeof(FX_WCHAR));
}
return;
}
if (m_pData->m_nRefs > 1 || m_pData->m_nDataLength + nSrcLen > m_pData->m_nAllocLength) {
ConcatCopy(m_pData->m_nDataLength, m_pData->m_String, nSrcLen, lpszSrcData);
} else {
- FXSYS_memcpy32(m_pData->m_String + m_pData->m_nDataLength, lpszSrcData, nSrcLen * sizeof(FX_WCHAR));
+ FXSYS_memcpy(m_pData->m_String + m_pData->m_nDataLength, lpszSrcData, nSrcLen * sizeof(FX_WCHAR));
m_pData->m_nDataLength += nSrcLen;
m_pData->m_String[m_pData->m_nDataLength] = 0;
}
@@ -267,7 +267,7 @@ void CFX_WideString::CopyBeforeWrite()
FX_STRSIZE nDataLength = pData->m_nDataLength;
m_pData = StringData::Create(nDataLength);
if (m_pData != NULL) {
- FXSYS_memcpy32(m_pData->m_String, pData->m_String, (nDataLength + 1) * sizeof(FX_WCHAR));
+ FXSYS_memcpy(m_pData->m_String, pData->m_String, (nDataLength + 1) * sizeof(FX_WCHAR));
}
}
void CFX_WideString::AllocBeforeWrite(FX_STRSIZE nLen)
@@ -281,7 +281,7 @@ void CFX_WideString::AllocBeforeWrite(FX_STRSIZE nLen)
void CFX_WideString::AssignCopy(FX_STRSIZE nSrcLen, const FX_WCHAR* lpszSrcData)
{
AllocBeforeWrite(nSrcLen);
- FXSYS_memcpy32(m_pData->m_String, lpszSrcData, nSrcLen * sizeof(FX_WCHAR));
+ FXSYS_memcpy(m_pData->m_String, lpszSrcData, nSrcLen * sizeof(FX_WCHAR));
m_pData->m_nDataLength = nSrcLen;
m_pData->m_String[nSrcLen] = 0;
}
@@ -351,7 +351,7 @@ FX_WCHAR* CFX_WideString::GetBuffer(FX_STRSIZE nMinBufLength)
if (!m_pData) {
return NULL;
}
- FXSYS_memcpy32(m_pData->m_String, pOldData->m_String, (nOldLen + 1)*sizeof(FX_WCHAR));
+ FXSYS_memcpy(m_pData->m_String, pOldData->m_String, (nOldLen + 1)*sizeof(FX_WCHAR));
m_pData->m_nDataLength = nOldLen;
pOldData->Release();
return m_pData->m_String;
@@ -410,7 +410,7 @@ void CFX_WideString::AllocCopy(CFX_WideString& dest, FX_STRSIZE nCopyLen, FX_STR
ASSERT(dest.m_pData == NULL);
dest.m_pData = StringData::Create(nCopyLen);
if (dest.m_pData) {
- FXSYS_memcpy32(dest.m_pData->m_String, m_pData->m_String + nCopyIndex, iSize.ValueOrDie());
+ FXSYS_memcpy(dest.m_pData->m_String, m_pData->m_String + nCopyIndex, iSize.ValueOrDie());
}
}
CFX_WideString CFX_WideString::Left(FX_STRSIZE nCount) const
@@ -609,7 +609,7 @@ void CFX_WideString::TrimLeft(const FX_WCHAR* lpszTargets)
}
if (lpsz != m_pData->m_String) {
int nDataLength = m_pData->m_nDataLength - (FX_STRSIZE)(lpsz - m_pData->m_String);
- FXSYS_memmove32(m_pData->m_String, lpsz, (nDataLength + 1)*sizeof(FX_WCHAR));
+ FXSYS_memmove(m_pData->m_String, lpsz, (nDataLength + 1)*sizeof(FX_WCHAR));
m_pData->m_nDataLength = nDataLength;
}
}
@@ -656,7 +656,7 @@ FX_STRSIZE CFX_WideString::Replace(const FX_WCHAR* lpszOld, const FX_WCHAR* lpsz
if (!m_pData) {
return 0;
}
- FXSYS_memcpy32(m_pData->m_String, pstr, pOldData->m_nDataLength * sizeof(FX_WCHAR));
+ FXSYS_memcpy(m_pData->m_String, pstr, pOldData->m_nDataLength * sizeof(FX_WCHAR));
pOldData->Release();
}
lpszStart = m_pData->m_String;
@@ -664,8 +664,8 @@ FX_STRSIZE CFX_WideString::Replace(const FX_WCHAR* lpszOld, const FX_WCHAR* lpsz
{
while ((lpszTarget = (FX_WCHAR*)FXSYS_wcsstr(lpszStart, lpszOld)) != NULL && lpszStart < lpszEnd) {
FX_STRSIZE nBalance = nOldLength - (FX_STRSIZE)(lpszTarget - m_pData->m_String + nSourceLen);
- FXSYS_memmove32(lpszTarget + nReplacementLen, lpszTarget + nSourceLen, nBalance * sizeof(FX_WCHAR));
- FXSYS_memcpy32(lpszTarget, lpszNew, nReplacementLen * sizeof(FX_WCHAR));
+ FXSYS_memmove(lpszTarget + nReplacementLen, lpszTarget + nSourceLen, nBalance * sizeof(FX_WCHAR));
+ FXSYS_memcpy(lpszTarget, lpszNew, nReplacementLen * sizeof(FX_WCHAR));
lpszStart = lpszTarget + nReplacementLen;
lpszStart[nBalance] = 0;
nOldLength += (nReplacementLen - nSourceLen);
@@ -695,13 +695,13 @@ FX_STRSIZE CFX_WideString::Insert(FX_STRSIZE nIndex, FX_WCHAR ch)
return 0;
}
if(pOldData != NULL) {
- FXSYS_memmove32(m_pData->m_String, pstr, (pOldData->m_nDataLength + 1)*sizeof(FX_WCHAR));
+ FXSYS_memmove(m_pData->m_String, pstr, (pOldData->m_nDataLength + 1)*sizeof(FX_WCHAR));
pOldData->Release();
} else {
m_pData->m_String[0] = 0;
}
}
- FXSYS_memmove32(m_pData->m_String + nIndex + 1,
+ FXSYS_memmove(m_pData->m_String + nIndex + 1,
m_pData->m_String + nIndex, (nNewLength - nIndex)*sizeof(FX_WCHAR));
m_pData->m_String[nIndex] = ch;
m_pData->m_nDataLength = nNewLength;
@@ -719,7 +719,7 @@ FX_STRSIZE CFX_WideString::Delete(FX_STRSIZE nIndex, FX_STRSIZE nCount)
if (nCount > 0 && nIndex < nOldLength) {
CopyBeforeWrite();
int nBytesToCopy = nOldLength - (nIndex + nCount) + 1;
- FXSYS_memmove32(m_pData->m_String + nIndex,
+ FXSYS_memmove(m_pData->m_String + nIndex,
m_pData->m_String + nIndex + nCount, nBytesToCopy * sizeof(FX_WCHAR));
m_pData->m_nDataLength = nOldLength - nCount;
}
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp
index 16974459fc..53ccc5adca 100644
--- a/core/src/fxcrt/fx_extension.cpp
+++ b/core/src/fxcrt/fx_extension.cpp
@@ -356,7 +356,7 @@ void FX_Random_GenerateBase(FX_DWORD* pBuffer, int32_t iCount)
::GetSystemTime(&st1);
do {
::GetSystemTime(&st2);
- } while (FXSYS_memcmp32(&st1, &st2, sizeof(SYSTEMTIME)) == 0);
+ } while (FXSYS_memcmp(&st1, &st2, sizeof(SYSTEMTIME)) == 0);
FX_DWORD dwHash1 = FX_HashCode_String_GetA((const FX_CHAR*)&st1, sizeof(st1), TRUE);
FX_DWORD dwHash2 = FX_HashCode_String_GetA((const FX_CHAR*)&st2, sizeof(st2), TRUE);
::srand((dwHash1 << 16) | (FX_DWORD)dwHash2);
diff --git a/core/src/fxcrt/fxcrt_posix.cpp b/core/src/fxcrt/fxcrt_posix.cpp
index da39f8cd5e..8bf541b49f 100644
--- a/core/src/fxcrt/fxcrt_posix.cpp
+++ b/core/src/fxcrt/fxcrt_posix.cpp
@@ -65,7 +65,7 @@ FX_FILESIZE CFXCRT_FileAccess_Posix::GetSize() const
return 0;
}
struct stat s;
- FXSYS_memset32(&s, 0, sizeof(s));
+ FXSYS_memset(&s, 0, sizeof(s));
fstat(m_nFD, &s);
return s.st_size;
}
diff --git a/core/src/fxge/agg/agg23/agg_scanline_u.h b/core/src/fxge/agg/agg23/agg_scanline_u.h
index 5b132907fd..2100115329 100644
--- a/core/src/fxge/agg/agg23/agg_scanline_u.h
+++ b/core/src/fxge/agg/agg23/agg_scanline_u.h
@@ -97,7 +97,7 @@ public:
void add_span(int x, unsigned len, unsigned cover)
{
x -= m_min_x;
- FXSYS_memset8(m_covers + x, cover, len);
+ FXSYS_memset(m_covers + x, cover, len);
if(x == m_last_x + 1) {
m_cur_span->len += (coord_type)len;
} else {
diff --git a/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp b/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp
index b62d4baa1c..8a876210b7 100644
--- a/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp
+++ b/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp
@@ -55,10 +55,10 @@ void path_storage::allocate_block(unsigned nb)
unsigned char** new_cmds =
(unsigned char**)(new_coords + m_max_blocks + block_pool);
if(m_coord_blocks) {
- FXSYS_memcpy32(new_coords,
+ FXSYS_memcpy(new_coords,
m_coord_blocks,
m_max_blocks * sizeof(FX_FLOAT*));
- FXSYS_memcpy32(new_cmds,
+ FXSYS_memcpy(new_cmds,
m_cmd_blocks,
m_max_blocks * sizeof(unsigned char*));
FX_Free(m_coord_blocks);
diff --git a/core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp b/core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp
index 1c32d96cab..b26e2595c1 100644
--- a/core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp
+++ b/core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp
@@ -118,7 +118,7 @@ void outline_aa::allocate_block()
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_memcpy32(new_cells, m_cells, m_max_blocks * sizeof(cell_aa*));
+ FXSYS_memcpy(new_cells, m_cells, m_max_blocks * sizeof(cell_aa*));
FX_Free(m_cells);
}
m_cells = new_cells;
diff --git a/core/src/fxge/android/fpf_skiafontmgr.cpp b/core/src/fxge/android/fpf_skiafontmgr.cpp
index db3dcfea25..041df08cc1 100644
--- a/core/src/fxge/android/fpf_skiafontmgr.cpp
+++ b/core/src/fxge/android/fpf_skiafontmgr.cpp
@@ -384,7 +384,7 @@ FXFT_Face CFPF_SkiaFontMgr::GetFontFace(IFX_FileRead *pFileRead, int32_t iFaceIn
return NULL;
}
FXFT_StreamRec streamRec;
- FXSYS_memset32(&streamRec, 0, sizeof(FXFT_StreamRec));
+ FXSYS_memset(&streamRec, 0, sizeof(FXFT_StreamRec));
streamRec.size = pFileRead->GetSize();
streamRec.descriptor.pointer = pFileRead;
streamRec.read = FPF_SkiaStream_Read;
diff --git a/core/src/fxge/android/fpf_skiafontmgr.h b/core/src/fxge/android/fpf_skiafontmgr.h
index 5acf14e3ac..7b7f137459 100644
--- a/core/src/fxge/android/fpf_skiafontmgr.h
+++ b/core/src/fxge/android/fpf_skiafontmgr.h
@@ -33,7 +33,7 @@ public:
}
int32_t iSize = FXSYS_strlen(pFamily);
m_pFamily = FX_Alloc(FX_CHAR, iSize + 1);
- FXSYS_memcpy32(m_pFamily, pFamily, iSize * sizeof(FX_CHAR));
+ FXSYS_memcpy(m_pFamily, pFamily, iSize * sizeof(FX_CHAR));
m_pFamily[iSize] = 0;
}
FX_CHAR* m_pFamily;
@@ -63,7 +63,7 @@ public:
}
int32_t iSize = FXSYS_strlen(pPath);
m_pPath = FX_Alloc(FX_CHAR, iSize + 1);
- FXSYS_memcpy32(m_pPath, pPath, iSize * sizeof(FX_CHAR));
+ FXSYS_memcpy(m_pPath, pPath, iSize * sizeof(FX_CHAR));
m_pPath[iSize] = 0;
}
FX_CHAR* m_pPath;
diff --git a/core/src/fxge/dib/fx_dib_composite.cpp b/core/src/fxge/dib/fx_dib_composite.cpp
index aeee91bb4b..b2a72253d8 100644
--- a/core/src/fxge/dib/fx_dib_composite.cpp
+++ b/core/src/fxge/dib/fx_dib_composite.cpp
@@ -297,7 +297,7 @@ void _CompositeRow_Rgb2Mask(uint8_t* dest_scan, const uint8_t* src_scan, int wid
clip_scan ++;
}
} else {
- FXSYS_memset8(dest_scan, 0xff, width);
+ FXSYS_memset(dest_scan, 0xff, width);
}
}
void _CompositeRow_Argb2Graya(uint8_t* dest_scan, const uint8_t* src_scan, int pixel_count, int blend_type, const uint8_t* clip_scan,
@@ -1331,7 +1331,7 @@ inline void _CompositeRow_Rgb2Rgb_Blend_Clip(uint8_t* dest_scan, const uint8_t*
inline void _CompositeRow_Rgb2Rgb_NoBlend_NoClip(uint8_t* dest_scan, const uint8_t* src_scan, int width, int dest_Bpp, int src_Bpp)
{
if (dest_Bpp == src_Bpp) {
- FXSYS_memcpy32(dest_scan, src_scan, width * dest_Bpp);
+ FXSYS_memcpy(dest_scan, src_scan, width * dest_Bpp);
return;
}
for (int col = 0; col < width; col ++) {
@@ -3662,7 +3662,7 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, FXDIB
int palsize = 1 << (src_format & 0xff);
pDestPalette = FX_Alloc(FX_DWORD, palsize);
if (isDstCmyk == isSrcCmyk) {
- FXSYS_memcpy32(pDestPalette, pSrcPalette, palsize * sizeof(FX_DWORD));
+ FXSYS_memcpy(pDestPalette, pSrcPalette, palsize * sizeof(FX_DWORD));
} else {
for (int i = 0; i < palsize; i ++) {
FX_CMYK cmyk = pSrcPalette[i];
@@ -4236,7 +4236,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
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_memset8(dest_scan, gray, width);
+ FXSYS_memset(dest_scan, gray, width);
} else
for (int col = 0; col < width; col ++) {
*dest_scan = FXDIB_ALPHA_MERGE(*dest_scan, gray, src_alpha);
@@ -4264,7 +4264,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
uint8_t left_flag = *dest_scan_top & (255 << (8 - left_shift));
uint8_t right_flag = *dest_scan_top_r & (255 >> right_shift);
if (width) {
- FXSYS_memset8(dest_scan_top + 1, index ? 255 : 0, width - 1);
+ FXSYS_memset(dest_scan_top + 1, index ? 255 : 0, width - 1);
if (!index) {
*dest_scan_top &= left_flag;
*dest_scan_top_r &= right_flag;
@@ -4308,7 +4308,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
uint8_t* dest_scan = m_pBuffer + row * m_Pitch + rect.left * Bpp;
uint8_t* dest_scan_alpha = m_pAlphaMask ? (uint8_t*)m_pAlphaMask->GetScanline(row) + rect.left : NULL;
if (dest_scan_alpha) {
- FXSYS_memset8(dest_scan_alpha, 0xff, width);
+ FXSYS_memset(dest_scan_alpha, 0xff, width);
}
if (Bpp == 4) {
FX_DWORD* scan = (FX_DWORD*)dest_scan;
@@ -4352,7 +4352,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, FX
uint8_t back_alpha = *dest_scan_alpha;
if (back_alpha == 0) {
*dest_scan_alpha++ = src_alpha;
- FXSYS_memcpy32(dest_scan, color_p, Bpp);
+ FXSYS_memcpy(dest_scan, color_p, Bpp);
dest_scan += Bpp;
continue;
}
@@ -4457,7 +4457,7 @@ void CFX_BitmapComposer::DoCompose(uint8_t* dest_scan, const uint8_t* src_scan,
m_pAddClipScan[i] = clip_scan[i] * m_BitmapAlpha / 255;
}
} else {
- FXSYS_memset8(m_pAddClipScan, m_BitmapAlpha, dest_width);
+ FXSYS_memset(m_pAddClipScan, m_BitmapAlpha, dest_width);
}
clip_scan = m_pAddClipScan;
}
diff --git a/core/src/fxge/dib/fx_dib_convert.cpp b/core/src/fxge/dib/fx_dib_convert.cpp
index ef4f7e40b5..ffc161eb05 100644
--- a/core/src/fxge/dib/fx_dib_convert.cpp
+++ b/core/src/fxge/dib/fx_dib_convert.cpp
@@ -287,7 +287,7 @@ FX_BOOL _ConvertBuffer_1bppMask2Gray(uint8_t* dest_buf, int dest_pitch, int widt
reset_gray = 0x00;
for (int row = 0; row < height; row ++) {
uint8_t* dest_scan = dest_buf + row * dest_pitch;
- FXSYS_memset8(dest_scan, reset_gray, width);
+ FXSYS_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))) {
@@ -304,7 +304,7 @@ FX_BOOL _ConvertBuffer_8bppMask2Gray(uint8_t* dest_buf, int dest_pitch, int widt
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_memcpy32(dest_scan, src_scan, width);
+ FXSYS_memcpy(dest_scan, src_scan, width);
}
return TRUE;
}
@@ -350,7 +350,7 @@ FX_BOOL _ConvertBuffer_1bppPlt2Gray(uint8_t* dest_buf, int dest_pitch, int width
}
for (int row = 0; row < height; row ++) {
uint8_t* dest_scan = dest_buf + row * dest_pitch;
- FXSYS_memset8(dest_scan, gray[0], width);
+ FXSYS_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))) {
@@ -459,7 +459,7 @@ inline void _ConvertBuffer_IndexCopy(uint8_t* dest_buf, int dest_pitch, int widt
if (pSrcBitmap->GetBPP() == 1) {
for (int row = 0; row < height; row ++) {
uint8_t* dest_scan = dest_buf + row * dest_pitch;
- FXSYS_memset32(dest_scan, 0, width);
+ FXSYS_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))) {
@@ -472,7 +472,7 @@ inline void _ConvertBuffer_IndexCopy(uint8_t* dest_buf, int dest_pitch, int widt
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_memcpy32(dest_scan, src_scan, width);
+ FXSYS_memcpy(dest_scan, src_scan, width);
}
}
}
@@ -512,7 +512,7 @@ FX_BOOL _ConvertBuffer_Plt2PltRgb8(uint8_t* dest_buf, int dest_pitch, int width,
dst_plt[i] = FXARGB_MAKE(0xff, r, g, b);
}
} else {
- FXSYS_memcpy32(dst_plt, src_plt, plt_size * 4);
+ FXSYS_memcpy(dst_plt, src_plt, plt_size * 4);
}
}
return TRUE;
@@ -570,7 +570,7 @@ inline FX_BOOL _ConvertBuffer_Rgb2PltRgb8_NoTransform(uint8_t* dest_buf, int des
}
}
}
- FXSYS_memcpy32(dst_plt, pPalette, sizeof(FX_DWORD) * 256);
+ FXSYS_memcpy(dst_plt, pPalette, sizeof(FX_DWORD) * 256);
return TRUE;
}
FX_BOOL _ConvertBuffer_Rgb2PltRgb8(uint8_t* dest_buf, int dest_pitch, int width, int height,
@@ -742,7 +742,7 @@ FX_BOOL _ConvertBuffer_24bppRgb2Rgb24(uint8_t* dest_buf, int dest_pitch, int wid
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 * 3;
- FXSYS_memcpy32(dest_scan, src_scan, width * 3);
+ FXSYS_memcpy(dest_scan, src_scan, width * 3);
}
}
return TRUE;
@@ -1009,7 +1009,7 @@ FX_BOOL CFX_DIBitmap::ConvertFormat(FXDIB_Format dest_format, void* pIccTransfor
}
CFX_DIBitmap* pAlphaMask = NULL;
if (dest_format == FXDIB_Argb) {
- FXSYS_memset8(dest_buf, 0xff, dest_pitch * m_Height + 4);
+ FXSYS_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/src/fxge/dib/fx_dib_engine.cpp b/core/src/fxge/dib/fx_dib_engine.cpp
index fc36b95581..10d12a6010 100644
--- a/core/src/fxge/dib/fx_dib_engine.cpp
+++ b/core/src/fxge/dib/fx_dib_engine.cpp
@@ -207,7 +207,7 @@ CStretchEngine::CStretchEngine(IFX_ScanlineComposer* pDestBitmap, FXDIB_Format d
return;
}
if (dest_format == FXDIB_Rgb32) {
- FXSYS_memset8(m_pDestScanline, 255, size);
+ FXSYS_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/src/fxge/dib/fx_dib_main.cpp b/core/src/fxge/dib/fx_dib_main.cpp
index db9b43412a..0c2b009559 100644
--- a/core/src/fxge/dib/fx_dib_main.cpp
+++ b/core/src/fxge/dib/fx_dib_main.cpp
@@ -120,7 +120,7 @@ FX_BOOL CFX_DIBitmap::Copy(const CFX_DIBSource* pSrc)
CopyPalette(pSrc->GetPalette());
CopyAlphaMask(pSrc->m_pAlphaMask);
for (int row = 0; row < pSrc->GetHeight(); row ++) {
- FXSYS_memcpy32(m_pBuffer + row * m_Pitch, pSrc->GetScanline(row), m_Pitch);
+ FXSYS_memcpy(m_pBuffer + row * m_Pitch, pSrc->GetScanline(row), m_Pitch);
}
return TRUE;
}
@@ -193,7 +193,7 @@ CFX_DIBitmap* CFX_DIBSource::Clone(const FX_RECT* pClip) const
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_memcpy32(dest_scan, src_scan, copy_len);
+ FXSYS_memcpy(dest_scan, src_scan, copy_len);
}
}
return pNewBitmap;
@@ -239,7 +239,7 @@ FX_BOOL CFX_DIBSource::BuildAlphaMask()
m_pAlphaMask = NULL;
return FALSE;
}
- FXSYS_memset8(m_pAlphaMask->GetBuffer(), 0xff, m_pAlphaMask->GetHeight()*m_pAlphaMask->GetPitch());
+ FXSYS_memset(m_pAlphaMask->GetBuffer(), 0xff, m_pAlphaMask->GetHeight()*m_pAlphaMask->GetPitch());
return TRUE;
}
FX_DWORD CFX_DIBSource::GetPaletteEntry(int index) const
@@ -296,19 +296,19 @@ void CFX_DIBitmap::Clear(FX_DWORD color)
}
switch (GetFormat()) {
case FXDIB_1bppMask:
- FXSYS_memset8(m_pBuffer, (color & 0xff000000) ? 0xff : 0, m_Pitch * m_Height);
+ FXSYS_memset(m_pBuffer, (color & 0xff000000) ? 0xff : 0, m_Pitch * m_Height);
break;
case FXDIB_1bppRgb: {
int index = FindPalette(color);
- FXSYS_memset8(m_pBuffer, index ? 0xff : 0, m_Pitch * m_Height);
+ FXSYS_memset(m_pBuffer, index ? 0xff : 0, m_Pitch * m_Height);
break;
}
case FXDIB_8bppMask:
- FXSYS_memset8(m_pBuffer, color >> 24, m_Pitch * m_Height);
+ FXSYS_memset(m_pBuffer, color >> 24, m_Pitch * m_Height);
break;
case FXDIB_8bppRgb: {
int index = FindPalette(color);
- FXSYS_memset8(m_pBuffer, index, m_Pitch * m_Height);
+ FXSYS_memset(m_pBuffer, index, m_Pitch * m_Height);
break;
}
case FXDIB_Rgb:
@@ -316,7 +316,7 @@ void CFX_DIBitmap::Clear(FX_DWORD color)
int a, r, g, b;
ArgbDecode(color, a, r, g, b);
if (r == g && g == b) {
- FXSYS_memset8(m_pBuffer, r, m_Pitch * m_Height);
+ FXSYS_memset(m_pBuffer, r, m_Pitch * m_Height);
} else {
int byte_pos = 0;
for (int col = 0; col < m_Width; col ++) {
@@ -325,7 +325,7 @@ void CFX_DIBitmap::Clear(FX_DWORD color)
m_pBuffer[byte_pos++] = r;
}
for (int row = 1; row < m_Height; row ++) {
- FXSYS_memcpy32(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
+ FXSYS_memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
}
}
break;
@@ -337,7 +337,7 @@ void CFX_DIBitmap::Clear(FX_DWORD color)
((FX_DWORD*)m_pBuffer)[i] = color;
}
for (int row = 1; row < m_Height; row ++) {
- FXSYS_memcpy32(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
+ FXSYS_memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch);
}
break;
}
@@ -407,7 +407,7 @@ FX_BOOL CFX_DIBitmap::TransferBitmap(int dest_left, int dest_top, int width, int
for (int row = 0; row < height; row ++) {
uint8_t* dest_scan = m_pBuffer + (dest_top + row) * m_Pitch + dest_left * Bpp;
const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp;
- FXSYS_memcpy32(dest_scan, src_scan, width * Bpp);
+ FXSYS_memcpy(dest_scan, src_scan, width * Bpp);
}
}
} else {
@@ -498,10 +498,10 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, int dest_top, int width, int h
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_memcpy32(dest_color_pos, color_p, comps);
+ FXSYS_memcpy(dest_color_pos, color_p, comps);
*dest_alpha_pos = 0xff;
} else {
- FXSYS_memset32(dest_color_pos, 0, comps);
+ FXSYS_memset(dest_color_pos, 0, comps);
*dest_alpha_pos = 0;
}
dest_color_pos += comps;
@@ -510,7 +510,7 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, int dest_top, int width, int h
} else {
src_scan += src_left;
for (int col = 0; col < width; col ++) {
- FXSYS_memcpy32(dest_color_pos, color_p, comps);
+ FXSYS_memcpy(dest_color_pos, color_p, comps);
dest_color_pos += comps;
*dest_alpha_pos++ = (alpha * (*src_scan++) / 255);
}
@@ -534,7 +534,7 @@ void CFX_DIBSource::CopyPalette(const FX_DWORD* pSrc, FX_DWORD size)
if (pal_size > size) {
pal_size = size;
}
- FXSYS_memcpy32(m_pPalette, pSrc, pal_size * sizeof(FX_DWORD));
+ FXSYS_memcpy(m_pPalette, pSrc, pal_size * sizeof(FX_DWORD));
}
}
void CFX_DIBSource::GetPalette(FX_DWORD* pal, int alpha) const
@@ -601,7 +601,7 @@ FX_BOOL CFX_DIBSource::CopyAlphaMask(const CFX_DIBSource* pAlphaMask, const FX_R
}
}
for (int row = 0; row < m_Height; row ++)
- FXSYS_memcpy32((void*)m_pAlphaMask->GetScanline(row),
+ FXSYS_memcpy((void*)m_pAlphaMask->GetScanline(row),
pAlphaMask->GetScanline(row + rect.top) + rect.left, m_pAlphaMask->m_Pitch);
} else {
m_pAlphaMask->Clear(0xff000000);
@@ -792,11 +792,11 @@ FX_BOOL CFX_DIBitmap::LoadChannel(FXDIB_Channel destChannel, int value)
}
int Bpp = GetBPP() / 8;
if (Bpp == 1) {
- FXSYS_memset8(m_pBuffer, value, m_Height * m_Pitch);
+ FXSYS_memset(m_pBuffer, value, m_Height * m_Pitch);
return TRUE;
}
if (destChannel == FXDIB_Alpha && m_pAlphaMask) {
- FXSYS_memset8(m_pAlphaMask->GetBuffer(), value, m_pAlphaMask->GetHeight()*m_pAlphaMask->GetPitch());
+ FXSYS_memset(m_pAlphaMask->GetBuffer(), value, m_pAlphaMask->GetHeight()*m_pAlphaMask->GetPitch());
return TRUE;
}
for (int row = 0; row < m_Height; row ++) {
@@ -901,7 +901,7 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform)
delete pMask;
return FALSE;
}
- FXSYS_memset8(pMask->GetBuffer(), gray[0], pMask->GetPitch() * m_Height);
+ FXSYS_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);
@@ -1420,11 +1420,11 @@ CFX_DIBitmap* CFX_DIBSource::FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const
const uint8_t* src_scan = GetScanline(row);
uint8_t* dest_scan = pDestBuffer + m_Pitch * (bYFlip ? (m_Height - row - 1) : row);
if (!bXFlip) {
- FXSYS_memcpy32(dest_scan, src_scan, m_Pitch);
+ FXSYS_memcpy(dest_scan, src_scan, m_Pitch);
continue;
}
if (m_bpp == 1) {
- FXSYS_memset32(dest_scan, 0, m_Pitch);
+ FXSYS_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;
@@ -1463,7 +1463,7 @@ CFX_DIBitmap* CFX_DIBSource::FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const
const uint8_t* src_scan = m_pAlphaMask->GetScanline(row);
uint8_t* dest_scan = pDestBuffer + dest_pitch * (bYFlip ? (m_Height - row - 1) : row);
if (!bXFlip) {
- FXSYS_memcpy32(dest_scan, src_scan, dest_pitch);
+ FXSYS_memcpy(dest_scan, src_scan, dest_pitch);
continue;
}
dest_scan += (m_Width - 1);
@@ -1690,10 +1690,10 @@ void CFX_BitmapStorer::ComposeScanline(int line, const uint8_t* scanline, const
uint8_t* dest_alpha_buf = m_pBitmap->m_pAlphaMask ?
(uint8_t*)m_pBitmap->m_pAlphaMask->GetScanline(line) : NULL;
if (dest_buf) {
- FXSYS_memcpy32(dest_buf, scanline, m_pBitmap->GetPitch());
+ FXSYS_memcpy(dest_buf, scanline, m_pBitmap->GetPitch());
}
if (dest_alpha_buf) {
- FXSYS_memcpy32(dest_alpha_buf, scan_extra_alpha, m_pBitmap->m_pAlphaMask->GetPitch());
+ FXSYS_memcpy(dest_alpha_buf, scan_extra_alpha, m_pBitmap->m_pAlphaMask->GetPitch());
}
}
FX_BOOL CFX_BitmapStorer::SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette)
diff --git a/core/src/fxge/dib/fx_dib_transform.cpp b/core/src/fxge/dib/fx_dib_transform.cpp
index b8109756e7..0f8af5f8ad 100644
--- a/core/src/fxge/dib/fx_dib_transform.cpp
+++ b/core/src/fxge/dib/fx_dib_transform.cpp
@@ -80,7 +80,7 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, const FX_REC
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_memset8(dest_buf, 0xff, dest_pitch * result_height);
+ FXSYS_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) - dest_clip.left;
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp
index c61119d5fe..4bac672cc5 100644
--- a/core/src/fxge/ge/fx_ge_font.cpp
+++ b/core/src/fxge/ge/fx_ge_font.cpp
@@ -210,7 +210,7 @@ static FXFT_Face FT_LoadFont(uint8_t* pData, int size)
FX_BOOL CFX_Font::LoadEmbedded(const uint8_t* data, FX_DWORD size)
{
m_pFontDataAllocation = FX_Alloc(uint8_t, size);
- FXSYS_memcpy32(m_pFontDataAllocation, data, size);
+ FXSYS_memcpy(m_pFontDataAllocation, data, size);
m_Face = FT_LoadFont((uint8_t*)m_pFontDataAllocation, size);
m_pFontData = (uint8_t*)m_pFontDataAllocation;
m_bEmbedded = TRUE;
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index dbf9768148..0e8e31a17b 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -70,7 +70,7 @@ CFX_FontMgr::CFX_FontMgr()
m_pBuiltinMapper->m_pFontMgr = this;
m_pExtMapper = NULL;
m_FTLibrary = NULL;
- FXSYS_memset32(m_ExternalFonts, 0, sizeof m_ExternalFonts);
+ FXSYS_memset(m_ExternalFonts, 0, sizeof m_ExternalFonts);
}
CFX_FontMgr::~CFX_FontMgr()
{
@@ -475,7 +475,7 @@ FX_BOOL CFX_FontMgr::GetStandardFont(const uint8_t*& pFontData, FX_DWORD& size,
}
CFX_FontMapper::CFX_FontMapper()
{
- FXSYS_memset32(m_FoxitFaces, 0, sizeof m_FoxitFaces);
+ FXSYS_memset(m_FoxitFaces, 0, sizeof m_FoxitFaces);
m_MMFaces[0] = m_MMFaces[1] = NULL;
m_pFontInfo = NULL;
m_bListLoaded = FALSE;
diff --git a/core/src/fxge/ge/fx_ge_path.cpp b/core/src/fxge/ge/fx_ge_path.cpp
index 4ae7b42b39..fdc0dc8605 100644
--- a/core/src/fxge/ge/fx_ge_path.cpp
+++ b/core/src/fxge/ge/fx_ge_path.cpp
@@ -139,7 +139,7 @@ void CFX_PathData::AllocPointCount(int nPoints)
if (m_AllocCount < nPoints) {
FX_PATHPOINT* pNewBuf = FX_Alloc(FX_PATHPOINT, nPoints);
if (m_PointCount) {
- FXSYS_memcpy32(pNewBuf, m_pPoints, m_PointCount * sizeof(FX_PATHPOINT));
+ FXSYS_memcpy(pNewBuf, m_pPoints, m_PointCount * sizeof(FX_PATHPOINT));
}
if (m_pPoints) {
FX_Free(m_pPoints);
@@ -152,7 +152,7 @@ CFX_PathData::CFX_PathData(const CFX_PathData& src)
{
m_PointCount = m_AllocCount = src.m_PointCount;
m_pPoints = FX_Alloc(FX_PATHPOINT, src.m_PointCount);
- FXSYS_memcpy32(m_pPoints, src.m_pPoints, sizeof(FX_PATHPOINT) * m_PointCount);
+ FXSYS_memcpy(m_pPoints, src.m_pPoints, sizeof(FX_PATHPOINT) * m_PointCount);
}
void CFX_PathData::TrimPoints(int nPoints)
{
@@ -173,7 +173,7 @@ void CFX_PathData::Append(const CFX_PathData* pSrc, const CFX_AffineMatrix* pMat
{
int old_count = m_PointCount;
AddPointCount(pSrc->m_PointCount);
- FXSYS_memcpy32(m_pPoints + old_count, pSrc->m_pPoints, pSrc->m_PointCount * sizeof(FX_PATHPOINT));
+ FXSYS_memcpy(m_pPoints + old_count, pSrc->m_pPoints, pSrc->m_PointCount * sizeof(FX_PATHPOINT));
if (pMatrix) {
for (int i = 0; i < pSrc->m_PointCount; i ++) {
pMatrix->Transform(m_pPoints[old_count + i].m_PointX, m_pPoints[old_count + i].m_PointY);
@@ -575,7 +575,7 @@ FX_BOOL CFX_PathData::IsRect(const CFX_AffineMatrix* pMatrix, CFX_FloatRect* pRe
void CFX_PathData::Copy(const CFX_PathData &src)
{
SetPointCount(src.m_PointCount);
- FXSYS_memcpy32(m_pPoints, src.m_pPoints, sizeof(FX_PATHPOINT) * m_PointCount);
+ FXSYS_memcpy(m_pPoints, src.m_pPoints, sizeof(FX_PATHPOINT) * m_PointCount);
}
CFX_GraphStateData::CFX_GraphStateData()
{
@@ -606,7 +606,7 @@ void CFX_GraphStateData::Copy(const CFX_GraphStateData& src)
m_LineWidth = src.m_LineWidth;
if (m_DashCount) {
m_DashArray = FX_Alloc(FX_FLOAT, m_DashCount);
- FXSYS_memcpy32(m_DashArray, src.m_DashArray, m_DashCount * sizeof(FX_FLOAT));
+ FXSYS_memcpy(m_DashArray, src.m_DashArray, m_DashCount * sizeof(FX_FLOAT));
}
}
CFX_GraphStateData::~CFX_GraphStateData()
diff --git a/core/src/fxge/ge/fx_ge_ps.cpp b/core/src/fxge/ge/fx_ge_ps.cpp
index 0e25d7e2e8..27c3361af7 100644
--- a/core/src/fxge/ge/fx_ge_ps.cpp
+++ b/core/src/fxge/ge/fx_ge_ps.cpp
@@ -242,7 +242,7 @@ void CFX_PSRenderer::SetGraphState(const CFX_GraphStateData* pGraphState)
buf << pGraphState->m_LineCap << FX_BSTRC(" J\n");
}
if (!m_bGraphStateSet || m_CurGraphState.m_DashCount != pGraphState->m_DashCount ||
- FXSYS_memcmp32(m_CurGraphState.m_DashArray, pGraphState->m_DashArray, sizeof(FX_FLOAT)*m_CurGraphState.m_DashCount)) {
+ FXSYS_memcmp(m_CurGraphState.m_DashArray, pGraphState->m_DashArray, sizeof(FX_FLOAT)*m_CurGraphState.m_DashCount)) {
buf << FX_BSTRC("[");
for (int i = 0; i < pGraphState->m_DashCount; i ++) {
buf << pGraphState->m_DashArray[i] << FX_BSTRC(" ");
@@ -351,7 +351,7 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
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_memcpy32(src_buf + row * pitch, src_scan, pitch);
+ FXSYS_memcpy(src_buf + row * pitch, src_scan, pitch);
}
uint8_t* output_buf;
FX_DWORD output_size;
@@ -433,7 +433,7 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color,
src_scan += 3;
}
} else {
- FXSYS_memcpy32(dest_scan, src_scan, src_pitch);
+ FXSYS_memcpy(dest_scan, src_scan, src_pitch);
}
}
uint8_t* compressed_buf;
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index 151b7099a5..7133d65417 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -1273,7 +1273,7 @@ static void _ContrastAdjust(uint8_t* pDataIn, uint8_t* pDataOut, int nWid, int n
if (0 == temp || 255 == temp) {
int rowbytes = FXSYS_abs(nSrcRowBytes) > nDstRowBytes ? nDstRowBytes : FXSYS_abs(nSrcRowBytes);
for (row = 0; row < nHei; row ++) {
- FXSYS_memcpy32(pDataOut + row * nDstRowBytes, pDataIn + row * nSrcRowBytes, rowbytes);
+ FXSYS_memcpy(pDataOut + row * nDstRowBytes, pDataIn + row * nSrcRowBytes, rowbytes);
}
return;
}
@@ -1393,11 +1393,11 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde
}
}
} else {
- FXSYS_memset32(pDestBuf, 0, dest_pitch * bmheight);
+ FXSYS_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 = FXSYS_abs(src_pitch) > dest_pitch ? dest_pitch : FXSYS_abs(src_pitch);
for (int row = 0; row < bmheight; row ++) {
- FXSYS_memcpy32(pDestBuf + row * dest_pitch, pSrcBuf + row * src_pitch, rowbytes);
+ FXSYS_memcpy(pDestBuf + row * dest_pitch, pSrcBuf + row * src_pitch, rowbytes);
}
} else {
_ContrastAdjust(pSrcBuf, pDestBuf, bmwidth, bmheight, src_pitch, dest_pitch);
@@ -1432,7 +1432,7 @@ FX_BOOL _OutputGlyph(void* dib, int x, int y, CFX_Font* pFont,
for (int row = 0; row < bmheight; row ++) {
const uint8_t* src_scan = src_buf + row * src_pitch;
uint8_t* dest_scan = dest_buf + row * dest_pitch;
- FXSYS_memcpy32(dest_scan, src_scan, dest_pitch);
+ FXSYS_memcpy(dest_scan, src_scan, dest_pitch);
}
pDib->CompositeMask(x + left, y - top, bmwidth, bmheight, &mask, argb, 0, 0);
return TRUE;
diff --git a/core/src/fxge/skia/fx_skia_blitter_new.cpp b/core/src/fxge/skia/fx_skia_blitter_new.cpp
index 362e8bf59f..5087b62b7c 100644
--- a/core/src/fxge/skia/fx_skia_blitter_new.cpp
+++ b/core/src/fxge/skia/fx_skia_blitter_new.cpp
@@ -155,7 +155,7 @@
if (col_end < col_start) return; // do nothing.
dest_scan += col_start;
if (cover_scan == 255 && m_Alpha == 255) {
- FXSYS_memset32(dest_scan, FXARGB_MAKE(m_Gray, m_Gray, m_Gray, m_Gray), col_end - col_start);
+ FXSYS_memset(dest_scan, FXARGB_MAKE(m_Gray, m_Gray, m_Gray, m_Gray), col_end - col_start);
return;
}
int src_alpha = m_Alpha * cover_scan / 255;
@@ -179,7 +179,7 @@
dest_scan += col_start;
ori_scan += col_start;
if (m_Alpha == 255 && cover_scan == 255) {
- FXSYS_memset32(dest_scan, FXARGB_MAKE(m_Gray, m_Gray, m_Gray, m_Gray), col_end - col_start);
+ FXSYS_memset(dest_scan, FXARGB_MAKE(m_Gray, m_Gray, m_Gray, m_Gray), col_end - col_start);
} else {
int src_alpha = m_Alpha;
#if 1
@@ -306,14 +306,14 @@
if (col_end < col_start) return; // do nothing.
dest_scan += col_start<<2;
if (m_Alpha == 255 && cover_scan == 255) {
- FXSYS_memset32(dest_scan, m_Color, (col_end - col_start)<<2);
+ FXSYS_memset(dest_scan, m_Color, (col_end - col_start)<<2);
return;
}
int src_alpha;
#if 0
if (m_bFullCover) {
if (m_Alpha == 255) {
- FXSYS_memset32(dest_scan, m_Color, (col_end - col_start)<<2);
+ FXSYS_memset(dest_scan, m_Color, (col_end - col_start)<<2);
return;
}
}
@@ -358,12 +358,12 @@
//ori_scan += col_start << 2;
if (m_Alpha == 255 && cover_scan == 255){
- FXSYS_memset32(dest_scan, m_Color, (col_end - col_start)<<2);
+ FXSYS_memset(dest_scan, m_Color, (col_end - col_start)<<2);
return;
}
if (cover_scan == 255) {
int dst_color = (0x00ffffff&m_Color)|(m_Alpha<<24);
- FXSYS_memset32(dest_scan, dst_color, (col_end - col_start)<<2);
+ FXSYS_memset(dest_scan, dst_color, (col_end - col_start)<<2);
return;
}
// Do not need origin bitmap, because of merge in pure transparent background
@@ -568,7 +568,7 @@
if (col_end < col_start) return; // do nothing.
dest_scan += (col_start << 2);
if (m_Alpha == 255 && cover_scan == 255) {
- FXSYS_memset32(dest_scan, m_Color, (col_end - col_start)<<2);
+ FXSYS_memset(dest_scan, m_Color, (col_end - col_start)<<2);
return;
}
int src_alpha;
@@ -601,7 +601,7 @@
dest_scan += col_start << 2;
ori_scan += col_start << 2;
if (m_Alpha == 255 && cover_scan == 255) {
- FXSYS_memset32(dest_scan, m_Color, (col_end - col_start)<<2);
+ FXSYS_memset(dest_scan, m_Color, (col_end - col_start)<<2);
return;
}
int src_alpha = m_Alpha;
@@ -1528,7 +1528,7 @@
if (result > 0) {
dest_pos = dest_scan + col_start;
if (result >= 4)
- FXSYS_memset32(dest_pos, FXARGB_MAKE(aa, aa, aa, aa),result);
+ FXSYS_memset(dest_pos, FXARGB_MAKE(aa, aa, aa, aa),result);
else
FXSYS_memset(dest_pos,aa,result);
}
@@ -1554,7 +1554,7 @@
if (result > 0) {
uint8_t* dest_pos = dest_scan + col_start;
if (result >= 4)
- FXSYS_memset32(dest_pos, 0xffffffff,result);
+ FXSYS_memset(dest_pos, 0xffffffff,result);
else
FXSYS_memset(dest_pos,255,result);
}
diff --git a/core/src/fxge/win32/fx_win32_device.cpp b/core/src/fxge/win32/fx_win32_device.cpp
index 5fb9036381..74d37855ed 100644
--- a/core/src/fxge/win32/fx_win32_device.cpp
+++ b/core/src/fxge/win32/fx_win32_device.cpp
@@ -141,7 +141,7 @@ FX_BOOL CWin32FontInfo::EnumFontList(CFX_FontMapper* pMapper)
{
m_pMapper = pMapper;
LOGFONTA lf;
- FXSYS_memset32(&lf, 0, sizeof(LOGFONTA));
+ FXSYS_memset(&lf, 0, sizeof(LOGFONTA));
lf.lfCharSet = DEFAULT_CHARSET;
lf.lfFaceName[0] = 0;
lf.lfPitchAndFamily = 0;
@@ -556,7 +556,7 @@ FX_BOOL CGdiDeviceDriver::GDI_StretchBitMask(const CFX_DIBitmap* pBitmap1, int d
BITMAPINFOHEADER bmiHeader;
FX_DWORD bmiColors[2];
} bmi;
- FXSYS_memset32(&bmi.bmiHeader, 0, sizeof (BITMAPINFOHEADER));
+ FXSYS_memset(&bmi.bmiHeader, 0, sizeof (BITMAPINFOHEADER));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biBitCount = 1;
bmi.bmiHeader.biCompression = BI_RGB;
@@ -953,7 +953,7 @@ FX_BOOL CGdiDisplayDriver::GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, v
BitBlt(hDCMemory, 0, 0, width, height, m_hDC, left, top, SRCCOPY);
SelectObject(hDCMemory, holdbmp);
BITMAPINFO bmi;
- FXSYS_memset32(&bmi, 0, sizeof bmi);
+ FXSYS_memset(&bmi, 0, sizeof bmi);
bmi.bmiHeader.biSize = sizeof bmi.bmiHeader;
bmi.bmiHeader.biBitCount = pBitmap->GetBPP();
bmi.bmiHeader.biHeight = -height;
@@ -1176,7 +1176,7 @@ IFX_RenderDeviceDriver* CFX_WindowsDevice::CreateDriver(HDC hDC, FX_BOOL bCmykOu
CFX_WinBitmapDevice::CFX_WinBitmapDevice(int width, int height, FXDIB_Format format)
{
BITMAPINFOHEADER bmih;
- FXSYS_memset32(&bmih, 0, sizeof (BITMAPINFOHEADER));
+ FXSYS_memset(&bmih, 0, sizeof (BITMAPINFOHEADER));
bmih.biSize = sizeof(BITMAPINFOHEADER);
bmih.biBitCount = format & 0xff;
bmih.biHeight = -height;
diff --git a/core/src/fxge/win32/fx_win32_dib.cpp b/core/src/fxge/win32/fx_win32_dib.cpp
index a3ec5cd6f0..f21c8b91a7 100644
--- a/core/src/fxge/win32/fx_win32_dib.cpp
+++ b/core/src/fxge/win32/fx_win32_dib.cpp
@@ -17,7 +17,7 @@ CFX_ByteString CFX_WindowsDIB::GetBitmapInfo(const CFX_DIBitmap* pBitmap)
len += sizeof (DWORD) * (int)(1 << pBitmap->GetBPP());
}
BITMAPINFOHEADER* pbmih = (BITMAPINFOHEADER*)result.GetBuffer(len);
- FXSYS_memset32(pbmih, 0, sizeof (BITMAPINFOHEADER));
+ FXSYS_memset(pbmih, 0, sizeof (BITMAPINFOHEADER));
pbmih->biSize = sizeof(BITMAPINFOHEADER);
pbmih->biBitCount = pBitmap->GetBPP();
pbmih->biCompression = BI_RGB;
@@ -69,14 +69,14 @@ CFX_DIBitmap* _FX_WindowsDIB_LoadFromBuf(BITMAPINFO* pbmi, LPVOID pData, FX_BOOL
delete pBitmap;
return NULL;
}
- FXSYS_memcpy32(pBitmap->GetBuffer(), pData, pitch * height);
+ FXSYS_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_memcpy32(temp_buf, pBitmap->GetBuffer() + top * pitch, pitch);
- FXSYS_memcpy32(pBitmap->GetBuffer() + top * pitch, pBitmap->GetBuffer() + bottom * pitch, pitch);
- FXSYS_memcpy32(pBitmap->GetBuffer() + bottom * pitch, temp_buf, pitch);
+ 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);
top ++;
bottom --;
}
@@ -193,7 +193,7 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadFromDDB(HDC hDC, HBITMAP hBitmap, FX_DWORD* pP
hDC = CreateCompatibleDC(NULL);
}
BITMAPINFOHEADER bmih;
- FXSYS_memset32(&bmih, 0, sizeof bmih);
+ FXSYS_memset(&bmih, 0, sizeof bmih);
bmih.biSize = sizeof bmih;
GetDIBits(hDC, hBitmap, 0, 0, NULL, (BITMAPINFO*)&bmih, DIB_RGB_COLORS);
int width = bmih.biWidth;
@@ -269,7 +269,7 @@ CFX_WindowsDIB::CFX_WindowsDIB(HDC hDC, int width, int height)
{
Create(width, height, FXDIB_Rgb, (uint8_t*)1);
BITMAPINFOHEADER bmih;
- FXSYS_memset32(&bmih, 0, sizeof bmih);
+ FXSYS_memset(&bmih, 0, sizeof bmih);
bmih.biSize = sizeof bmih;
bmih.biBitCount = 24;
bmih.biHeight = -height;
diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp
index 68a27ab38f..2c30a204ff 100644
--- a/core/src/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/src/fxge/win32/fx_win32_gdipext.cpp
@@ -1046,7 +1046,7 @@ public:
}
bytes_left = m_InterStream.GetLength() - m_ReadPos;
bytes_out = FX_MIN(cb, bytes_left);
- FXSYS_memcpy32(Output, m_InterStream.GetBuffer() + m_ReadPos, bytes_out);
+ FXSYS_memcpy(Output, m_InterStream.GetBuffer() + m_ReadPos, bytes_out);
m_ReadPos += (int32_t)bytes_out;
if (pcbRead != NULL) {
*pcbRead = (ULONG)bytes_out;
@@ -1246,10 +1246,10 @@ CFX_DIBitmap* CGdiplusExt::LoadDIBitmap(WINDIB_Open_Args_ args)
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_memcpy32(pData, pInfo->pScan0, dest_pitch * height);
+ FXSYS_memcpy(pData, pInfo->pScan0, dest_pitch * height);
} else {
for (int i = 0; i < height; i ++) {
- FXSYS_memcpy32(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride * i, dest_pitch);
+ FXSYS_memcpy(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride * i, dest_pitch);
}
}
CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf(pInfo->pbmi, pData, pInfo->pbmi->bmiHeader.biBitCount == 32);
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp
index 4600d186a6..8a7af568f2 100644
--- a/core/src/fxge/win32/fx_win32_print.cpp
+++ b/core/src/fxge/win32/fx_win32_print.cpp
@@ -160,7 +160,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, const CFX_Af
pTempBitmap->CopyPalette(pSrc->GetPalette());
uint8_t* dest_buf = pTempBitmap->GetBuffer();
int dest_pitch = pTempBitmap->GetPitch();
- FXSYS_memset8(dest_buf, pSrc->IsAlphaMask() ? 0 : 0xff, dest_pitch * result_height);
+ FXSYS_memset(dest_buf, pSrc->IsAlphaMask() ? 0 : 0xff, dest_pitch * result_height);
if (pSrcBitmap->IsAlphaMask()) {
for (int dest_y = 0; dest_y < result_height; dest_y ++) {
uint8_t* dest_scan = dest_buf + dest_y * dest_pitch;
diff --git a/core/src/reflow/layoutprocessor_reflow.cpp b/core/src/reflow/layoutprocessor_reflow.cpp
index 371f47e19c..81ba691c97 100644
--- a/core/src/reflow/layoutprocessor_reflow.cpp
+++ b/core/src/reflow/layoutprocessor_reflow.cpp
@@ -216,7 +216,7 @@ void CPDF_LayoutProcessor_Reflow::ProcessTable(FX_FLOAT dx)
int rowCount = pTable->m_nCell.GetSize();
int n = 0;
FX_FLOAT* dyRow = FX_Alloc(FX_FLOAT, rowCount + 1);
- FXSYS_memset32(dyRow, 0, sizeof(FX_FLOAT) * (rowCount + 1));
+ FXSYS_memset(dyRow, 0, sizeof(FX_FLOAT) * (rowCount + 1));
dyRow[0] = 0 ;
dyRow[0] = - pTable->m_ReflowPageHeight;
int tableColCount = 0;
@@ -229,7 +229,7 @@ void CPDF_LayoutProcessor_Reflow::ProcessTable(FX_FLOAT dx)
}
int cellCount = tableColCount * rowCount;
RF_TableCell** pVirtualTable = FX_Alloc(RF_TableCell*, cellCount);
- FXSYS_memset32(pVirtualTable, 0, sizeof(RF_TableCell*) * cellCount);
+ FXSYS_memset(pVirtualTable, 0, sizeof(RF_TableCell*) * cellCount);
for(i = 0; i < rowCount; i++) {
int colCount = pTable->m_nCell.GetAt(i);
FX_FLOAT rowWidth = 0;
@@ -589,7 +589,7 @@ void CPDF_LayoutProcessor_Reflow::ProcessElement(IPDF_LayoutElement* pElement, F
break;
}
RF_TableCell* pCell = FX_Alloc(RF_TableCell, 1);
- FXSYS_memset32(pCell, 0 , sizeof(RF_TableCell));
+ FXSYS_memset(pCell, 0 , sizeof(RF_TableCell));
CRF_Table* pTable = m_TableArray.GetAt(m_TableArray.GetSize() - 1);
int pos = pTable->m_nCell.GetSize() - 1;
pCell->m_BeginPos = m_pReflowedPage->m_pReflowed->GetSize();