1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00

split util.h

This commit is contained in:
Lu Wang 2012-11-29 18:28:07 +08:00
parent d179b50147
commit 56e59baeb2
14 changed files with 28 additions and 27 deletions

View File

@ -173,6 +173,8 @@ add_executable(pdf2htmlEX
src/util/ffw.c
src/util/math.h
src/util/math.cc
src/util/misc.h
src/util/misc.cc
src/util/namespace.h
src/util/path.h
src/util/path.cc
@ -181,8 +183,6 @@ add_executable(pdf2htmlEX
src/util/TmpFiles.cc
src/util/unicode.h
src/util/unicode.cc
src/util/util.h
src/util/util.cc
)
target_link_libraries(pdf2htmlEX ${PDF2HTMLEX_LIBS})

View File

@ -26,7 +26,7 @@
#include "Param.h"
#include "Preprocessor.h"
#include "util/util.h"
#include "util/const.h"
#include "util/string_formatter.h"
#include "util/TmpFiles.h"

View File

@ -12,6 +12,7 @@
#include "HTMLRenderer.h"
#include "util/namespace.h"
#include "util/unicode.h"
#include "util/math.h"
namespace pdf2htmlEX {
@ -19,6 +20,8 @@ using std::min;
using std::max;
using std::vector;
using std::ostream;
using std::cerr;
using std::endl;
void HTMLRenderer::LineBuffer::reset(GfxState * state)
{

View File

@ -15,7 +15,8 @@
#include <GfxFont.h>
#include "Preprocessor.h"
#include "util/util.h"
#include "util/misc.h"
#include "util/const.h"
namespace pdf2htmlEX {

View File

@ -14,6 +14,7 @@
#include <iostream>
#include "HTMLRenderer.h"
#include "util/misc.h"
#include "util/math.h"
#include "util/namespace.h"

View File

@ -14,6 +14,7 @@
#include "util/namespace.h"
#include "util/base64.h"
#include "util/math.h"
#include "util/misc.h"
namespace pdf2htmlEX {

View File

@ -31,6 +31,8 @@ using std::max;
using std::min_element;
using std::vector;
using std::abs;
using std::cerr;
using std::endl;
static void dummy(void *, enum ErrorCategory, int pos, char *)
{

View File

@ -17,10 +17,13 @@
#include "HTMLRenderer.h"
#include "util/namespace.h"
#include "util/math.h"
#include "util/misc.h"
namespace pdf2htmlEX {
using std::abs;
using std::cerr;
using std::endl;
const FontInfo * HTMLRenderer::install_font(GfxFont * font)
{

View File

@ -16,12 +16,15 @@
#include "HTMLRenderer.h"
#include "util/namespace.h"
#include "util/math.h"
#include "util/misc.h"
namespace pdf2htmlEX {
using std::ostringstream;
using std::min;
using std::max;
using std::cerr;
using std::endl;
/*
* The detailed rectangle area of the link destination

View File

@ -21,6 +21,7 @@
#include "util/unicode.h"
#include "util/path.h"
#include "util/math.h"
#include "util/misc.h"
namespace pdf2htmlEX {
@ -29,6 +30,8 @@ using std::min;
using std::all_of;
using std::floor;
using std::swap;
using std::cerr;
using std::endl;
string HTMLRenderer::dump_embedded_font (GfxFont * font, long long fn_id)
{

View File

@ -13,6 +13,10 @@
namespace pdf2htmlEX {
#ifndef nullptr
#define nullptr (NULL)
#endif
static const double EPS = 1e-6;
static const double DEFAULT_DPI = 72.0;
extern const double ID_MATRIX[6];

View File

@ -6,16 +6,9 @@
* 2012.08.10
*/
#include <errno.h>
#include <cctype>
#include <map>
#include <GfxState.h>
#include <GfxFont.h>
#include <CharTypes.h>
#include <GlobalParams.h>
#include <Object.h>
#include "util.h"
#include "misc.h"
using std::cerr;
using std::endl;

View File

@ -9,19 +9,9 @@
#ifndef UTIL_H__
#define UTIL_H__
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include "const.h"
#ifndef nullptr
#define nullptr (NULL)
#endif
#include <GfxState.h>
namespace pdf2htmlEX {
@ -30,7 +20,6 @@ static inline long long hash_ref(const Ref * id)
return (((long long)(id->num)) << (sizeof(id->gen)*8)) | (id->gen);
}
/*
* In PDF, edges of the rectangle are in the middle of the borders
* In HTML, edges are completely outside the rectangle

View File

@ -12,8 +12,6 @@
using std::hex;
using std::dec;
using std::string;
using std::cout;
using std::cerr;
using std::endl;
using std::make_pair;
using std::ifstream;