summaryrefslogtreecommitdiff
path: root/core/fxcodec
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-03 14:50:05 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-03 19:15:09 +0000
commit7e7c649237b9d537226e3026aa9b5831862eee5b (patch)
treea905847ec19b45c45e54e50ae527d2acbefa7f97 /core/fxcodec
parent044a70da2aeaa5f4c73abfb75e81f79edd9014b8 (diff)
downloadpdfium-7e7c649237b9d537226e3026aa9b5831862eee5b.tar.xz
Drop FXSYS_ from string methods
This Cl drops the FXSYS_ from string methods which are the same on all platforms. Bug: pdfium:694 Change-Id: I1698aafd84f40474997549ae91ce35603377e303 Reviewed-on: https://pdfium-review.googlesource.com/3597 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec')
-rw-r--r--core/fxcodec/codec/ccodec_bmpmodule.cpp2
-rw-r--r--core/fxcodec/codec/ccodec_gifmodule.cpp2
-rw-r--r--core/fxcodec/codec/ccodec_pngmodule.cpp5
-rw-r--r--core/fxcodec/lgif/fx_gif.cpp16
4 files changed, 12 insertions, 13 deletions
diff --git a/core/fxcodec/codec/ccodec_bmpmodule.cpp b/core/fxcodec/codec/ccodec_bmpmodule.cpp
index f237b14448..d891a37ee4 100644
--- a/core/fxcodec/codec/ccodec_bmpmodule.cpp
+++ b/core/fxcodec/codec/ccodec_bmpmodule.cpp
@@ -28,7 +28,7 @@ static void bmp_free_func(void* p) {
};
static void bmp_error_data(bmp_decompress_struct_p bmp_ptr,
const char* err_msg) {
- FXSYS_strncpy((char*)bmp_ptr->err_ptr, err_msg, BMP_MAX_ERROR_SIZE - 1);
+ strncpy((char*)bmp_ptr->err_ptr, err_msg, BMP_MAX_ERROR_SIZE - 1);
longjmp(bmp_ptr->jmpbuf, 1);
}
static void bmp_read_scanline(bmp_decompress_struct_p bmp_ptr,
diff --git a/core/fxcodec/codec/ccodec_gifmodule.cpp b/core/fxcodec/codec/ccodec_gifmodule.cpp
index 91c64a06a1..b7352ba53c 100644
--- a/core/fxcodec/codec/ccodec_gifmodule.cpp
+++ b/core/fxcodec/codec/ccodec_gifmodule.cpp
@@ -30,7 +30,7 @@ static void gif_free_func(void* p) {
static void gif_error_data(gif_decompress_struct_p gif_ptr,
const char* err_msg) {
- FXSYS_strncpy((char*)gif_ptr->err_ptr, err_msg, GIF_MAX_ERROR_SIZE - 1);
+ strncpy((char*)gif_ptr->err_ptr, err_msg, GIF_MAX_ERROR_SIZE - 1);
longjmp(gif_ptr->jmpbuf, 1);
}
diff --git a/core/fxcodec/codec/ccodec_pngmodule.cpp b/core/fxcodec/codec/ccodec_pngmodule.cpp
index 4bd4cfce93..2b8f95799e 100644
--- a/core/fxcodec/codec/ccodec_pngmodule.cpp
+++ b/core/fxcodec/codec/ccodec_pngmodule.cpp
@@ -19,8 +19,7 @@ extern "C" {
static void _png_error_data(png_structp png_ptr, png_const_charp error_msg) {
if (png_get_error_ptr(png_ptr)) {
- FXSYS_strncpy((char*)png_get_error_ptr(png_ptr), error_msg,
- PNG_ERROR_SIZE - 1);
+ strncpy((char*)png_get_error_ptr(png_ptr), error_msg, PNG_ERROR_SIZE - 1);
}
longjmp(png_jmpbuf(png_ptr), 1);
}
@@ -252,7 +251,7 @@ bool CCodec_PngModule::Input(FXPNG_Context* ctx,
CFX_DIBAttribute* pAttribute) {
if (setjmp(png_jmpbuf(ctx->png_ptr))) {
if (pAttribute &&
- 0 == FXSYS_strcmp(m_szLastError, "Read Header Callback Error")) {
+ 0 == strcmp(m_szLastError, "Read Header Callback Error")) {
_png_load_bmp_attribute(ctx->png_ptr, ctx->info_ptr, pAttribute);
}
return false;
diff --git a/core/fxcodec/lgif/fx_gif.cpp b/core/fxcodec/lgif/fx_gif.cpp
index c109b6193d..52cb81bcab 100644
--- a/core/fxcodec/lgif/fx_gif.cpp
+++ b/core/fxcodec/lgif/fx_gif.cpp
@@ -103,15 +103,15 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, uint32_t& des_size) {
while (i <= des_size && (avail_in > 0 || bits_left >= code_size_cur)) {
if (code_size_cur > 12) {
if (err_msg_ptr) {
- FXSYS_strncpy(err_msg_ptr, "Code Length Out Of Range",
- GIF_MAX_ERROR_SIZE - 1);
+ strncpy(err_msg_ptr, "Code Length Out Of Range",
+ GIF_MAX_ERROR_SIZE - 1);
}
return 0;
}
if (avail_in > 0) {
if (bits_left > 31) {
if (err_msg_ptr)
- FXSYS_strncpy(err_msg_ptr, "Decode Error", GIF_MAX_ERROR_SIZE - 1);
+ strncpy(err_msg_ptr, "Decode Error", GIF_MAX_ERROR_SIZE - 1);
return 0;
}
pdfium::base::CheckedNumeric<uint32_t> safe_code = *next_in++;
@@ -119,8 +119,8 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, uint32_t& des_size) {
safe_code |= code_store;
if (!safe_code.IsValid()) {
if (err_msg_ptr) {
- FXSYS_strncpy(err_msg_ptr, "Code Store Out Of Range",
- GIF_MAX_ERROR_SIZE - 1);
+ strncpy(err_msg_ptr, "Code Store Out Of Range",
+ GIF_MAX_ERROR_SIZE - 1);
}
return 0;
}
@@ -146,8 +146,8 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, uint32_t& des_size) {
DecodeString(code);
} else if (code > code_next) {
if (err_msg_ptr) {
- FXSYS_strncpy(err_msg_ptr, "Decode Error, Out Of Range",
- GIF_MAX_ERROR_SIZE - 1);
+ strncpy(err_msg_ptr, "Decode Error, Out Of Range",
+ GIF_MAX_ERROR_SIZE - 1);
}
return 0;
} else {
@@ -522,7 +522,7 @@ int32_t gif_read_header(gif_decompress_struct_p gif_ptr) {
if (!gif_read_data(gif_ptr, (uint8_t**)&gif_header_ptr, 6))
return 2;
- if (FXSYS_strncmp(gif_header_ptr->signature, GIF_SIGNATURE, 3) != 0 ||
+ if (strncmp(gif_header_ptr->signature, GIF_SIGNATURE, 3) != 0 ||
gif_header_ptr->version[0] != '8' || gif_header_ptr->version[2] != 'a') {
gif_error(gif_ptr, "Not A Gif Image");
return 0;