From ef720388947b1bd2563b928826ebd8bce25be986 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Fri, 16 Nov 2012 20:41:44 +0800 Subject: [PATCH] correct page count in prompt --- src/HTMLRenderer/general.cc | 2 +- src/Preprocessor.cc | 2 +- src/include/util.h | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/HTMLRenderer/general.cc b/src/HTMLRenderer/general.cc index 9080e0f..3cfec86 100644 --- a/src/HTMLRenderer/general.cc +++ b/src/HTMLRenderer/general.cc @@ -76,7 +76,7 @@ void HTMLRenderer::process(PDFDoc *doc) bg_renderer->startDoc(doc); } - int page_count = (param->last_page - param->first_page); + int page_count = (param->last_page - param->first_page + 1); for(int i = param->first_page; i <= param->last_page ; ++i) { cerr << "Working: " << (i-param->first_page) << "/" << page_count << '\r' << flush; diff --git a/src/Preprocessor.cc b/src/Preprocessor.cc index b2a9677..317c9cd 100644 --- a/src/Preprocessor.cc +++ b/src/Preprocessor.cc @@ -41,7 +41,7 @@ Preprocessor::~Preprocessor(void) void Preprocessor::process(PDFDoc * doc) { - int page_count = (param->last_page - param->first_page); + int page_count = (param->last_page - param->first_page + 1); for(int i = param->first_page; i <= param->last_page ; ++i) { cerr << "Preprocessing: " << (i-param->first_page) << "/" << page_count << '\r' << flush; diff --git a/src/include/util.h b/src/include/util.h index bb09467..e147230 100644 --- a/src/include/util.h +++ b/src/include/util.h @@ -57,15 +57,14 @@ static inline long long hash_ref(const Ref * id) } /* + * Check if the unicode is valid for HTML * http://en.wikipedia.org/wiki/HTML_decimal_character_rendering */ bool isLegalUnicode(Unicode u); Unicode map_to_private(CharCode code); -/* - * Try to determine the Unicode value directly from the information in the font - */ +/* * Try to determine the Unicode value directly from the information in the font */ Unicode unicode_from_font (CharCode code, GfxFont * font); /*