Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3231)

Unified Diff: core/fxcodec/codec/fx_codec.cpp

Issue 2019603002: Remove unused PS generation code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@print_clean
Patch Set: Remove more dead code - reland 2d63eaa Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fxcodec/codec/fx_codec.cpp
diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp
index f0f03ab0e93f53e88513dd09e93ce752112b7ead..6a45737b104614957f35d6e37601eecddca6a5dc 100644
--- a/core/fxcodec/codec/fx_codec.cpp
+++ b/core/fxcodec/codec/fx_codec.cpp
@@ -77,122 +77,6 @@ uint8_t* CCodec_ScanlineDecoder::ReadNextLine() {
return v_GetNextLine();
}
-FX_BOOL CCodec_BasicModule::RunLengthEncode(const uint8_t* src_buf,
- uint32_t src_size,
- uint8_t*& dest_buf,
- uint32_t& dest_size) {
- return FALSE;
-}
-
-#define EXPONENT_DETECT(ptr) \
- for (;; ptr++) { \
- if (!std::isdigit(*ptr)) { \
- if (endptr) \
- *endptr = (char*)ptr; \
- break; \
- } else { \
- exp_ret *= 10; \
- exp_ret += FXSYS_toDecimalDigit(*ptr); \
- continue; \
- } \
- }
-
-extern "C" double FXstrtod(const char* nptr, char** endptr) {
- double ret = 0.0;
- const char* ptr = nptr;
- const char* exp_ptr = NULL;
- int e_number = 0, e_signal = 0, e_point = 0, is_negative = 0;
- int exp_ret = 0, exp_sig = 1, fra_ret = 0, fra_count = 0, fra_base = 1;
- if (!nptr) {
- return 0.0;
- }
- for (;; ptr++) {
- if (!e_number && !e_point && (*ptr == '\t' || *ptr == ' '))
- continue;
-
- if (std::isdigit(*ptr)) {
- if (!e_number)
- e_number = 1;
-
- if (!e_point) {
- ret *= 10;
- ret += FXSYS_toDecimalDigit(*ptr);
- } else {
- fra_count++;
- fra_ret *= 10;
- fra_ret += FXSYS_toDecimalDigit(*ptr);
- }
- continue;
- }
- if (!e_point && *ptr == '.') {
- e_point = 1;
- continue;
- }
- if (!e_number && !e_point && !e_signal) {
- switch (*ptr) {
- case '-':
- is_negative = 1;
- case '+':
- e_signal = 1;
- continue;
- }
- }
- if (e_number && (*ptr == 'e' || *ptr == 'E')) {
- exp_ptr = ptr++;
- if (*ptr == '+' || *ptr == '-') {
- exp_sig = (*ptr++ == '+') ? 1 : -1;
- if (!std::isdigit(*ptr)) {
- if (endptr) {
- *endptr = (char*)exp_ptr;
- }
- break;
- }
- EXPONENT_DETECT(ptr);
- } else if (std::isdigit(*ptr)) {
- EXPONENT_DETECT(ptr);
- } else {
- if (endptr) {
- *endptr = (char*)exp_ptr;
- }
- break;
- }
- break;
- }
- if (ptr != nptr && !e_number) {
- if (endptr) {
- *endptr = (char*)nptr;
- }
- break;
- }
- if (endptr) {
- *endptr = (char*)ptr;
- }
- break;
- }
- while (fra_count--) {
- fra_base *= 10;
- }
- ret += (double)fra_ret / (double)fra_base;
- if (exp_sig == 1) {
- while (exp_ret--) {
- ret *= 10.0;
- }
- } else {
- while (exp_ret--) {
- ret /= 10.0;
- }
- }
- return is_negative ? -ret : ret;
-}
-#undef EXPONENT_DETECT
-
-FX_BOOL CCodec_BasicModule::A85Encode(const uint8_t* src_buf,
- uint32_t src_size,
- uint8_t*& dest_buf,
- uint32_t& dest_size) {
- return FALSE;
-}
-
#ifdef PDF_ENABLE_XFA
CFX_DIBAttribute::CFX_DIBAttribute()
: m_nXDPI(-1),

Powered by Google App Engine
This is Rietveld 408576698