debian/0000775000000000000000000000000012261275201007166 5ustar debian/copyright0000664000000000000000000000305511627427130011131 0ustar Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=174 Upstream-Name: libharu Upstream-Contact: libharu@googlegroups.com Source: http://libharu.org/files/libharu-2.2.1.tar.gz Files: * Copyright: 1999-2006, Takeshi Kanno Copyright: 2007-2011, Antony Dovgal License: Zlib Files: debian/* Copyright: 2010, Johan Van de Wauw License: Zlib Files: debian/patches/* Copyright: 2011, Antony Dovgal 2011, Daniel Höpfl License: Zlib License: Zlib Haru is distributed under the ZLIB/LIBPNG License. Because ZLIB/LIBPNG License is one of the freest licenses, You can use Haru for various purposes. The license of Haru is as follows. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. debian/changelog0000664000000000000000000000264312261275176011060 0ustar libharu (2.2.1-1ubuntu2) trusty; urgency=low * Use dh-autoreconf, resolving FTBFS on ppc64el. -- Daniel T Chen Thu, 02 Jan 2014 09:29:43 -0500 libharu (2.2.1-1ubuntu1) trusty; urgency=low * Use dh_autotools-dev to update config.{sub,guess} for AArch64. -- Matthias Klose Fri, 25 Oct 2013 18:06:13 +0200 libharu (2.2.1-1) unstable; urgency=low * update to upstream 2.2.1 * Set priority to optional instead of extra (Closes: #631332) * Remove unneeded patches (part of libharu 2.2.0 and above) * Import some upstream bugfixes * Update copyright/rules file, no dfsg cleaning needed anymore * Update package name to reflect soname change * Remove libtool-helper (*.la) and static library (*.a) from -dev package * Update copyright file to DEP-5 format -- Johan Van de Wauw Tue, 30 Aug 2011 18:39:57 -0400 libharu (2.1.0+dfsg-1) unstable; urgency=low * Initial release (Closes: #581397) * Delete unused windows build files * Delete non-free pngsuite from demos * Remove other copy of pngsuite * Remove demo pdf files * Remove font from demo (already in debian) * Remove font Penguinattack, already packaged * Delete unneeded autom4te cache files * Update example to work with font in debian * Initial import debian/* files * Update autotools -- Johan Van de Wauw Fri, 16 Jul 2010 20:35:57 +0200 debian/docs0000664000000000000000000000000711607771240010045 0ustar README debian/patches/0000775000000000000000000000000011627427123010624 5ustar debian/patches/0003-fix-typo-noticed-by-Franco-Marchesini.patch0000664000000000000000000000122611627427123021326 0ustar From: Antony Dovgal Date: Mon, 9 May 2011 23:10:51 +0400 Subject: fix typo (noticed by Franco Marchesini) --- src/hpdf_page_operator.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/hpdf_page_operator.c b/src/hpdf_page_operator.c index 87ec819..b01f54f 100644 --- a/src/hpdf_page_operator.c +++ b/src/hpdf_page_operator.c @@ -2430,7 +2430,7 @@ HPDF_Page_TextRect (HPDF_Page page, HPDF_Box bbox; HPDF_BOOL char_space_changed = HPDF_FALSE; - HPDF_PTRACE ((" HPDF_Page_TextOutEx\n")); + HPDF_PTRACE ((" HPDF_Page_TextRect\n")); if (ret != HPDF_OK) return ret; -- debian/patches/0005-fix-possible-endless-loops-in-PNG-handling-code.patch0000664000000000000000000000204411627427123023140 0ustar From: Antony Dovgal Date: Fri, 13 May 2011 15:54:20 +0400 Subject: fix possible endless loops in PNG handling code reported by Mathew Waters --- src/hpdf_image_png.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hpdf_image_png.c b/src/hpdf_image_png.c index 6057424..85bd29f 100644 --- a/src/hpdf_image_png.c +++ b/src/hpdf_image_png.c @@ -196,7 +196,7 @@ ReadTransparentPaletteData (HPDF_Dict image, for (i = 0; i < (HPDF_UINT)height; i++) { row_ptr[i] = HPDF_GetMem(image->mmgr, len); if (!row_ptr[i]) { - for (; i >= 0; i--) { + for (; i > 0; i--) { HPDF_FreeMem (image->mmgr, row_ptr[i]); } HPDF_FreeMem (image->mmgr, row_ptr); @@ -260,7 +260,7 @@ ReadTransparentPngData (HPDF_Dict image, for (i = 0; i < (HPDF_UINT)height; i++) { row_ptr[i] = HPDF_GetMem(image->mmgr, len); if (!row_ptr[i]) { - for (; i >= 0; i--) { + for (; i > 0; i--) { HPDF_FreeMem (image->mmgr, row_ptr[i]); } HPDF_FreeMem (image->mmgr, row_ptr); -- debian/patches/0002-fix-quite-a-number-of-warnings-patch-by-Davide-Achil.patch0000664000000000000000000011624011627427123024014 0ustar From: Antony Dovgal Date: Mon, 28 Mar 2011 17:41:42 +0400 Subject: fix quite a number of warnings (patch by Davide Achilli) Now it compiles without any warning under: - Microsoft Visual Studio 9.0 with maximum warning level (/W4) - Microsoft Visual C++ 6.0 with maximum warning level (/W4) - gcc 4.5.0 using -pedantic -Wall on Windows (MinGW) and Linux - gcc 4.1.2 using -pedantic -Wall on Linux (Red Hat 4.1.2-44) --- include/hpdf.h | 2 + src/hpdf_doc.c | 2 + src/hpdf_doc_png.c | 2 + src/hpdf_encoder.c | 19 +++++++----- src/hpdf_encoder_cns.c | 4 +++ src/hpdf_encoder_cnt.c | 2 + src/hpdf_encoder_jp.c | 4 +++ src/hpdf_encoder_kr.c | 4 +++ src/hpdf_encrypt.c | 30 ++++++++++---------- src/hpdf_encryptdict.c | 5 +++ src/hpdf_font_cid.c | 34 ++++++++++++------------ src/hpdf_font_tt.c | 6 ++-- src/hpdf_fontdef_tt.c | 66 +++++++++++++++++++++++----------------------- src/hpdf_fontdef_type1.c | 24 ++++++++-------- src/hpdf_image.c | 21 +++++++------- src/hpdf_namedict.c | 5 +++ src/hpdf_outline.c | 2 +- src/hpdf_pages.c | 13 +++++---- src/hpdf_pdfa.c | 2 + src/hpdf_streams.c | 22 ++++++++++----- src/hpdf_string.c | 4 +- src/hpdf_u3d.c | 15 +++++++--- src/hpdf_utils.c | 8 +++--- 23 files changed, 173 insertions(+), 123 deletions(-) diff --git a/include/hpdf.h b/include/hpdf.h index 6631ce6..bd71020 100644 --- a/include/hpdf.h +++ b/include/hpdf.h @@ -20,6 +20,8 @@ #include "hpdf_config.h" #include "hpdf_version.h" +#define HPDF_UNUSED(a) ((void)(a)) + #ifdef HPDF_DLL_MAKE # define HPDF_EXPORT(A) __declspec(dllexport) A __stdcall #else diff --git a/src/hpdf_doc.c b/src/hpdf_doc.c index 7c3dcd9..7ba58df 100644 --- a/src/hpdf_doc.c +++ b/src/hpdf_doc.c @@ -1521,6 +1521,7 @@ LoadTTFontFromStream (HPDF_Doc pdf, HPDF_FontDef def; HPDF_PTRACE ((" HPDF_LoadTTFontFromStream\n")); + HPDF_UNUSED (file_name); def = HPDF_TTFontDef_Load (pdf->mmgr, font_data, embedding); if (def) { @@ -1599,6 +1600,7 @@ LoadTTFontFromStream2 (HPDF_Doc pdf, HPDF_FontDef def; HPDF_PTRACE ((" HPDF_LoadTTFontFromStream2\n")); + HPDF_UNUSED (file_name); def = HPDF_TTFontDef_Load2 (pdf->mmgr, font_data, index, embedding); if (def) { diff --git a/src/hpdf_doc_png.c b/src/hpdf_doc_png.c index 263662b..bad87c6 100644 --- a/src/hpdf_doc_png.c +++ b/src/hpdf_doc_png.c @@ -174,6 +174,8 @@ LoadPngImageFromStream (HPDF_Doc pdf, HPDF_BOOL delayed_loading) { HPDF_SetError (&pdf->error, HPDF_UNSUPPORTED_FUNC, 0); + HPDF_UNUSED (delayed_loading); + HPDF_UNUSED (imagedata); return NULL; } diff --git a/src/hpdf_encoder.c b/src/hpdf_encoder.c index d168be6..b759c44 100644 --- a/src/hpdf_encoder.c +++ b/src/hpdf_encoder.c @@ -2605,8 +2605,8 @@ HPDF_UNICODE HPDF_CMapEncoder_ToUnicode (HPDF_Encoder encoder, HPDF_UINT16 code) { - HPDF_BYTE l = code; - HPDF_BYTE h = code >> 8; + HPDF_BYTE l = (HPDF_BYTE)code; + HPDF_BYTE h = (HPDF_BYTE)(code >> 8); HPDF_CMapEncoderAttr attr = (HPDF_CMapEncoderAttr)encoder->attr; return attr->unicode_map[l][h]; @@ -2617,8 +2617,8 @@ HPDF_UINT16 HPDF_CMapEncoder_ToCID (HPDF_Encoder encoder, HPDF_UINT16 code) { - HPDF_BYTE l = code; - HPDF_BYTE h = code >> 8; + HPDF_BYTE l = (HPDF_BYTE)code; + HPDF_BYTE h = (HPDF_BYTE)(code >> 8); HPDF_CMapEncoderAttr attr = (HPDF_CMapEncoderAttr)encoder->attr; @@ -2677,6 +2677,8 @@ HPDF_CMapEncoder_Write (HPDF_Encoder encoder, HPDF_Stream out) { HPDF_STATUS ret = HPDF_OK; + HPDF_UNUSED (out); + HPDF_UNUSED (encoder); return ret; } @@ -2689,6 +2691,7 @@ HPDF_Encoder_SetParseText (HPDF_Encoder encoder, HPDF_UINT len) { HPDF_PTRACE ((" HPDF_CMapEncoder_SetParseText\n")); + HPDF_UNUSED (encoder); state->text = text; state->index = 0; @@ -2755,8 +2758,8 @@ HPDF_CMapEncoder_AddCMap (HPDF_Encoder encoder, HPDF_STATUS ret; while (code <= range->to) { - HPDF_BYTE l = code; - HPDF_BYTE h = code >> 8; + HPDF_BYTE l = (HPDF_BYTE)code; + HPDF_BYTE h = (HPDF_BYTE)(code >> 8); attr->cid_map[l][h] = cid; code++; @@ -2843,8 +2846,8 @@ HPDF_CMapEncoder_SetUnicodeArray (HPDF_Encoder encoder, if (array != NULL) while (array->unicode != 0xffff) { - HPDF_BYTE l = array->code; - HPDF_BYTE h = array->code >> 8; + HPDF_BYTE l = (HPDF_BYTE)array->code; + HPDF_BYTE h = (HPDF_BYTE)(array->code >> 8); attr->unicode_map[l][h] = array->unicode; array++; } diff --git a/src/hpdf_encoder_cns.c b/src/hpdf_encoder_cns.c index 62c210e..e525c23 100644 --- a/src/hpdf_encoder_cns.c +++ b/src/hpdf_encoder_cns.c @@ -36077,6 +36077,7 @@ static HPDF_BOOL GBK_EUC_IsLeadByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return ((b >= 0x81 && b <= 0xfe)); } @@ -36085,6 +36086,7 @@ static HPDF_BOOL GBK_EUC_IsTrialByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return (b >= 0x40 && b <= 0xfe); } @@ -36200,6 +36202,7 @@ static HPDF_BOOL GB_EUC_IsLeadByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return (b >= 0xa1 && b <= 0xfe); } @@ -36208,6 +36211,7 @@ static HPDF_BOOL GB_EUC_IsTrialByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return (b >= 0xa1 && b <= 0xfe); } diff --git a/src/hpdf_encoder_cnt.c b/src/hpdf_encoder_cnt.c index e7afe4d..a3714fc 100644 --- a/src/hpdf_encoder_cnt.c +++ b/src/hpdf_encoder_cnt.c @@ -15158,6 +15158,7 @@ static HPDF_BOOL ETen_B5_IsLeadByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return ((b >= 0x81 && b <= 0xfe)); } @@ -15166,6 +15167,7 @@ static HPDF_BOOL ETen_B5_IsTrialByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return (b >= 0x40 && b <= 0xfe); } diff --git a/src/hpdf_encoder_jp.c b/src/hpdf_encoder_jp.c index 2ab69b6..11e5daf 100644 --- a/src/hpdf_encoder_jp.c +++ b/src/hpdf_encoder_jp.c @@ -15772,6 +15772,7 @@ static HPDF_BOOL RKSJ_IsLeadByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return ((b >= 0x81 && b <= 0x9f) || (b >= 0xe0 && b <= 0xfc)); } @@ -15780,6 +15781,7 @@ static HPDF_BOOL RKSJ_IsTrialByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return (b >= 0x40 && b <= 0xfc && b != 0x7f); } @@ -15953,6 +15955,7 @@ static HPDF_BOOL EUC_IsLeadByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return ((b >= 0xa1 && b <= 0xfe) || b == 0x8e); } @@ -15961,6 +15964,7 @@ static HPDF_BOOL EUC_IsTrialByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return (b >= 0xa0 && b <= 0xfe); } diff --git a/src/hpdf_encoder_kr.c b/src/hpdf_encoder_kr.c index deae18a..540b109 100644 --- a/src/hpdf_encoder_kr.c +++ b/src/hpdf_encoder_kr.c @@ -27642,6 +27642,7 @@ static HPDF_BOOL KSCms_UHC_IsLeadByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return (b >= 0x81 && b <= 0xFE); } @@ -27650,6 +27651,7 @@ static HPDF_BOOL KSCms_UHC_IsTrialByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return (b >= 0x41 && b <= 0xfe); } @@ -27807,6 +27809,7 @@ static HPDF_BOOL KSC_EUC_IsLeadByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return (b >= 0xa1 && b <= 0xfe); } @@ -27815,6 +27818,7 @@ static HPDF_BOOL KSC_EUC_IsTrialByte (HPDF_Encoder encoder, HPDF_BYTE b) { + HPDF_UNUSED (encoder); return (b >= 0xa0 && b <= 0xfe); } diff --git a/src/hpdf_encrypt.c b/src/hpdf_encrypt.c index 7e5542c..a534995 100644 --- a/src/hpdf_encrypt.c +++ b/src/hpdf_encrypt.c @@ -398,7 +398,7 @@ HPDF_Encrypt_CreateOwnerKey (HPDF_Encrypt attr) HPDF_BYTE new_key[HPDF_MD5_KEY_LEN]; for (j = 0; j < attr->key_len; j++) - new_key[j] = digest[j] ^ i; + new_key[j] = (HPDF_BYTE)(digest[j] ^ i); HPDF_PTRACE(("@ Algorithm 3.3 step 7 loop %u\n", i)); @@ -432,10 +432,10 @@ HPDF_Encrypt_CreateEncryptionKey (HPDF_Encrypt attr) /* Algorithm3.2 step4 */ HPDF_PTRACE(("@@@ permission =%d\n", attr->permission)); - tmp_flg[0] = attr->permission; - tmp_flg[1] = (attr->permission >> 8); - tmp_flg[2] = (attr->permission >> 16); - tmp_flg[3] = (attr->permission >> 24); + tmp_flg[0] = (HPDF_BYTE)(attr->permission); + tmp_flg[1] = (HPDF_BYTE)(attr->permission >> 8); + tmp_flg[2] = (HPDF_BYTE)(attr->permission >> 16); + tmp_flg[3] = (HPDF_BYTE)(attr->permission >> 24); HPDF_MD5Update(&md5_ctx, tmp_flg, 4); @@ -502,7 +502,7 @@ HPDF_Encrypt_CreateUserKey (HPDF_Encrypt attr) HPDF_PTRACE(("@ Algorithm 3.5 step 5 loop %u\n", i)); for (j = 0; j < attr->key_len; j++) - new_key[j] = attr->encryption_key[j] ^ i; + new_key[j] = (HPDF_BYTE)(attr->encryption_key[j] ^ i); HPDF_MemCpy (digest, digest2, HPDF_MD5_KEY_LEN); @@ -529,7 +529,7 @@ ARC4Init (HPDF_ARC4_Ctx_Rec *ctx, HPDF_PTRACE((" ARC4Init\n")); for (i = 0; i < HPDF_ARC4_BUF_SIZE; i++) - ctx->state[i] = i; + ctx->state[i] = (HPDF_BYTE)i; for (i = 0; i < HPDF_ARC4_BUF_SIZE; i++) tmp_array[i] = key[i % key_len]; @@ -564,8 +564,8 @@ ARC4CryptBuf (HPDF_ARC4_Ctx_Rec *ctx, for (i = 0; i < len; i++) { HPDF_BYTE tmp; - ctx->idx1 = (ctx->idx1 + 1) % 256; - ctx->idx2 = (ctx->idx2 + ctx->state[ctx->idx1]) % 256; + ctx->idx1 = (HPDF_BYTE)((ctx->idx1 + 1) % 256); + ctx->idx2 = (HPDF_BYTE)((ctx->idx2 + ctx->state[ctx->idx1]) % 256); tmp = ctx->state[ctx->idx1]; ctx->state[ctx->idx1] = ctx->state[ctx->idx2]; @@ -574,7 +574,7 @@ ARC4CryptBuf (HPDF_ARC4_Ctx_Rec *ctx, t = (ctx->state[ctx->idx1] + ctx->state[ctx->idx2]) % 256; K = ctx->state[t]; - out[i] = in[i] ^ K; + out[i] = (HPDF_BYTE)(in[i] ^ K); } } @@ -589,11 +589,11 @@ HPDF_Encrypt_InitKey (HPDF_Encrypt attr, HPDF_PTRACE((" HPDF_Encrypt_Init\n")); - attr->encryption_key[attr->key_len] = object_id; - attr->encryption_key[attr->key_len + 1] = (object_id >> 8); - attr->encryption_key[attr->key_len + 2] = (object_id >> 16); - attr->encryption_key[attr->key_len + 3] = gen_no; - attr->encryption_key[attr->key_len + 4] = (gen_no >> 8); + attr->encryption_key[attr->key_len] = (HPDF_BYTE)object_id; + attr->encryption_key[attr->key_len + 1] = (HPDF_BYTE)(object_id >> 8); + attr->encryption_key[attr->key_len + 2] = (HPDF_BYTE)(object_id >> 16); + attr->encryption_key[attr->key_len + 3] = (HPDF_BYTE)gen_no; + attr->encryption_key[attr->key_len + 4] = (HPDF_BYTE)(gen_no >> 8); HPDF_PTRACE(("@@@ OID=%u, gen_no=%u\n", (HPDF_INT)object_id, gen_no)); diff --git a/src/hpdf_encryptdict.c b/src/hpdf_encryptdict.c index be69d94..1708d77 100644 --- a/src/hpdf_encryptdict.c +++ b/src/hpdf_encryptdict.c @@ -21,6 +21,9 @@ #include "hpdf_objects.h" #include "hpdf_encryptdict.h" #include "hpdf_info.h" +#ifndef HPDF_UNUSED +#define HPDF_UNUSED(a) ((void)(a)) +#endif HPDF_EncryptDict HPDF_EncryptDict_New (HPDF_MMgr mmgr, @@ -70,6 +73,8 @@ HPDF_EncryptDict_CreateID (HPDF_EncryptDict dict, #endif /* LIBHPDF_DEBUG */ HPDF_MD5Init (&ctx); + HPDF_UNUSED (xref); + HPDF_UNUSED (info); #ifndef LIBHPDF_DEBUG HPDF_MD5Update(&ctx, (HPDF_BYTE *)&t, sizeof(t)); diff --git a/src/hpdf_font_cid.c b/src/hpdf_font_cid.c index 8b65c34..e4aed13 100644 --- a/src/hpdf_font_cid.c +++ b/src/hpdf_font_cid.c @@ -359,9 +359,9 @@ CIDFontType2_New (HPDF_Font parent, HPDF_Xref xref) if (HPDF_Dict_Add (font, "DW2", array) != HPDF_OK) return NULL; - ret += HPDF_Array_AddNumber (array, fontdef->font_bbox.bottom); - ret += HPDF_Array_AddNumber (array, fontdef->font_bbox.bottom - - fontdef->font_bbox.top); + ret += HPDF_Array_AddNumber (array, (HPDF_INT32)(fontdef->font_bbox.bottom)); + ret += HPDF_Array_AddNumber (array, (HPDF_INT32)(fontdef->font_bbox.bottom - + fontdef->font_bbox.top)); HPDF_MemSet (tmp_map, 0, sizeof(HPDF_UNICODE) * 65536); @@ -432,8 +432,8 @@ CIDFontType2_New (HPDF_Font parent, HPDF_Xref xref) HPDF_BYTE u[2]; HPDF_UINT16 gid = tmp_map[i]; - u[0] = gid >> 8; - u[1] = gid; + u[0] = (HPDF_BYTE)(gid >> 8); + u[1] = (HPDF_BYTE)gid; HPDF_MemCpy ((HPDF_BYTE *)(tmp_map + i), u, 2); } @@ -569,8 +569,8 @@ TextWidth (HPDF_Font font, (HPDF_CIDFontDefAttr)attr->fontdef->attr; dw2 = cid_fontdef_attr->DW2[1]; } else { - dw2 = attr->fontdef->font_bbox.bottom - - attr->fontdef->font_bbox.top; + dw2 = (HPDF_INT)(attr->fontdef->font_bbox.bottom - + attr->fontdef->font_bbox.top); } HPDF_Encoder_SetParseText (encoder, &parse_state, text, len); @@ -587,7 +587,7 @@ TextWidth (HPDF_Font font, if (btype == HPDF_BYTE_TYPE_LEAD) { code <<= 8; - code += *text; + code = (HPDF_UINT16)(code + *text); } if (btype != HPDF_BYTE_TYPE_TRIAL) { @@ -654,8 +654,8 @@ MeasureText (HPDF_Font font, (HPDF_CIDFontDefAttr)attr->fontdef->attr; dw2 = cid_fontdef_attr->DW2[1]; } else { - dw2 = attr->fontdef->font_bbox.bottom - - attr->fontdef->font_bbox.top; + dw2 = (HPDF_INT)(attr->fontdef->font_bbox.bottom - + attr->fontdef->font_bbox.top); } HPDF_Encoder_SetParseText (encoder, &parse_state, text, len); @@ -670,7 +670,7 @@ MeasureText (HPDF_Font font, if (btype == HPDF_BYTE_TYPE_LEAD) { code <<= 8; - code += b2; + code = (HPDF_UINT16)(code + b2); } if (!wordwrap) { @@ -718,14 +718,14 @@ MeasureText (HPDF_Font font, unicode); } } else { - tmp_w = -dw2; + tmp_w = (HPDF_UINT16)(-dw2); } if (i > 0) w += char_space; } - w += (HPDF_DOUBLE)tmp_w * font_size / 1000; + w += (HPDF_REAL)((HPDF_DOUBLE)tmp_w * font_size / 1000); /* 2006.08.04 break when it encountered line feed */ if (w > width || b == 0x0A) @@ -766,14 +766,14 @@ UINT16ToHex (char *s, *s++ = '<'; if (b[0] != 0) { - c = b[0] >> 4; + c = (char)(b[0] >> 4); if (c <= 9) c += 0x30; else c += 0x41 - 10; *s++ = c; - c = b[0] & 0x0f; + c = (char)(b[0] & 0x0f); if (c <= 9) c += 0x30; else @@ -781,14 +781,14 @@ UINT16ToHex (char *s, *s++ = c; } - c = b[1] >> 4; + c = (char)(b[1] >> 4); if (c <= 9) c += 0x30; else c += 0x41 - 10; *s++ = c; - c = b[1] & 0x0f; + c = (char)(b[1] & 0x0f); if (c <= 9) c += 0x30; else diff --git a/src/hpdf_font_tt.c b/src/hpdf_font_tt.c index 2aa1b63..5abb12f 100644 --- a/src/hpdf_font_tt.c +++ b/src/hpdf_font_tt.c @@ -307,14 +307,14 @@ MeasureText (HPDF_Font font, tmp_len = i + 1; if (real_width) - *real_width = w; + *real_width = (HPDF_REAL)w; w += word_space; } else if (!wordwrap) { tmp_len = i; if (real_width) - *real_width = w; + *real_width = (HPDF_REAL)w; } w += (HPDF_DOUBLE)CharWidth (font, b) * font_size / 1000; @@ -329,7 +329,7 @@ MeasureText (HPDF_Font font, /* all of text can be put in the specified width */ if (real_width) - *real_width = w; + *real_width = (HPDF_REAL)w; return len; } diff --git a/src/hpdf_fontdef_tt.c b/src/hpdf_fontdef_tt.c index d6f15ce..7167987 100644 --- a/src/hpdf_fontdef_tt.c +++ b/src/hpdf_fontdef_tt.c @@ -460,11 +460,11 @@ LoadFontData (HPDF_FontDef fontdef, attr->glyph_tbl.base_offset = tbl->offset; fontdef->cap_height = - HPDF_TTFontDef_GetCharBBox (fontdef, (HPDF_UINT16)'H').top; + (HPDF_UINT16)HPDF_TTFontDef_GetCharBBox (fontdef, (HPDF_UINT16)'H').top; fontdef->x_height = - HPDF_TTFontDef_GetCharBBox (fontdef, (HPDF_UINT16)'x').top; - fontdef->missing_width = (HPDF_UINT32)attr->h_metric[0].advance_width * 1000 / - attr->header.units_per_em; + (HPDF_UINT16)HPDF_TTFontDef_GetCharBBox (fontdef, (HPDF_UINT16)'x').top; + fontdef->missing_width = (HPDF_INT16)((HPDF_UINT32)attr->h_metric[0].advance_width * 1000 / + attr->header.units_per_em); HPDF_PTRACE ((" fontdef->cap_height=%d\n", fontdef->cap_height)); HPDF_PTRACE ((" fontdef->x_height=%d\n", fontdef->x_height)); @@ -560,16 +560,16 @@ HPDF_TTFontDef_GetCharBBox (HPDF_FontDef fontdef, return bbox; ret += GetINT16 (attr->stream, &i); - bbox.left = (HPDF_INT32)i * 1000 / attr->header.units_per_em; + bbox.left = (HPDF_REAL)((HPDF_INT32)i * 1000 / attr->header.units_per_em); ret += GetINT16 (attr->stream, &i); - bbox.bottom = (HPDF_INT32)i * 1000 / attr->header.units_per_em; + bbox.bottom = (HPDF_REAL)((HPDF_INT32)i * 1000 / attr->header.units_per_em); ret += GetINT16 (attr->stream, &i); - bbox.right = (HPDF_INT32)i * 1000 / attr->header.units_per_em; + bbox.right = (HPDF_REAL)((HPDF_INT32)i * 1000 / attr->header.units_per_em); ret += GetINT16 (attr->stream, &i); - bbox.top = (HPDF_INT32)i * 1000 / attr->header.units_per_em; + bbox.top = (HPDF_REAL)((HPDF_INT32)i * 1000 / attr->header.units_per_em); if (ret != HPDF_OK) return HPDF_ToBox(0, 0, 0, 0); @@ -785,14 +785,14 @@ ParseHead (HPDF_FontDef fontdef) if (ret != HPDF_OK) return HPDF_Error_GetCode (fontdef->error); - fontdef->font_bbox. left = (HPDF_INT32)attr->header.x_min * 1000 / - attr->header.units_per_em; - fontdef->font_bbox. bottom = (HPDF_INT32)attr->header.y_min * 1000 / - attr->header.units_per_em; - fontdef->font_bbox. right = (HPDF_INT32)attr->header.x_max * 1000 / - attr->header.units_per_em; - fontdef->font_bbox. top = (HPDF_INT32)attr->header.y_max * 1000 / - attr->header.units_per_em; + fontdef->font_bbox. left = (HPDF_REAL)((HPDF_INT32)attr->header.x_min * 1000 / + attr->header.units_per_em); + fontdef->font_bbox. bottom = (HPDF_REAL)((HPDF_INT32)attr->header.y_min * 1000 / + attr->header.units_per_em); + fontdef->font_bbox. right = (HPDF_REAL)((HPDF_INT32)attr->header.x_max * 1000 / + attr->header.units_per_em); + fontdef->font_bbox. top = (HPDF_REAL)((HPDF_INT32)attr->header.y_max * 1000 / + attr->header.units_per_em); return HPDF_OK; } @@ -840,11 +840,11 @@ ParseHhea (HPDF_FontDef fontdef) return ret; ret += GetINT16 (attr->stream, &fontdef->ascent); - fontdef->ascent = (HPDF_INT32)fontdef->ascent * 1000 / - attr->header.units_per_em; + fontdef->ascent = (HPDF_INT16)((HPDF_INT32)fontdef->ascent * 1000 / + attr->header.units_per_em); ret += GetINT16 (attr->stream, &fontdef->descent); - fontdef->descent = (HPDF_INT32)fontdef->descent * 1000 / - attr->header.units_per_em; + fontdef->descent = (HPDF_INT16)((HPDF_INT32)fontdef->descent * 1000 / + attr->header.units_per_em); if (ret != HPDF_OK) return HPDF_Error_GetCode (fontdef->error); @@ -1052,7 +1052,7 @@ ParseCMAP_format4 (HPDF_FontDef fontdef, return HPDF_Error_GetCode (fontdef->error); pend_count = attr->cmap.end_count; - for (i = 0; i < attr->cmap.seg_count_x2 / 2; i++) + for (i = 0; i < (HPDF_UINT)attr->cmap.seg_count_x2 / 2; i++) if ((ret = GetUINT16 (attr->stream, pend_count++)) != HPDF_OK) return ret; @@ -1066,7 +1066,7 @@ ParseCMAP_format4 (HPDF_FontDef fontdef, return HPDF_Error_GetCode (fontdef->error); pstart_count = attr->cmap.start_count; - for (i = 0; i < attr->cmap.seg_count_x2 / 2; i++) + for (i = 0; i < (HPDF_UINT)attr->cmap.seg_count_x2 / 2; i++) if ((ret = GetUINT16 (attr->stream, pstart_count++)) != HPDF_OK) return ret; @@ -1077,7 +1077,7 @@ ParseCMAP_format4 (HPDF_FontDef fontdef, return HPDF_Error_GetCode (fontdef->error); pid_delta = attr->cmap.id_delta; - for (i = 0; i < attr->cmap.seg_count_x2 / 2; i++) + for (i = 0; i < (HPDF_UINT)attr->cmap.seg_count_x2 / 2; i++) if ((ret = GetINT16 (attr->stream, pid_delta++)) != HPDF_OK) return ret; @@ -1088,7 +1088,7 @@ ParseCMAP_format4 (HPDF_FontDef fontdef, return HPDF_Error_GetCode (fontdef->error); pid_range_offset = attr->cmap.id_range_offset; - for (i = 0; i < attr->cmap.seg_count_x2 / 2; i++) + for (i = 0; i < (HPDF_UINT)attr->cmap.seg_count_x2 / 2; i++) if ((ret = GetUINT16 (attr->stream, pid_range_offset++)) != HPDF_OK) return ret; @@ -1114,7 +1114,7 @@ ParseCMAP_format4 (HPDF_FontDef fontdef, #ifdef LIBHPDF_DEBUG /* print all elements of cmap table */ - for (i = 0; i < attr->cmap.seg_count_x2 / 2; i++) { + for (i = 0; i < (HPDF_UINT)attr->cmap.seg_count_x2 / 2; i++) { HPDF_PTRACE((" ParseCMAP_format4[%d] start_count=0x%04X, " "end_count=0x%04X, id_delta=%d, id_range_offset=%u\n", i, attr->cmap.start_count[i], attr->cmap.end_count[i], @@ -1166,7 +1166,7 @@ HPDF_TTFontDef_GetGlyphid (HPDF_FontDef fontdef, " ret=%u\n", i, unicode, unicode + attr->cmap.id_delta[i])); - return unicode + attr->cmap.id_delta[i]; + return (HPDF_UINT16)(unicode + attr->cmap.id_delta[i]); } else { HPDF_UINT idx = attr->cmap.id_range_offset[i] / 2 + (unicode - attr->cmap.start_count[i]) - (seg_count - i); @@ -1176,8 +1176,8 @@ HPDF_TTFontDef_GetGlyphid (HPDF_FontDef fontdef, i, idx, (HPDF_UINT)attr->cmap.glyph_id_array_count)); return 0; } else { - HPDF_UINT16 gid = attr->cmap.glyph_id_array[idx] + - attr->cmap.id_delta[i]; + HPDF_UINT16 gid = (HPDF_UINT16)(attr->cmap.glyph_id_array[idx] + + attr->cmap.id_delta[i]); HPDF_PTRACE((" HPDF_TTFontDef_GetGlyphid idx=%u unicode=0x%04X " "id=%u\n", idx, unicode, gid)); return gid; @@ -1212,8 +1212,8 @@ HPDF_TTFontDef_GetCharWidth (HPDF_FontDef fontdef, CheckCompositGryph (fontdef, gid); } - advance_width = (HPDF_UINT)hmetrics.advance_width * 1000 / - attr->header.units_per_em; + advance_width = (HPDF_UINT16)((HPDF_UINT)hmetrics.advance_width * 1000 / + attr->header.units_per_em); return (HPDF_INT16)advance_width; } @@ -1323,8 +1323,8 @@ HPDF_TTFontDef_GetGidWidth (HPDF_FontDef fontdef, hmetrics = attr->h_metric[gid]; - advance_width = (HPDF_UINT)hmetrics.advance_width * 1000 / - attr->header.units_per_em; + advance_width = (HPDF_UINT16)((HPDF_UINT)hmetrics.advance_width * 1000 / + attr->header.units_per_em); HPDF_PTRACE((" HPDF_TTFontDef_GetGidWidth gid=%u, width=%u\n", gid, advance_width)); @@ -1955,7 +1955,7 @@ HPDF_TTFontDef_SaveFontData (HPDF_FontDef fontdef, HPDF_Stream tmp_stream; HPDF_UINT32 *new_offsets; HPDF_UINT i; - HPDF_UINT32 check_sum_ptr; + HPDF_UINT32 check_sum_ptr = 0; HPDF_STATUS ret; HPDF_UINT32 offset_base; HPDF_UINT32 tmp_check_sum = 0xB1B0AFBA; diff --git a/src/hpdf_fontdef_type1.c b/src/hpdf_fontdef_type1.c index dadfdb8..499f521 100644 --- a/src/hpdf_fontdef_type1.c +++ b/src/hpdf_fontdef_type1.c @@ -175,7 +175,7 @@ LoadAfm (HPDF_FontDef fontdef, } else if (HPDF_StrCmp (keyword, "ItalicAngle") == 0) { - fontdef->italic_angle = HPDF_AToI (s); + fontdef->italic_angle = (HPDF_INT16)HPDF_AToI (s); if (fontdef->italic_angle != 0) fontdef->flags |= HPDF_FONT_ITALIC; } else @@ -195,35 +195,35 @@ LoadAfm (HPDF_FontDef fontdef, char buf[HPDF_INT_LEN + 1]; s = GetKeyword (s, buf, HPDF_INT_LEN + 1); - fontdef->font_bbox.left = HPDF_AToI (buf); + fontdef->font_bbox.left = (HPDF_REAL)HPDF_AToI (buf); s = GetKeyword (s, buf, HPDF_INT_LEN + 1); - fontdef->font_bbox.bottom = HPDF_AToI (buf); + fontdef->font_bbox.bottom = (HPDF_REAL)HPDF_AToI (buf); s = GetKeyword (s, buf, HPDF_INT_LEN + 1); - fontdef->font_bbox.right = HPDF_AToI (buf); + fontdef->font_bbox.right = (HPDF_REAL)HPDF_AToI (buf); GetKeyword (s, buf, HPDF_INT_LEN + 1); - fontdef->font_bbox.top = HPDF_AToI (buf); + fontdef->font_bbox.top = (HPDF_REAL)HPDF_AToI (buf); } else if (HPDF_StrCmp (keyword, "EncodingScheme") == 0) { HPDF_StrCpy (attr->encoding_scheme, s, attr->encoding_scheme + HPDF_LIMIT_MAX_NAME_LEN); } else if (HPDF_StrCmp (keyword, "CapHeight") == 0) { - fontdef->cap_height = HPDF_AToI (s); + fontdef->cap_height = (HPDF_UINT16)HPDF_AToI (s); } else if (HPDF_StrCmp (keyword, "Ascender") == 0) { - fontdef->ascent = HPDF_AToI (s); + fontdef->ascent = (HPDF_INT16)HPDF_AToI (s); } else if (HPDF_StrCmp (keyword, "Descender") == 0) { - fontdef->descent = HPDF_AToI (s); + fontdef->descent = (HPDF_INT16)HPDF_AToI (s); } else if (HPDF_StrCmp (keyword, "STDHW") == 0) { - fontdef->stemh = HPDF_AToI (s); + fontdef->stemh = (HPDF_UINT16)HPDF_AToI (s); } else if (HPDF_StrCmp (keyword, "STDHV") == 0) { - fontdef->stemv = HPDF_AToI (s); + fontdef->stemv = (HPDF_UINT16)HPDF_AToI (s); } else if (HPDF_StrCmp (keyword, "StartCharMetrics") == 0) { attr->widths_count = HPDF_AToI (s); @@ -261,7 +261,7 @@ LoadAfm (HPDF_FontDef fontdef, s = GetKeyword (s, buf2, HPDF_LIMIT_MAX_NAME_LEN + 1); HPDF_AToI (buf2); - cdata->char_cd = HPDF_AToI (buf2); + cdata->char_cd = (HPDF_INT16)HPDF_AToI (buf2); } else return HPDF_SetError (fontdef->error, @@ -278,7 +278,7 @@ LoadAfm (HPDF_FontDef fontdef, if (buf2[0] == 0) return HPDF_SetError (fontdef->error, HPDF_INVALID_WX_DATA, 0); - cdata->width = HPDF_AToI (buf2); + cdata->width = (HPDF_INT16)HPDF_AToI (buf2); /* N PostScript language character name */ s = HPDF_StrStr (s, "N ", 0); diff --git a/src/hpdf_image.c b/src/hpdf_image.c index d8802d6..eeec7c2 100644 --- a/src/hpdf_image.c +++ b/src/hpdf_image.c @@ -329,7 +329,7 @@ HPDF_Image_LoadRawImageFromMem (HPDF_MMgr mmgr, { HPDF_Dict image; HPDF_STATUS ret = HPDF_OK; - HPDF_UINT size; + HPDF_UINT size=0; HPDF_PTRACE ((" HPDF_Image_LoadRawImageFromMem\n")); @@ -358,19 +358,20 @@ HPDF_Image_LoadRawImageFromMem (HPDF_MMgr mmgr, switch (color_space) { case HPDF_CS_DEVICE_GRAY: - size = (HPDF_DOUBLE)width * height / (8 / bits_per_component) + 0.876; + size = (HPDF_UINT)((HPDF_DOUBLE)width * height / (8 / bits_per_component) + 0.876); ret = HPDF_Dict_AddName (image, "ColorSpace", COL_GRAY); break; case HPDF_CS_DEVICE_RGB: - size = (HPDF_DOUBLE)width * height / (8 / bits_per_component) + 0.876; + size = (HPDF_UINT)((HPDF_DOUBLE)width * height / (8 / bits_per_component) + 0.876); size *= 3; ret = HPDF_Dict_AddName (image, "ColorSpace", COL_RGB); break; case HPDF_CS_DEVICE_CMYK: - size = (HPDF_DOUBLE)width * height / (8 / bits_per_component) + 0.876; + size = (HPDF_UINT)((HPDF_DOUBLE)width * height / (8 / bits_per_component) + 0.876); size *= 4; ret = HPDF_Dict_AddName (image, "ColorSpace", COL_CMYK); break; + default:; } if (ret != HPDF_OK) @@ -435,8 +436,8 @@ HPDF_Image_GetSize (HPDF_Image image) height = HPDF_Dict_GetItem (image, "Height", HPDF_OCLASS_NUMBER); if (width && height) { - ret.x = width->value; - ret.y = height->value; + ret.x = (HPDF_REAL)width->value; + ret.y = (HPDF_REAL)height->value; } return ret; @@ -459,8 +460,8 @@ HPDF_Image_GetSize2 (HPDF_Image image, HPDF_Point *size) height = HPDF_Dict_GetItem (image, "Height", HPDF_OCLASS_NUMBER); if (width && height) { - size->x = width->value; - size->y = height->value; + size->x = (HPDF_REAL)width->value; + size->y = (HPDF_REAL)height->value; } return HPDF_OK; @@ -516,13 +517,13 @@ HPDF_Image_GetColorSpace (HPDF_Image image) HPDF_EXPORT(HPDF_UINT) HPDF_Image_GetWidth (HPDF_Image image) { - return HPDF_Image_GetSize (image).x; + return (HPDF_UINT)HPDF_Image_GetSize (image).x; } HPDF_EXPORT(HPDF_UINT) HPDF_Image_GetHeight (HPDF_Image image) { - return HPDF_Image_GetSize (image).y; + return (HPDF_UINT)HPDF_Image_GetSize (image).y; } HPDF_STATUS diff --git a/src/hpdf_namedict.c b/src/hpdf_namedict.c index ed475b9..f2dff73 100644 --- a/src/hpdf_namedict.c +++ b/src/hpdf_namedict.c @@ -20,6 +20,10 @@ #include "hpdf_consts.h" #include "hpdf_namedict.h" +#ifndef HPDF_UNUSED +#define HPDF_UNUSED(a) ((void)(a)) +#endif + static const char *HPDF_NAMEDICT_KEYS[] = { "EmbeddedFiles" }; @@ -225,5 +229,6 @@ HPDF_EmbeddedFile_New (HPDF_MMgr mmgr, HPDF_BOOL HPDF_EmbeddedFile_Validate (HPDF_EmbeddedFile emfile) { + HPDF_UNUSED (emfile); return HPDF_TRUE; } diff --git a/src/hpdf_outline.c b/src/hpdf_outline.c index cc2b9d7..87cce04 100644 --- a/src/hpdf_outline.c +++ b/src/hpdf_outline.c @@ -235,7 +235,7 @@ BeforeWrite (HPDF_Dict obj) return HPDF_Dict_RemoveElement (obj, "Count"); if (!HPDF_Outline_GetOpened ((HPDF_Outline)obj)) - count *= -1; + count = count * -1; if (n) n->value = count; diff --git a/src/hpdf_pages.c b/src/hpdf_pages.c index 5edfe74..683620a 100644 --- a/src/hpdf_pages.c +++ b/src/hpdf_pages.c @@ -32,11 +32,11 @@ typedef struct _HPDF_PageSizeValue { static HPDF_PageSizeValue HPDF_PREDEFINED_PAGE_SIZES[] = { {612, 792}, /* HPDF_PAGE_SIZE_LETTER */ {612, 1008}, /* HPDF_PAGE_SIZE_LEGAL */ - {841.89, 1199.551}, /* HPDF_PAGE_SIZE_A3 */ - {595.276, 841.89}, /* HPDF_PAGE_SIZE_A4 */ - {419.528, 595.276}, /* HPDF_PAGE_SIZE_A5 */ - {708.661, 1000.63}, /* HPDF_PAGE_SIZE_B4 */ - {498.898, 708.661}, /* HPDF_PAGE_SIZE_B5 */ + {(HPDF_REAL)841.89, (HPDF_REAL)1199.551}, /* HPDF_PAGE_SIZE_A3 */ + {(HPDF_REAL)595.276, (HPDF_REAL)841.89}, /* HPDF_PAGE_SIZE_A4 */ + {(HPDF_REAL)419.528, (HPDF_REAL)595.276}, /* HPDF_PAGE_SIZE_A5 */ + {(HPDF_REAL)708.661, (HPDF_REAL)1000.63}, /* HPDF_PAGE_SIZE_B4 */ + {(HPDF_REAL)498.898, (HPDF_REAL)708.661}, /* HPDF_PAGE_SIZE_B5 */ {522, 756}, /* HPDF_PAGE_SIZE_EXECUTIVE */ {288, 432}, /* HPDF_PAGE_SIZE_US4x6 */ {288, 576}, /* HPDF_PAGE_SIZE_US4x8 */ @@ -341,7 +341,7 @@ HPDF_Page_New (HPDF_MMgr mmgr, /* add requiered elements */ ret += HPDF_Dict_AddName (page, "Type", "Page"); ret += HPDF_Dict_Add (page, "MediaBox", HPDF_Box_Array_New (page->mmgr, - HPDF_ToBox (0, 0, HPDF_DEF_PAGE_WIDTH, HPDF_DEF_PAGE_HEIGHT))); + HPDF_ToBox (0, 0, (HPDF_INT16)(HPDF_DEF_PAGE_WIDTH), (HPDF_INT16)(HPDF_DEF_PAGE_HEIGHT)))); ret += HPDF_Dict_Add (page, "Contents", attr->contents); ret += AddResource (page); @@ -1686,6 +1686,7 @@ HPDF_Page_Create3DView (HPDF_Page page, HPDF_Dict view; HPDF_PTRACE((" HPDF_Page_Create3DView\n")); + HPDF_UNUSED(annot3d); if (!HPDF_Page_Validate (page)) return NULL; diff --git a/src/hpdf_pdfa.c b/src/hpdf_pdfa.c index 9ec9db1..26cc6c1 100644 --- a/src/hpdf_pdfa.c +++ b/src/hpdf_pdfa.c @@ -14,6 +14,8 @@ * It is provided "as is" without express or implied warranty. * */ +/* This is used to avoid warnings on 'ctime' when compiling in MSVC 9 */ +#define _CRT_SECURE_NO_WARNINGS #include #include "hpdf_utils.h" diff --git a/src/hpdf_streams.c b/src/hpdf_streams.c index 2108d09..20e915f 100644 --- a/src/hpdf_streams.c +++ b/src/hpdf_streams.c @@ -14,10 +14,14 @@ * It is provided "as is" without express or implied warranty. * */ +#define _CRT_SECURE_NO_WARNINGS #ifndef UNDER_CE #include #endif +#ifndef HPDF_UNUSED +#define HPDF_UNUSED(a) ((void)(a)) +#endif #include "hpdf_conf.h" #include "hpdf_consts.h" @@ -434,18 +438,18 @@ HPDF_Stream_WriteEscapeText2 (HPDF_Stream stream, buf[idx++] = '('; - for (i = 0; i < len; i++) { + for (i = 0; i < (HPDF_INT)len; i++) { HPDF_BYTE c = (HPDF_BYTE)*p++; if (HPDF_NEEDS_ESCAPE(c)) { buf[idx++] = '\\'; - buf[idx] = c >> 6; + buf[idx] = (char)(c >> 6); buf[idx] += 0x30; idx++; - buf[idx] = (c & 0x38) >> 3; + buf[idx] = (char)((c & 0x38) >> 3); buf[idx] += 0x30; idx++; - buf[idx] = (c & 0x07); + buf[idx] = (char)(c & 0x07); buf[idx] += 0x30; idx++; } @@ -511,7 +515,7 @@ HPDF_Stream_WriteBinary (HPDF_Stream stream, } for (i = 0; i < len; i++, p++) { - char c = *p >> 4; + char c = (char)(*p >> 4); if (c <= 9) c += 0x30; @@ -519,7 +523,7 @@ HPDF_Stream_WriteBinary (HPDF_Stream stream, c += 0x41 - 10; buf[idx++] = c; - c = *p & 0x0f; + c = (char)(*p & 0x0f); if (c <= 9) c += 0x30; else @@ -668,6 +672,9 @@ HPDF_Stream_WriteToStreamWithDeflate (HPDF_Stream src, deflateEnd(&strm); return HPDF_OK; #else /* LIBHPDF_HAVE_NOZLIB */ + HPDF_UNUSED (e); + HPDF_UNUSED (dst); + HPDF_UNUSED (src); return HPDF_UNSUPPORTED_FUNC; #endif /* LIBHPDF_HAVE_NOZLIB */ } @@ -684,6 +691,7 @@ HPDF_Stream_WriteToStream (HPDF_Stream src, HPDF_BOOL flg; HPDF_PTRACE((" HPDF_Stream_WriteToStream\n")); + HPDF_UNUSED (filter); if (!dst || !(dst->write_fn)) { HPDF_SetError (src->error, HPDF_INVALID_OBJECT, 0); @@ -1088,7 +1096,7 @@ HPDF_MemStream_SeekFunc (HPDF_Stream stream, } else if (mode == HPDF_SEEK_END) pos = stream->size - pos; - if (pos > stream->size) { + if (pos > (HPDF_INT)stream->size) { return HPDF_SetError (stream->error, HPDF_STREAM_EOF, 0); } diff --git a/src/hpdf_string.c b/src/hpdf_string.c index 5c1c481..f915093 100644 --- a/src/hpdf_string.c +++ b/src/hpdf_string.c @@ -145,7 +145,7 @@ HPDF_String_Write (HPDF_String obj, HPDF_Encoder_SetParseText (obj->encoder, &parse_state, src, len); - for (i = 0; i < len; i++) { + for (i = 0; (HPDF_INT32)i < len; i++) { HPDF_BYTE b = src[i]; HPDF_UNICODE tmp_unicode; HPDF_ByteType btype = HPDF_Encoder_ByteType (obj->encoder, @@ -163,7 +163,7 @@ HPDF_String_Write (HPDF_String obj, if (btype != HPDF_BYTE_TYPE_TRIAL) { if (btype == HPDF_BYTE_TYPE_LEAD) { HPDF_BYTE b2 = src[i + 1]; - HPDF_UINT16 char_code = (HPDF_UINT) b * 256 + b2; + HPDF_UINT16 char_code = (HPDF_UINT16)((HPDF_UINT) b * 256 + b2); tmp_unicode = HPDF_Encoder_ToUnicode (obj->encoder, char_code); diff --git a/src/hpdf_u3d.c b/src/hpdf_u3d.c index d0d8c7f..d0cb264 100644 --- a/src/hpdf_u3d.c +++ b/src/hpdf_u3d.c @@ -20,6 +20,11 @@ #include +#ifndef M_PI +/* Not defined in MSVC6 */ +#define M_PI 3.14159265358979323846 +#endif + HPDF_U3D HPDF_U3D_LoadU3D (HPDF_MMgr mmgr, HPDF_Stream u3d_data, @@ -630,8 +635,8 @@ HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_SetCamera(HPDF_Dict view, HPDF_REAL coox, H HPDF_REAL upxprime, upyprime, upzprime; HPDF_REAL sinroll, cosroll; - sinroll = sin((roll/180.0f)*M_PI); - cosroll = cos((roll/180.0f)*M_PI); + sinroll = (HPDF_REAL)sin((roll/180.0f)*M_PI); + cosroll = (HPDF_REAL)cos((roll/180.0f)*M_PI); leftxprime = leftx*cosroll + upx*sinroll; leftyprime = lefty*cosroll + upy*sinroll; leftzprime = leftz*cosroll + upz*sinroll; @@ -647,9 +652,9 @@ HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_SetCamera(HPDF_Dict view, HPDF_REAL coox, H } /* translation vector*/ - roo = fabs(roo); + roo = (HPDF_REAL)fabs(roo); if (roo == 0.0) { - roo = 0.000000000000000001; + roo = (HPDF_REAL)0.000000000000000001; } transx = coox - roo*viewx; transy = cooy - roo*viewy; @@ -703,7 +708,7 @@ HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_SetCamera(HPDF_Dict view, HPDF_REAL coox, H ret = HPDF_Dict_Add (view, "C2W", matrix); if (ret != HPDF_OK) goto failed; - ret = HPDF_Dict_AddNumber (view, "CO", roo); + ret = HPDF_Dict_AddNumber (view, "CO", (HPDF_INT32)roo); failed: if (ret != HPDF_OK) { diff --git a/src/hpdf_utils.c b/src/hpdf_utils.c index c1a9376..728da5a 100644 --- a/src/hpdf_utils.c +++ b/src/hpdf_utils.c @@ -136,7 +136,7 @@ HPDF_IToA (char *s, *t-- = 0; while (val > 0) { - *t = (char)(val % 10) + '0'; + *t = (char)((char)(val % 10) + '0'); val /= 10; t--; } @@ -165,7 +165,7 @@ HPDF_IToA2 (char *s, *u = 0; t = u - 1; while (val > 0 && t >= s) { - *t = (char)(val % 10) + '0'; + *t = (char)((char)(val % 10) + '0'); val /= 10; t--; } @@ -209,7 +209,7 @@ HPDF_FToA (char *s, /* process decimal part */ for (i = 0; i < 5; i++) { - *t = (char)(fpart_val % 10) + '0'; + *t = (char)((char)(fpart_val % 10) + '0'); fpart_val /= 10; t--; } @@ -221,7 +221,7 @@ HPDF_FToA (char *s, t--; while (int_val > 0) { - *t = (char)(int_val % 10) + '0'; + *t = (char)((char)(int_val % 10) + '0'); int_val /= 10; t--; } -- debian/patches/0004-Several-fixes-based-on-the-warnings-generated-by-cla.patch0000664000000000000000000011157211627427123024145 0ustar From: =?UTF-8?q?Daniel=20H=C3=B6pfl?= Date: Mon, 9 May 2011 14:14:21 +0200 Subject: - Several fixes based on the warnings generated by clang-analyzer (XCode's Build & Analyse) --- src/hpdf_annotation.c | 100 +++++++++++++++++++++------- src/hpdf_font_cid.c | 7 +- src/hpdf_namedict.c | 3 + src/hpdf_page_operator.c | 166 ++++++++++++++++++++++------------------------ src/hpdf_pages.c | 21 +++++-- src/hpdf_streams.c | 5 +- 6 files changed, 181 insertions(+), 121 deletions(-) diff --git a/src/hpdf_annotation.c b/src/hpdf_annotation.c index acb4f22..e0811d9 100644 --- a/src/hpdf_annotation.c +++ b/src/hpdf_annotation.c @@ -319,12 +319,12 @@ HPDF_LinkAnnot_SetBorderStyle (HPDF_Annotation annot, ret += HPDF_Array_AddNumber (dash, dash_on); ret += HPDF_Array_AddNumber (dash, dash_off); - } - if (ret != HPDF_OK) - return HPDF_CheckError (annot->error); + if (ret != HPDF_OK) + return HPDF_CheckError (annot->error); + } - return ret; + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -485,7 +485,10 @@ HPDF_Annot_SetRGBColor (HPDF_Annotation annot, HPDF_RGBColor color) ret += HPDF_Array_AddReal (cArray, color.g); ret += HPDF_Array_AddReal (cArray, color.b); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode (annot->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -498,7 +501,7 @@ HPDF_Annot_SetCMYKColor (HPDF_Annotation annot, HPDF_CMYKColor color) cArray = HPDF_Array_New (annot->mmgr); if (!cArray) - return HPDF_Error_GetCode ( annot->error); + return HPDF_Error_GetCode (annot->error); ret += HPDF_Dict_Add (annot, "C", cArray); ret += HPDF_Array_AddReal (cArray, color.c); @@ -506,7 +509,10 @@ HPDF_Annot_SetCMYKColor (HPDF_Annotation annot, HPDF_CMYKColor color) ret += HPDF_Array_AddReal (cArray, color.y); ret += HPDF_Array_AddReal (cArray, color.k); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode (annot->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -524,7 +530,10 @@ HPDF_Annot_SetGrayColor (HPDF_Annotation annot, HPDF_REAL color) ret += HPDF_Dict_Add (annot, "C", cArray); ret += HPDF_Array_AddReal ( cArray, color); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode ( annot->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -539,7 +548,7 @@ HPDF_Annot_SetNoColor (HPDF_Annotation annot) if (!cArray) return HPDF_Error_GetCode ( annot->error); - ret += HPDF_Dict_Add (annot, "C", cArray); + ret = HPDF_Dict_Add (annot, "C", cArray); return ret; } @@ -553,7 +562,7 @@ HPDF_TextAnnot_SetIcon (HPDF_Annotation annot, if (!CheckSubType (annot, HPDF_ANNOT_TEXT_NOTES)) return HPDF_INVALID_ANNOTATION; - if (icon < 0 || icon >= HPDF_ANNOT_ICON_EOF) + if (icon >= HPDF_ANNOT_ICON_EOF) return HPDF_RaiseError (annot->error, HPDF_ANNOT_INVALID_ICON, (HPDF_STATUS)icon); @@ -672,7 +681,10 @@ HPDF_MarkupAnnot_SetInteriorRGBColor (HPDF_Annotation annot, HPDF_RGBColor colo ret += HPDF_Array_AddReal (cArray, color.g); ret += HPDF_Array_AddReal (cArray, color.b); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode (annot->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -693,7 +705,10 @@ HPDF_MarkupAnnot_SetInteriorCMYKColor (HPDF_Annotation annot, HPDF_CMYKColor co ret += HPDF_Array_AddReal (cArray, color.y); ret += HPDF_Array_AddReal (cArray, color.k); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode (annot->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -711,7 +726,10 @@ HPDF_MarkupAnnot_SetInteriorGrayColor (HPDF_Annotation annot, HPDF_REAL color)/ ret += HPDF_Dict_Add (annot, "IC", cArray); ret += HPDF_Array_AddReal (cArray, color); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode ( annot->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -726,7 +744,7 @@ HPDF_MarkupAnnot_SetInteriorTransparent (HPDF_Annotation annot) /* IC with No C if (!cArray) return HPDF_Error_GetCode ( annot->error); - ret += HPDF_Dict_Add (annot, "IC", cArray); + ret = HPDF_Dict_Add (annot, "IC", cArray); return ret; } @@ -863,7 +881,11 @@ HPDF_TextMarkupAnnot_SetQuadPoints ( HPDF_Annotation annot, HPDF_Point lb, HPDF_ ret += HPDF_Array_AddReal (quadPoints, lt.y); ret += HPDF_Array_AddReal (quadPoints, rt.x); ret += HPDF_Array_AddReal (quadPoints, rt.y); - return ret; + + if (ret != HPDF_OK) + return HPDF_Error_GetCode (quadPoints->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -884,7 +906,10 @@ HPDF_FreeTextAnnot_SetLineEndingStyle (HPDF_Annotation annot, HPDF_LineAnnotEndi ret += HPDF_Array_AddName (lineEndStyles, HPDF_LINE_ANNOT_ENDING_STYLE_NAMES[(HPDF_INT)startStyle]); ret += HPDF_Array_AddName (lineEndStyles, HPDF_LINE_ANNOT_ENDING_STYLE_NAMES[(HPDF_INT)endStyle]); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode (lineEndStyles->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -914,7 +939,10 @@ HPDF_MarkupAnnot_SetRectDiff (HPDF_Annotation annot, HPDF_Rect rect) /* RD ent ret += HPDF_Array_AddReal (array, rect.right); ret += HPDF_Array_AddReal (array, rect.top); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode (array->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -956,7 +984,11 @@ HPDF_FreeTextAnnot_Set3PointCalloutLine ( HPDF_Annotation annot, HPDF_Point star ret += HPDF_Array_AddReal (clPoints, kneePoint.y); ret += HPDF_Array_AddReal (clPoints, endPoint.x); ret += HPDF_Array_AddReal (clPoints, endPoint.y); - return ret; + + if (ret != HPDF_OK) + return HPDF_Error_GetCode (clPoints->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -978,7 +1010,11 @@ HPDF_FreeTextAnnot_Set2PointCalloutLine ( HPDF_Annotation annot, HPDF_Point star ret += HPDF_Array_AddReal (clPoints, startPoint.y); ret += HPDF_Array_AddReal (clPoints, endPoint.x); ret += HPDF_Array_AddReal (clPoints, endPoint.y); - return ret; + + if (ret != HPDF_OK) + return HPDF_Error_GetCode (clPoints->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -997,7 +1033,10 @@ HPDF_MarkupAnnot_SetCloudEffect (HPDF_Annotation annot, HPDF_INT cloudIntensity ret += HPDF_Dict_AddName ( borderEffect, "S", "C"); ret += HPDF_Dict_AddNumber ( borderEffect, "I", cloudIntensity); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode (annot->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -1023,6 +1062,9 @@ HPDF_LineAnnot_SetPosition (HPDF_Annotation annot, ret += HPDF_Array_AddReal (lineEndPoints, endPoint.x); ret += HPDF_Array_AddReal (lineEndPoints, endPoint.y); + if (ret != HPDF_OK) + return HPDF_Error_GetCode ( lineEndPoints->error); + lineEndStyles = HPDF_Array_New ( annot->mmgr); if ( !lineEndStyles) return HPDF_Error_GetCode ( annot->error); @@ -1033,7 +1075,10 @@ HPDF_LineAnnot_SetPosition (HPDF_Annotation annot, ret += HPDF_Array_AddName (lineEndStyles, HPDF_LINE_ANNOT_ENDING_STYLE_NAMES[(HPDF_INT)startStyle]); ret += HPDF_Array_AddName (lineEndStyles, HPDF_LINE_ANNOT_ENDING_STYLE_NAMES[(HPDF_INT)endStyle]); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode ( lineEndStyles->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -1047,7 +1092,10 @@ HPDF_LineAnnot_SetLeader (HPDF_Annotation annot, HPDF_INT leaderLen, HPDF_INT le ret += HPDF_Dict_AddNumber ( annot, "LLE", leaderExtLen); ret += HPDF_Dict_AddNumber ( annot, "LLO", leaderOffsetLen); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode ( annot->error); + + return HPDF_OK; } HPDF_EXPORT(HPDF_STATUS) @@ -1060,6 +1108,9 @@ HPDF_LineAnnot_SetCaption (HPDF_Annotation annot, HPDF_BOOL showCaption, HPDF_Li ret += HPDF_Dict_AddBoolean ( annot, "Cap", showCaption); ret += HPDF_Dict_AddName( annot, "CP", HPDF_LINE_ANNOT_CAP_POSITION_NAMES[(HPDF_INT)position]); + if (ret != HPDF_OK) + return HPDF_Error_GetCode ( annot->error); + capOffset = HPDF_Array_New ( annot->mmgr); if ( !capOffset) return HPDF_Error_GetCode ( annot->error); @@ -1070,5 +1121,8 @@ HPDF_LineAnnot_SetCaption (HPDF_Annotation annot, HPDF_BOOL showCaption, HPDF_Li ret += HPDF_Array_AddNumber (capOffset, horzOffset); ret += HPDF_Array_AddNumber (capOffset, vertOffset); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode (capOffset->error); + + return HPDF_OK; } diff --git a/src/hpdf_font_cid.c b/src/hpdf_font_cid.c index e4aed13..81b1c7a 100644 --- a/src/hpdf_font_cid.c +++ b/src/hpdf_font_cid.c @@ -401,14 +401,14 @@ CIDFontType2_New (HPDF_Font parent, HPDF_Xref xref) if (w != dw) { if (!tmp_array) { - if ((ret = HPDF_Array_AddNumber (array, i)) != HPDF_OK) + if (HPDF_Array_AddNumber (array, i) != HPDF_OK) return NULL; tmp_array = HPDF_Array_New (font->mmgr); if (!tmp_array) return NULL; - if ((ret = HPDF_Array_Add (array, tmp_array)) != HPDF_OK) + if (HPDF_Array_Add (array, tmp_array) != HPDF_OK) return NULL; } @@ -424,8 +424,7 @@ CIDFontType2_New (HPDF_Font parent, HPDF_Xref xref) if (!attr->map_stream) return NULL; - if ((ret = HPDF_Dict_Add (font, "CIDToGIDMap", attr->map_stream)) - != HPDF_OK) + if (HPDF_Dict_Add (font, "CIDToGIDMap", attr->map_stream) != HPDF_OK) return NULL; for (i = 0; i < max; i++) { diff --git a/src/hpdf_namedict.c b/src/hpdf_namedict.c index f2dff73..00ddfa8 100644 --- a/src/hpdf_namedict.c +++ b/src/hpdf_namedict.c @@ -223,6 +223,9 @@ HPDF_EmbeddedFile_New (HPDF_MMgr mmgr, ret += HPDF_Dict_Add (ef, "EF", eff); ret += HPDF_Dict_Add (eff, "F", filestream); + if (ret != HPDF_OK) + return NULL; + return ef; } diff --git a/src/hpdf_page_operator.c b/src/hpdf_page_operator.c index b01f54f..a62db2f 100644 --- a/src/hpdf_page_operator.c +++ b/src/hpdf_page_operator.c @@ -67,12 +67,10 @@ HPDF_Page_SetLineWidth (HPDF_Page page, if (line_width < 0) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, 0); - if ((ret = HPDF_Stream_WriteReal (attr->stream, - line_width)) != HPDF_OK) + if (HPDF_Stream_WriteReal (attr->stream, line_width) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, - " w\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " w\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->line_width = line_width; @@ -94,7 +92,7 @@ HPDF_Page_SetLineCap (HPDF_Page page, if (ret != HPDF_OK) return ret; - if (line_cap < 0 || line_cap >= HPDF_LINECAP_EOF) + if (line_cap >= HPDF_LINECAP_EOF) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, (HPDF_STATUS)line_cap); @@ -127,18 +125,16 @@ HPDF_Page_SetLineJoin (HPDF_Page page, if (ret != HPDF_OK) return ret; - if (line_join < 0 || line_join >= HPDF_LINEJOIN_EOF) + if (line_join >= HPDF_LINEJOIN_EOF) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, (HPDF_STATUS)line_join); attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteInt (attr->stream, - (HPDF_UINT)line_join)) != HPDF_OK) + if (HPDF_Stream_WriteInt (attr->stream, (HPDF_UINT)line_join) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, - " j\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " j\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->line_join = line_join; @@ -165,10 +161,10 @@ HPDF_Page_SetMiterLimit (HPDF_Page page, if (miter_limit < 1) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, 0); - if ((ret = HPDF_Stream_WriteReal (attr->stream, miter_limit)) != HPDF_OK) + if (HPDF_Stream_WriteReal (attr->stream, miter_limit) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " M\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " M\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->miter_limit = miter_limit; @@ -267,12 +263,10 @@ HPDF_Page_SetFlat (HPDF_Page page, if (flatness > 100 || flatness < 0) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, 0); - if ((ret = HPDF_Stream_WriteReal (attr->stream, - flatness)) != HPDF_OK) + if (HPDF_Stream_WriteReal (attr->stream, flatness) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, - " i\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " i\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->flatness = flatness; @@ -306,11 +300,10 @@ HPDF_Page_SetExtGState (HPDF_Page page, if (!local_name) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteEscapeName (attr->stream, local_name)) != - HPDF_OK) + if (HPDF_Stream_WriteEscapeName (attr->stream, local_name) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " gs\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " gs\012") != HPDF_OK) return HPDF_CheckError (page->error); /* change objct class to read only. */ @@ -341,7 +334,7 @@ HPDF_Page_GSave (HPDF_Page page) if (!new_gstate) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, "q\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "q\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate = new_gstate; @@ -372,7 +365,7 @@ HPDF_Page_GRestore (HPDF_Page page) attr->gstate = new_gstate; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "Q\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "Q\012") != HPDF_OK) return HPDF_CheckError (page->error); return ret; @@ -417,7 +410,7 @@ HPDF_Page_Concat (HPDF_Page page, pbuf = HPDF_FToA (pbuf, y, eptr); HPDF_StrCpy (pbuf, " cm\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); tm = attr->gstate->trans_matrix; @@ -461,7 +454,7 @@ HPDF_Page_MoveTo (HPDF_Page page, pbuf = HPDF_FToA (pbuf, y, eptr); HPDF_StrCpy (pbuf, " m\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->cur_pos.x = x; @@ -498,7 +491,7 @@ HPDF_Page_LineTo (HPDF_Page page, pbuf = HPDF_FToA (pbuf, y, eptr); HPDF_StrCpy (pbuf, " l\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->cur_pos.x = x; @@ -545,7 +538,7 @@ HPDF_Page_CurveTo (HPDF_Page page, pbuf = HPDF_FToA (pbuf, y3, eptr); HPDF_StrCpy (pbuf, " c\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->cur_pos.x = x3; @@ -586,7 +579,7 @@ HPDF_Page_CurveTo2 (HPDF_Page page, pbuf = HPDF_FToA (pbuf, y3, eptr); HPDF_StrCpy (pbuf, " v\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->cur_pos.x = x3; @@ -627,7 +620,7 @@ HPDF_Page_CurveTo3 (HPDF_Page page, pbuf = HPDF_FToA (pbuf, y3, eptr); HPDF_StrCpy (pbuf, " y\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->cur_pos.x = x3; @@ -650,7 +643,7 @@ HPDF_Page_ClosePath (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "h\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "h\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->cur_pos = attr->str_pos; @@ -691,7 +684,7 @@ HPDF_Page_Rectangle (HPDF_Page page, pbuf = HPDF_FToA (pbuf, height, eptr); HPDF_StrCpy (pbuf, " re\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->cur_pos.x = x; @@ -720,7 +713,7 @@ HPDF_Page_Stroke (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "S\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "S\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gmode = HPDF_GMODE_PAGE_DESCRIPTION; @@ -744,7 +737,7 @@ HPDF_Page_ClosePathStroke (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "s\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "s\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gmode = HPDF_GMODE_PAGE_DESCRIPTION; @@ -768,7 +761,7 @@ HPDF_Page_Fill (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "f\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "f\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gmode = HPDF_GMODE_PAGE_DESCRIPTION; @@ -792,7 +785,7 @@ HPDF_Page_Eofill (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "f*\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "f*\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gmode = HPDF_GMODE_PAGE_DESCRIPTION; @@ -816,7 +809,7 @@ HPDF_Page_FillStroke (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "B\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "B\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gmode = HPDF_GMODE_PAGE_DESCRIPTION; @@ -840,7 +833,7 @@ HPDF_Page_EofillStroke (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "B*\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "B*\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gmode = HPDF_GMODE_PAGE_DESCRIPTION; @@ -863,7 +856,7 @@ HPDF_Page_ClosePathFillStroke (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "b\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "b\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gmode = HPDF_GMODE_PAGE_DESCRIPTION; @@ -887,7 +880,7 @@ HPDF_Page_ClosePathEofillStroke (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "b*\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "b*\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gmode = HPDF_GMODE_PAGE_DESCRIPTION; @@ -911,7 +904,7 @@ HPDF_Page_EndPath (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "n\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "n\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gmode = HPDF_GMODE_PAGE_DESCRIPTION; @@ -937,7 +930,7 @@ HPDF_Page_Clip (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "W\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "W\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gmode = HPDF_GMODE_CLIPPING_PATH; @@ -959,7 +952,7 @@ HPDF_Page_Eoclip (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "W*\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "W*\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gmode = HPDF_GMODE_CLIPPING_PATH; @@ -985,7 +978,7 @@ HPDF_Page_BeginText (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "BT\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "BT\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gmode = HPDF_GMODE_TEXT_OBJECT; @@ -1009,7 +1002,7 @@ HPDF_Page_EndText (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "ET\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "ET\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->text_pos = INIT_POS; @@ -1039,10 +1032,10 @@ HPDF_Page_SetCharSpace (HPDF_Page page, if (value < HPDF_MIN_CHARSPACE || value > HPDF_MAX_CHARSPACE) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, 0); - if ((ret = HPDF_Stream_WriteReal (attr->stream, value)) != HPDF_OK) + if (HPDF_Stream_WriteReal (attr->stream, value) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " Tc\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " Tc\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->char_space = value; @@ -1069,10 +1062,10 @@ HPDF_Page_SetWordSpace (HPDF_Page page, if (value < HPDF_MIN_WORDSPACE || value > HPDF_MAX_WORDSPACE) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, 0); - if ((ret = HPDF_Stream_WriteReal (attr->stream, value)) != HPDF_OK) + if (HPDF_Stream_WriteReal (attr->stream, value) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " Tw\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " Tw\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->word_space = value; @@ -1100,10 +1093,10 @@ HPDF_Page_SetHorizontalScalling (HPDF_Page page, value > HPDF_MAX_HORIZONTALSCALING) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, 0); - if ((ret = HPDF_Stream_WriteReal (attr->stream, value)) != HPDF_OK) + if (HPDF_Stream_WriteReal (attr->stream, value) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " Tz\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " Tz\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->h_scalling = value; @@ -1127,10 +1120,10 @@ HPDF_Page_SetTextLeading (HPDF_Page page, attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteReal (attr->stream, value)) != HPDF_OK) + if (HPDF_Stream_WriteReal (attr->stream, value) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " TL\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " TL\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->text_leading = value; @@ -1173,8 +1166,7 @@ HPDF_Page_SetFontAndSize (HPDF_Page page, if (!local_name) return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT, 0); - if ((ret = HPDF_Stream_WriteEscapeName (attr->stream, local_name)) != - HPDF_OK) + if (HPDF_Stream_WriteEscapeName (attr->stream, local_name) != HPDF_OK) return HPDF_CheckError (page->error); HPDF_MemSet (buf, 0, HPDF_TMP_BUF_SIZ); @@ -1182,7 +1174,7 @@ HPDF_Page_SetFontAndSize (HPDF_Page page, pbuf = HPDF_FToA (pbuf, size, eptr); HPDF_StrCpy (pbuf, " Tf\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->font = font; @@ -1206,16 +1198,16 @@ HPDF_Page_SetTextRenderingMode (HPDF_Page page, if (ret != HPDF_OK) return ret; - if (mode < 0 || mode >= HPDF_RENDERING_MODE_EOF) + if (mode >= HPDF_RENDERING_MODE_EOF) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, (HPDF_STATUS)mode); attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteInt (attr->stream, (HPDF_INT)mode)) != HPDF_OK) + if (HPDF_Stream_WriteInt (attr->stream, (HPDF_INT)mode) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " Tr\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " Tr\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->rendering_mode = mode; @@ -1247,10 +1239,10 @@ HPDF_Page_SetTextRise (HPDF_Page page, attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteReal (attr->stream, value)) != HPDF_OK) + if (HPDF_Stream_WriteReal (attr->stream, value) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " Ts\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " Ts\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->text_rise = value; @@ -1287,7 +1279,7 @@ HPDF_Page_MoveTextPos (HPDF_Page page, pbuf = HPDF_FToA (pbuf, y, eptr); HPDF_StrCpy (pbuf, " Td\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->text_matrix.x += x * attr->text_matrix.a + y * attr->text_matrix.c; @@ -1324,7 +1316,7 @@ HPDF_Page_MoveTextPos2 (HPDF_Page page, pbuf = HPDF_FToA (pbuf, y, eptr); HPDF_StrCpy (pbuf, " TD\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->text_matrix.x += x * attr->text_matrix.a + y * attr->text_matrix.c; @@ -1377,7 +1369,7 @@ HPDF_Page_SetTextMatrix (HPDF_Page page, pbuf = HPDF_FToA (pbuf, y, eptr); HPDF_StrCpy (pbuf, " Tm\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->text_matrix.a = a; @@ -1407,7 +1399,7 @@ HPDF_Page_MoveToNextLine (HPDF_Page page) attr = (HPDF_PageAttr)page->attr; - if ((ret = HPDF_Stream_WriteStr (attr->stream, "T*\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, "T*\012") != HPDF_OK) return HPDF_CheckError (page->error); /* calculate the reference point of text */ @@ -1446,10 +1438,10 @@ HPDF_Page_ShowText (HPDF_Page page, if (!tw) return ret; - if ((ret = InternalWriteText (attr, text)) != HPDF_OK) + if (InternalWriteText (attr, text) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " Tj\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " Tj\012") != HPDF_OK) return HPDF_CheckError (page->error); /* calculate the reference point of text */ @@ -1488,10 +1480,10 @@ HPDF_Page_ShowTextNextLine (HPDF_Page page, if (text == NULL || text[0] == 0) return HPDF_Page_MoveToNextLine(page); - if ((ret = InternalWriteText (attr, text)) != HPDF_OK) + if (InternalWriteText (attr, text) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " \'\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " \'\012") != HPDF_OK) return HPDF_CheckError (page->error); tw = HPDF_Page_TextWidth (page, text); @@ -1554,13 +1546,13 @@ HPDF_Page_ShowTextNextLineEx (HPDF_Page page, pbuf = HPDF_FToA (pbuf, char_space, eptr); *pbuf = ' '; - if ((ret = InternalWriteText (attr, buf)) != HPDF_OK) + if (InternalWriteText (attr, buf) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = InternalWriteText (attr, text)) != HPDF_OK) + if (InternalWriteText (attr, text) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " \"\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " \"\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->word_space = word_space; @@ -1616,10 +1608,10 @@ HPDF_Page_SetGrayFill (HPDF_Page page, if (gray < 0 || gray > 1) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, 0); - if ((ret = HPDF_Stream_WriteReal (attr->stream, gray)) != HPDF_OK) + if (HPDF_Stream_WriteReal (attr->stream, gray) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " g\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " g\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->gray_fill = gray; @@ -1647,10 +1639,10 @@ HPDF_Page_SetGrayStroke (HPDF_Page page, if (gray < 0 || gray > 1) return HPDF_RaiseError (page->error, HPDF_PAGE_OUT_OF_RANGE, 0); - if ((ret = HPDF_Stream_WriteReal (attr->stream, gray)) != HPDF_OK) + if (HPDF_Stream_WriteReal (attr->stream, gray) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " G\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " G\012") != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->gray_stroke = gray; @@ -1692,7 +1684,7 @@ HPDF_Page_SetRGBFill (HPDF_Page page, pbuf = HPDF_FToA (pbuf, b, eptr); HPDF_StrCpy (pbuf, " rg\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->rgb_fill.r = r; @@ -1736,7 +1728,7 @@ HPDF_Page_SetRGBStroke (HPDF_Page page, pbuf = HPDF_FToA (pbuf, b, eptr); HPDF_StrCpy (pbuf, " RG\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->rgb_stroke.r = r; @@ -1783,7 +1775,7 @@ HPDF_Page_SetCMYKFill (HPDF_Page page, pbuf = HPDF_FToA (pbuf, k, eptr); HPDF_StrCpy (pbuf, " k\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->cmyk_fill.c = c; @@ -1831,7 +1823,7 @@ HPDF_Page_SetCMYKStroke (HPDF_Page page, pbuf = HPDF_FToA (pbuf, k, eptr); HPDF_StrCpy (pbuf, " K\012", eptr); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->gstate->cmyk_stroke.c = c; @@ -1882,11 +1874,10 @@ HPDF_Page_ExecuteXObject (HPDF_Page page, if (!local_name) return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_XOBJECT, 0); - if ((ret = HPDF_Stream_WriteEscapeName (attr->stream, local_name)) != - HPDF_OK) + if (HPDF_Stream_WriteEscapeName (attr->stream, local_name) != HPDF_OK) return HPDF_CheckError (page->error); - if ((ret = HPDF_Stream_WriteStr (attr->stream, " Do\012")) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, " Do\012") != HPDF_OK) return HPDF_CheckError (page->error); return ret; @@ -2026,7 +2017,7 @@ HPDF_Page_Circle (HPDF_Page page, pbuf = QuarterCircleC (pbuf, eptr, x, y, ray); QuarterCircleD (pbuf, eptr, x, y, ray); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->cur_pos.x = x - ray; @@ -2159,7 +2150,7 @@ HPDF_Page_Ellipse (HPDF_Page page, pbuf = QuarterEllipseC (pbuf, eptr, x, y, xray, yray); QuarterEllipseD (pbuf, eptr, x, y, xray, yray); - if ((ret = HPDF_Stream_WriteStr (attr->stream, buf)) != HPDF_OK) + if (HPDF_Stream_WriteStr (attr->stream, buf) != HPDF_OK) return HPDF_CheckError (page->error); attr->cur_pos.x = x - xray; @@ -2564,7 +2555,7 @@ HPDF_Page_TextRect (HPDF_Page page, } } - if ((ret = InternalShowTextNextLine (page, ptr, tmp_len)) != HPDF_OK) + if (InternalShowTextNextLine (page, ptr, tmp_len) != HPDF_OK) return HPDF_CheckError (page->error); if (num_rest <= 0) @@ -2674,11 +2665,10 @@ HPDF_Page_SetSlideShow (HPDF_Page page, if (!dict) return HPDF_Error_GetCode (page->error); - if ((ret = HPDF_Dict_AddName (dict, "Type", "Trans")) != HPDF_OK) + if (HPDF_Dict_AddName (dict, "Type", "Trans") != HPDF_OK) goto Fail; - if ((ret = HPDF_Dict_AddReal (dict, "D", trans_time)) != - HPDF_OK) + if (HPDF_Dict_AddReal (dict, "D", trans_time) != HPDF_OK) goto Fail; switch (type) { @@ -2753,13 +2743,13 @@ HPDF_Page_SetSlideShow (HPDF_Page page, ret += HPDF_Dict_AddName (dict, "S", "R"); break; default: - ret = HPDF_INVALID_PAGE_SLIDESHOW_TYPE; + ret += HPDF_SetError(page->error, HPDF_INVALID_PAGE_SLIDESHOW_TYPE, 0); } if (ret != HPDF_OK) goto Fail; - if ((ret = HPDF_Dict_AddReal (page, "Dur", disp_time)) != HPDF_OK) + if (HPDF_Dict_AddReal (page, "Dur", disp_time) != HPDF_OK) goto Fail; if ((ret = HPDF_Dict_Add (page, "Trans", dict)) != HPDF_OK) diff --git a/src/hpdf_pages.c b/src/hpdf_pages.c index 683620a..9608656 100644 --- a/src/hpdf_pages.c +++ b/src/hpdf_pages.c @@ -163,11 +163,14 @@ HPDF_Page_InsertBefore (HPDF_Page page, HPDF_PTRACE((" HPDF_Page_InsertBefore\n")); + if (!target) + return HPDF_INVALID_PARAMETER; + attr = (HPDF_PageAttr )target->attr; parent = attr->parent; if (!parent) - return HPDF_SetError (parent->error, HPDF_PAGE_CANNOT_SET_PARENT, 0); + return HPDF_PAGE_CANNOT_SET_PARENT; if (HPDF_Dict_GetItem (page, "Parent", HPDF_OCLASS_DICT)) return HPDF_SetError (parent->error, HPDF_PAGE_CANNOT_SET_PARENT, 0); @@ -458,14 +461,19 @@ AddResource (HPDF_Page page) if (!procset) return HPDF_Error_GetCode (page->error); - ret += HPDF_Dict_Add (resource, "ProcSet", procset); + if (HPDF_Dict_Add (resource, "ProcSet", procset) != HPDF_OK) + return HPDF_Error_GetCode (resource->error); + ret += HPDF_Array_Add (procset, HPDF_Name_New (page->mmgr, "PDF")); ret += HPDF_Array_Add (procset, HPDF_Name_New (page->mmgr, "Text")); ret += HPDF_Array_Add (procset, HPDF_Name_New (page->mmgr, "ImageB")); ret += HPDF_Array_Add (procset, HPDF_Name_New (page->mmgr, "ImageC")); ret += HPDF_Array_Add (procset, HPDF_Name_New (page->mmgr, "ImageI")); - return ret; + if (ret != HPDF_OK) + return HPDF_Error_GetCode (procset->error); + + return HPDF_OK; } @@ -686,9 +694,12 @@ AddAnnotation (HPDF_Page page, return ret; } - ret += HPDF_Array_Add (array, annot); + if ((ret = HPDF_Array_Add (array, annot)) != HPDF_OK) + return ret; + /* Add Parent to the annotation */ - ret += HPDF_Dict_Add( annot, "P", page); + ret = HPDF_Dict_Add( annot, "P", page); + return ret; } diff --git a/src/hpdf_streams.c b/src/hpdf_streams.c index 20e915f..6c76045 100644 --- a/src/hpdf_streams.c +++ b/src/hpdf_streams.c @@ -154,7 +154,10 @@ HPDF_Stream_ReadLn (HPDF_Stream stream, HPDF_PTRACE((" HPDF_Stream_ReadLn\n")); - if (!stream || !s || *size == 0) + if (!stream) + return HPDF_INVALID_PARAMETER; + + if (!s || *size == 0) return HPDF_SetError (stream->error, HPDF_INVALID_PARAMETER, 0); if (!(stream->seek_fn) || !(stream->read_fn)) -- debian/patches/0001-fix-build-with-libpng-1.5.0-reported-by-Tamas-Tevesz.patch0000664000000000000000000003221011627427123023540 0ustar From: Antony Dovgal Date: Mon, 10 Jan 2011 01:22:14 +0300 Subject: fix build with libpng 1.5.0 (reported by Tamas Tevesz) Conflicts: CHANGES --- src/hpdf_image_png.c | 109 +++++++++++++++++++++++++++----------------------- 1 files changed, 59 insertions(+), 50 deletions(-) diff --git a/src/hpdf_image_png.c b/src/hpdf_image_png.c index b8f831e..6057424 100644 --- a/src/hpdf_image_png.c +++ b/src/hpdf_image_png.c @@ -109,14 +109,15 @@ ReadPngData_Interlaced (HPDF_Dict image, png_infop info_ptr) { png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); + png_uint_32 height = png_get_image_height(png_ptr, info_ptr); png_bytep* row_pointers = HPDF_GetMem (image->mmgr, - info_ptr->height * sizeof (png_bytep)); + height * sizeof (png_bytep)); if (row_pointers) { HPDF_UINT i; - HPDF_MemSet (row_pointers, 0, info_ptr->height * sizeof (png_bytep)); - for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { + HPDF_MemSet (row_pointers, 0, height * sizeof (png_bytep)); + for (i = 0; i < (HPDF_UINT)height; i++) { row_pointers[i] = HPDF_GetMem (image->mmgr, len); if (image->error->error_no != HPDF_OK) @@ -126,7 +127,7 @@ ReadPngData_Interlaced (HPDF_Dict image, if (image->error->error_no == HPDF_OK) { png_read_image(png_ptr, row_pointers); if (image->error->error_no == HPDF_OK) { /* add this line */ - for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { + for (i = 0; i < (HPDF_UINT)height; i++) { if (HPDF_Stream_Write (image->stream, row_pointers[i], len) != HPDF_OK) break; @@ -135,7 +136,7 @@ ReadPngData_Interlaced (HPDF_Dict image, } /* clean up */ - for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { + for (i = 0; i < (HPDF_UINT)height; i++) { HPDF_FreeMem (image->mmgr, row_pointers[i]); } @@ -151,12 +152,13 @@ ReadPngData (HPDF_Dict image, png_infop info_ptr) { png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); + png_uint_32 height = png_get_image_height(png_ptr, info_ptr); png_bytep buf_ptr = HPDF_GetMem (image->mmgr, len); if (buf_ptr) { HPDF_UINT i; - for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { + for (i = 0; i < (HPDF_UINT)height; i++) { png_read_rows(png_ptr, (png_byte**)&buf_ptr, NULL, 1); if (image->error->error_no != HPDF_OK) break; @@ -182,14 +184,16 @@ ReadTransparentPaletteData (HPDF_Dict image, HPDF_STATUS ret = HPDF_OK; HPDF_UINT i, j; png_bytep *row_ptr; + png_uint_32 height = png_get_image_height(png_ptr, info_ptr); + png_uint_32 width = png_get_image_width(png_ptr, info_ptr); - row_ptr = HPDF_GetMem (image->mmgr, info_ptr->height * sizeof(png_bytep)); + row_ptr = HPDF_GetMem (image->mmgr, height * sizeof(png_bytep)); if (!row_ptr) { return HPDF_FAILD_TO_ALLOC_MEM; } else { png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); - for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { + for (i = 0; i < (HPDF_UINT)height; i++) { row_ptr[i] = HPDF_GetMem(image->mmgr, len); if (!row_ptr[i]) { for (; i >= 0; i--) { @@ -207,19 +211,19 @@ ReadTransparentPaletteData (HPDF_Dict image, goto Error; } - for (j = 0; j < info_ptr->height; j++) { - for (i = 0; i < info_ptr->width; i++) { - smask_data[info_ptr->width * j + i] = (row_ptr[j][i] < num_trans) ? trans[row_ptr[j][i]] : 0xFF; + for (j = 0; j < height; j++) { + for (i = 0; i < width; i++) { + smask_data[width * j + i] = (row_ptr[j][i] < num_trans) ? trans[row_ptr[j][i]] : 0xFF; } - if (HPDF_Stream_Write (image->stream, row_ptr[j], info_ptr->width) != HPDF_OK) { + if (HPDF_Stream_Write (image->stream, row_ptr[j], width) != HPDF_OK) { ret = HPDF_FILE_IO_ERROR; goto Error; } } Error: - for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { + for (i = 0; i < (HPDF_UINT)height; i++) { HPDF_FreeMem (image->mmgr, row_ptr[i]); } @@ -238,6 +242,8 @@ ReadTransparentPngData (HPDF_Dict image, HPDF_UINT i, j; png_bytep *row_ptr, row; png_byte color_type; + png_uint_32 height = png_get_image_height(png_ptr, info_ptr); + png_uint_32 width = png_get_image_width(png_ptr, info_ptr); color_type = png_get_color_type(png_ptr, info_ptr); @@ -245,13 +251,13 @@ ReadTransparentPngData (HPDF_Dict image, return HPDF_INVALID_PNG_IMAGE; } - row_ptr = HPDF_GetMem (image->mmgr, info_ptr->height * sizeof(png_bytep)); + row_ptr = HPDF_GetMem (image->mmgr, height * sizeof(png_bytep)); if (!row_ptr) { return HPDF_FAILD_TO_ALLOC_MEM; } else { png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); - for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { + for (i = 0; i < (HPDF_UINT)height; i++) { row_ptr[i] = HPDF_GetMem(image->mmgr, len); if (!row_ptr[i]) { for (; i >= 0; i--) { @@ -271,12 +277,12 @@ ReadTransparentPngData (HPDF_Dict image, switch (color_type) { case PNG_COLOR_TYPE_RGB_ALPHA: - row_len = 3 * info_ptr->width * sizeof(png_byte); - for (j = 0; j < info_ptr->height; j++) { - for (i = 0; i < info_ptr->width; i++) { + row_len = 3 * width * sizeof(png_byte); + for (j = 0; j < height; j++) { + for (i = 0; i < width; i++) { row = row_ptr[j]; memmove(row + (3 * i), row + (4*i), 3); - smask_data[info_ptr->width * j + i] = row[4 * i + 3]; + smask_data[width * j + i] = row[4 * i + 3]; } if (HPDF_Stream_Write (image->stream, row, row_len) != HPDF_OK) { @@ -286,12 +292,12 @@ ReadTransparentPngData (HPDF_Dict image, } break; case PNG_COLOR_TYPE_GRAY_ALPHA: - row_len = info_ptr->width * sizeof(png_byte); - for (j = 0; j < info_ptr->height; j++) { - for (i = 0; i < info_ptr->width; i++) { + row_len = width * sizeof(png_byte); + for (j = 0; j < height; j++) { + for (i = 0; i < width; i++) { row = row_ptr[j]; row[i] = row[2 * i]; - smask_data[info_ptr->width * j + i] = row[2 * i + 1]; + smask_data[width * j + i] = row[2 * i + 1]; } if (HPDF_Stream_Write (image->stream, row, row_len) != HPDF_OK) { @@ -306,7 +312,7 @@ ReadTransparentPngData (HPDF_Dict image, } Error: - for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { + for (i = 0; i < (HPDF_UINT)height; i++) { HPDF_FreeMem (image->mmgr, row_ptr[i]); } @@ -415,7 +421,8 @@ LoadPngData (HPDF_Dict image, { HPDF_STATUS ret = HPDF_OK; - + png_uint_32 width, height; + int bit_depth, color_type; png_structp png_ptr = NULL; png_infop info_ptr = NULL; @@ -447,8 +454,10 @@ LoadPngData (HPDF_Dict image, goto Exit; } + png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL); + /* 16bit images are not supported. */ - if (info_ptr->bit_depth == 16) { + if (bit_depth == 16) { png_set_strip_16(png_ptr); } @@ -458,7 +467,7 @@ LoadPngData (HPDF_Dict image, } /* check palette-based images for transparent areas and load them immediately if found */ - if (xref && PNG_COLOR_TYPE_PALETTE & info_ptr->color_type) { + if (xref && PNG_COLOR_TYPE_PALETTE & color_type) { png_bytep trans; int num_trans; HPDF_Dict smask; @@ -478,10 +487,10 @@ LoadPngData (HPDF_Dict image, smask->header.obj_class |= HPDF_OSUBCLASS_XOBJECT; ret = HPDF_Dict_AddName (smask, "Type", "XObject"); ret += HPDF_Dict_AddName (smask, "Subtype", "Image"); - ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)info_ptr->width); - ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)info_ptr->height); + ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)width); + ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)height); ret += HPDF_Dict_AddName (smask, "ColorSpace", "DeviceGray"); - ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); + ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)bit_depth); if (ret != HPDF_OK) { HPDF_Dict_Free(smask); @@ -489,7 +498,7 @@ LoadPngData (HPDF_Dict image, goto Exit; } - smask_data = HPDF_GetMem(image->mmgr, info_ptr->width * info_ptr->height); + smask_data = HPDF_GetMem(image->mmgr, width * height); if (!smask_data) { HPDF_Dict_Free(smask); ret = HPDF_FAILD_TO_ALLOC_MEM; @@ -503,7 +512,7 @@ LoadPngData (HPDF_Dict image, goto Exit; } - if (HPDF_Stream_Write(smask->stream, smask_data, info_ptr->width * info_ptr->height) != HPDF_OK) { + if (HPDF_Stream_Write(smask->stream, smask_data, width * height) != HPDF_OK) { HPDF_FreeMem(image->mmgr, smask_data); HPDF_Dict_Free(smask); ret = HPDF_FILE_IO_ERROR; @@ -513,9 +522,9 @@ LoadPngData (HPDF_Dict image, ret += CreatePallet(image, png_ptr, info_ptr); - ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width); - ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height); - ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); + ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)width); + ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)height); + ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)bit_depth); ret += HPDF_Dict_Add (image, "SMask", smask); png_destroy_read_struct(&png_ptr, &info_ptr, NULL); @@ -526,7 +535,7 @@ no_transparent_color_in_palette: /* read images with alpha channel right away we have to do this because image transparent mask must be added to the Xref */ - if (xref && PNG_COLOR_MASK_ALPHA & info_ptr->color_type) { + if (xref && PNG_COLOR_MASK_ALPHA & color_type) { HPDF_Dict smask; png_bytep smask_data; @@ -539,10 +548,10 @@ no_transparent_color_in_palette: smask->header.obj_class |= HPDF_OSUBCLASS_XOBJECT; ret = HPDF_Dict_AddName (smask, "Type", "XObject"); ret += HPDF_Dict_AddName (smask, "Subtype", "Image"); - ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)info_ptr->width); - ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)info_ptr->height); + ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)width); + ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)height); ret += HPDF_Dict_AddName (smask, "ColorSpace", "DeviceGray"); - ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); + ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)bit_depth); if (ret != HPDF_OK) { HPDF_Dict_Free(smask); @@ -550,7 +559,7 @@ no_transparent_color_in_palette: goto Exit; } - smask_data = HPDF_GetMem(image->mmgr, info_ptr->width * info_ptr->height); + smask_data = HPDF_GetMem(image->mmgr, width * height); if (!smask_data) { HPDF_Dict_Free(smask); ret = HPDF_FAILD_TO_ALLOC_MEM; @@ -564,7 +573,7 @@ no_transparent_color_in_palette: goto Exit; } - if (HPDF_Stream_Write(smask->stream, smask_data, info_ptr->width * info_ptr->height) != HPDF_OK) { + if (HPDF_Stream_Write(smask->stream, smask_data, width * height) != HPDF_OK) { HPDF_FreeMem(image->mmgr, smask_data); HPDF_Dict_Free(smask); ret = HPDF_FILE_IO_ERROR; @@ -572,14 +581,14 @@ no_transparent_color_in_palette: } HPDF_FreeMem(image->mmgr, smask_data); - if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { + if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { ret += HPDF_Dict_AddName (image, "ColorSpace", "DeviceGray"); } else { ret += HPDF_Dict_AddName (image, "ColorSpace", "DeviceRGB"); } - ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width); - ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height); - ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); + ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)width); + ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)height); + ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)bit_depth); ret += HPDF_Dict_Add (image, "SMask", smask); png_destroy_read_struct(&png_ptr, &info_ptr, NULL); @@ -589,9 +598,9 @@ no_transparent_color_in_palette: /* if the image has color palette, copy the pallet of the image to * create color map. */ - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + if (color_type == PNG_COLOR_TYPE_PALETTE) ret = CreatePallet(image, png_ptr, info_ptr); - else if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY) + else if (color_type == PNG_COLOR_TYPE_GRAY) ret = HPDF_Dict_AddName (image, "ColorSpace", "DeviceGray"); else ret = HPDF_Dict_AddName (image, "ColorSpace", "DeviceRGB"); @@ -617,16 +626,16 @@ no_transparent_color_in_palette: } /* setting the info of the image. */ - if (HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width) + if (HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)width) != HPDF_OK) goto Exit; - if (HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height) + if (HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)height) != HPDF_OK) goto Exit; if (HPDF_Dict_AddNumber (image, "BitsPerComponent", - (HPDF_UINT)info_ptr->bit_depth) != HPDF_OK) + (HPDF_UINT)bit_depth) != HPDF_OK) goto Exit; /* clean up */ -- debian/patches/series0000664000000000000000000000054411627427123012044 0ustar 0001-fix-build-with-libpng-1.5.0-reported-by-Tamas-Tevesz.patch 0002-fix-quite-a-number-of-warnings-patch-by-Davide-Achil.patch 0003-fix-typo-noticed-by-Franco-Marchesini.patch 0004-Several-fixes-based-on-the-warnings-generated-by-cla.patch 0005-fix-possible-endless-loops-in-PNG-handling-code.patch 0006-fix-HPDF_GetContents-patch-by-Vincent-Dupont.patch debian/patches/0006-fix-HPDF_GetContents-patch-by-Vincent-Dupont.patch0000664000000000000000000000110711627427123022431 0ustar From: Antony Dovgal Date: Fri, 20 May 2011 18:54:32 +0400 Subject: fix HPDF_GetContents() (patch by Vincent Dupont) --- src/hpdf_doc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/hpdf_doc.c b/src/hpdf_doc.c index 7ba58df..4aed4ab 100644 --- a/src/hpdf_doc.c +++ b/src/hpdf_doc.c @@ -658,7 +658,7 @@ HPDF_GetContents (HPDF_Doc pdf, HPDF_UINT32 *size) { HPDF_Stream stream; - HPDF_UINT isize; + HPDF_UINT isize = *size; HPDF_STATUS ret; HPDF_PTRACE ((" HPDF_GetContents\n")); -- debian/watch0000664000000000000000000000014211607771240010223 0ustar version=3 opts=dversionmangle=s/\+dfsg// \ http://libharu.org/files/libharu-(\d\.\d\.\d)\.tar\.gz debian/libhpdf-2.2.1.install0000664000000000000000000000002511627427123012630 0ustar usr/lib/libhpdf-*.so debian/control0000664000000000000000000000343512261273726010610 0ustar Source: libharu Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Johan Van de Wauw Build-Depends: debhelper (>= 7.0.50~), libpng-dev, libz-dev, dh-autoreconf Standards-Version: 3.9.2 Section: libs Homepage: http://www.libharu.org Vcs-Git: git://git.debian.org/collab-maint/libharu.git Vcs-Browser: http://git.debian.org/?p=collab-maint/libharu.git Package: libhpdf-dev Section: libdevel Architecture: any Depends: libhpdf-2.2.1 (= ${binary:Version}), ${misc:Depends} Description: C library for generating pdf files (development files) Haru is a free, cross platform, open-source C library for generating PDF files. It supports the following features: 1. Generation of PDF files with lines, text and images. 2. Outlines, text and link annotations. 3. Document compression usig deflate-decode. 4. Embedded PNG and Jpeg images. 5. Embedded Type1 and TrueType fonts. 6. Creation of encrypted PDF files. 7. Usage of various character sets (ISO8859-1~16, MSCP1250~8, KOI8-R). 8. Support for CJK fonts and encodings. This package contains the header files for developing with libharu. Package: libhpdf-2.2.1 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: C library for generating pdf files Haru is a free, cross platform, open-source C library for generating PDF files. It supports the following features: 1. Generation of PDF files with lines, text and images. 2. Outlines, text and link annotations. 3. Document compression usig deflate-decode. 4. Embedded PNG and Jpeg images. 5. Embedded Type1 and TrueType fonts. 6. Creation of encrypted PDF files. 7. Usage of various character sets (ISO8859-1~16, MSCP1250~8, KOI8-R). 8. Support for CJK fonts and encodings. debian/source/0000775000000000000000000000000011607771240010475 5ustar debian/source/format0000664000000000000000000000001411607771240011703 0ustar 3.0 (quilt) debian/compat0000664000000000000000000000000211607771240010373 0ustar 7 debian/rules0000775000000000000000000000006112261275120010243 0ustar #!/usr/bin/make -f %: dh $@ --with autoreconf debian/libhpdf-dev.install0000664000000000000000000000004111627427123012744 0ustar usr/include/* usr/lib/libhpdf.so debian/libhpdf-2.1.0.symbols0000664000000000000000000004556411607771240012671 0ustar libhpdf-2.1.0.so libhpdf-2.1.0 #MINVER# ExtGState_Check@Base 2.1.0+dfsg GetElement@Base 2.1.0+dfsg HPDF_3DAnnot_New@Base 2.1.0+dfsg HPDF_3DAnnot_Set3DView@Base 2.1.0+dfsg HPDF_3DView_AddNode@Base 2.1.0+dfsg HPDF_3DView_SetBackgroundColor@Base 2.1.0+dfsg HPDF_3DView_SetCamera@Base 2.1.0+dfsg HPDF_3DView_SetLighting@Base 2.1.0+dfsg HPDF_3DView_SetOrthogonalProjection@Base 2.1.0+dfsg HPDF_3DView_SetPerspectiveProjection@Base 2.1.0+dfsg HPDF_AToF@Base 2.1.0+dfsg HPDF_AToI@Base 2.1.0+dfsg HPDF_AddPage@Base 2.1.0+dfsg HPDF_AddPageLabel@Base 2.1.0+dfsg HPDF_Annotation_New@Base 2.1.0+dfsg HPDF_Annotation_SetBorderStyle@Base 2.1.0+dfsg HPDF_Annotation_Validate@Base 2.1.0+dfsg HPDF_Array_Add@Base 2.1.0+dfsg HPDF_Array_AddName@Base 2.1.0+dfsg HPDF_Array_AddNumber@Base 2.1.0+dfsg HPDF_Array_AddReal@Base 2.1.0+dfsg HPDF_Array_Clear@Base 2.1.0+dfsg HPDF_Array_Free@Base 2.1.0+dfsg HPDF_Array_GetItem@Base 2.1.0+dfsg HPDF_Array_Insert@Base 2.1.0+dfsg HPDF_Array_New@Base 2.1.0+dfsg HPDF_Array_Write@Base 2.1.0+dfsg HPDF_Base14FontDef_FindBuiltinData@Base 2.1.0+dfsg HPDF_Base14FontDef_New@Base 2.1.0+dfsg HPDF_BasicEncoder_CopyMap@Base 2.1.0+dfsg HPDF_BasicEncoder_FindBuiltinData@Base 2.1.0+dfsg HPDF_BasicEncoder_Free@Base 2.1.0+dfsg HPDF_BasicEncoder_New@Base 2.1.0+dfsg HPDF_BasicEncoder_OverrideMap@Base 2.1.0+dfsg HPDF_BasicEncoder_ToUnicode@Base 2.1.0+dfsg HPDF_BasicEncoder_Write@Base 2.1.0+dfsg HPDF_Binary_Free@Base 2.1.0+dfsg HPDF_Binary_GetLen@Base 2.1.0+dfsg HPDF_Binary_GetValue@Base 2.1.0+dfsg HPDF_Binary_New@Base 2.1.0+dfsg HPDF_Binary_SetValue@Base 2.1.0+dfsg HPDF_Binary_Write@Base 2.1.0+dfsg HPDF_Boolean_New@Base 2.1.0+dfsg HPDF_Boolean_Write@Base 2.1.0+dfsg HPDF_Box_Array_New@Base 2.1.0+dfsg HPDF_CIDFontDef_AddWidth@Base 2.1.0+dfsg HPDF_CIDFontDef_ChangeStyle@Base 2.1.0+dfsg HPDF_CIDFontDef_FreeFunc@Base 2.1.0+dfsg HPDF_CIDFontDef_FreeWidth@Base 2.1.0+dfsg HPDF_CIDFontDef_GetCIDWidth@Base 2.1.0+dfsg HPDF_CIDFontDef_New@Base 2.1.0+dfsg HPDF_CMapEncoder_AddCMap@Base 2.1.0+dfsg HPDF_CMapEncoder_AddCodeSpaceRange@Base 2.1.0+dfsg HPDF_CMapEncoder_AddJWWLineHead@Base 2.1.0+dfsg HPDF_CMapEncoder_AddNotDefRange@Base 2.1.0+dfsg HPDF_CMapEncoder_ByteType@Base 2.1.0+dfsg HPDF_CMapEncoder_Free@Base 2.1.0+dfsg HPDF_CMapEncoder_InitAttr@Base 2.1.0+dfsg HPDF_CMapEncoder_New@Base 2.1.0+dfsg HPDF_CMapEncoder_SetUnicodeArray@Base 2.1.0+dfsg HPDF_CMapEncoder_ToCID@Base 2.1.0+dfsg HPDF_CMapEncoder_ToUnicode@Base 2.1.0+dfsg HPDF_CMapEncoder_Write@Base 2.1.0+dfsg HPDF_CallbackReader_New@Base 2.1.0+dfsg HPDF_CallbackWriter_New@Base 2.1.0+dfsg HPDF_Catalog_AddPageLabel@Base 2.1.0+dfsg HPDF_Catalog_GetPageLayout@Base 2.1.0+dfsg HPDF_Catalog_GetPageMode@Base 2.1.0+dfsg HPDF_Catalog_GetRoot@Base 2.1.0+dfsg HPDF_Catalog_GetViewerPreference@Base 2.1.0+dfsg HPDF_Catalog_New@Base 2.1.0+dfsg HPDF_Catalog_SetOpenAction@Base 2.1.0+dfsg HPDF_Catalog_SetPageLayout@Base 2.1.0+dfsg HPDF_Catalog_SetPageMode@Base 2.1.0+dfsg HPDF_Catalog_SetViewerPreference@Base 2.1.0+dfsg HPDF_Catalog_Validate@Base 2.1.0+dfsg HPDF_CheckError@Base 2.1.0+dfsg HPDF_CopyError@Base 2.1.0+dfsg HPDF_Create3DView@Base 2.1.0+dfsg HPDF_CreateExtGState@Base 2.1.0+dfsg HPDF_CreateOutline@Base 2.1.0+dfsg HPDF_DESTINATION_TYPE_NAMES@Base 2.1.0+dfsg HPDF_Destination_New@Base 2.1.0+dfsg HPDF_Destination_SetFit@Base 2.1.0+dfsg HPDF_Destination_SetFitB@Base 2.1.0+dfsg HPDF_Destination_SetFitBH@Base 2.1.0+dfsg HPDF_Destination_SetFitBV@Base 2.1.0+dfsg HPDF_Destination_SetFitH@Base 2.1.0+dfsg HPDF_Destination_SetFitR@Base 2.1.0+dfsg HPDF_Destination_SetFitV@Base 2.1.0+dfsg HPDF_Destination_SetXYZ@Base 2.1.0+dfsg HPDF_Destination_Validate@Base 2.1.0+dfsg HPDF_DictStream_New@Base 2.1.0+dfsg HPDF_Dict_Add@Base 2.1.0+dfsg HPDF_Dict_AddBoolean@Base 2.1.0+dfsg HPDF_Dict_AddName@Base 2.1.0+dfsg HPDF_Dict_AddNumber@Base 2.1.0+dfsg HPDF_Dict_AddReal@Base 2.1.0+dfsg HPDF_Dict_Free@Base 2.1.0+dfsg HPDF_Dict_GetItem@Base 2.1.0+dfsg HPDF_Dict_GetKeyByObj@Base 2.1.0+dfsg HPDF_Dict_New@Base 2.1.0+dfsg HPDF_Dict_RemoveElement@Base 2.1.0+dfsg HPDF_Dict_Write@Base 2.1.0+dfsg HPDF_Doc_AddPagesTo@Base 2.1.0+dfsg HPDF_Doc_FindEncoder@Base 2.1.0+dfsg HPDF_Doc_FindFont@Base 2.1.0+dfsg HPDF_Doc_FindFontDef@Base 2.1.0+dfsg HPDF_Doc_GetCurrentPages@Base 2.1.0+dfsg HPDF_Doc_PrepareEncryption@Base 2.1.0+dfsg HPDF_Doc_RegisterEncoder@Base 2.1.0+dfsg HPDF_Doc_RegisterFontDef@Base 2.1.0+dfsg HPDF_Doc_SetCurrentPage@Base 2.1.0+dfsg HPDF_Doc_SetCurrentPages@Base 2.1.0+dfsg HPDF_Doc_SetEncryptOff@Base 2.1.0+dfsg HPDF_Doc_SetEncryptOn@Base 2.1.0+dfsg HPDF_Doc_Validate@Base 2.1.0+dfsg HPDF_Encoder_ByteType@Base 2.1.0+dfsg HPDF_Encoder_CheckJWWLineHead@Base 2.1.0+dfsg HPDF_Encoder_Free@Base 2.1.0+dfsg HPDF_Encoder_GetByteType@Base 2.1.0+dfsg HPDF_Encoder_GetType@Base 2.1.0+dfsg HPDF_Encoder_GetUnicode@Base 2.1.0+dfsg HPDF_Encoder_GetWritingMode@Base 2.1.0+dfsg HPDF_Encoder_SetParseText@Base 2.1.0+dfsg HPDF_Encoder_ToUnicode@Base 2.1.0+dfsg HPDF_Encoder_Validate@Base 2.1.0+dfsg HPDF_EncryptDict_CreateID@Base 2.1.0+dfsg HPDF_EncryptDict_GetAttr@Base 2.1.0+dfsg HPDF_EncryptDict_New@Base 2.1.0+dfsg HPDF_EncryptDict_OnFree@Base 2.1.0+dfsg HPDF_EncryptDict_Prepare@Base 2.1.0+dfsg HPDF_EncryptDict_SetPassword@Base 2.1.0+dfsg HPDF_EncryptDict_Validate@Base 2.1.0+dfsg HPDF_Encrypt_CreateEncryptionKey@Base 2.1.0+dfsg HPDF_Encrypt_CreateOwnerKey@Base 2.1.0+dfsg HPDF_Encrypt_CreateUserKey@Base 2.1.0+dfsg HPDF_Encrypt_CryptBuf@Base 2.1.0+dfsg HPDF_Encrypt_Init@Base 2.1.0+dfsg HPDF_Encrypt_InitKey@Base 2.1.0+dfsg HPDF_Encrypt_Reset@Base 2.1.0+dfsg HPDF_Error_GetCode@Base 2.1.0+dfsg HPDF_Error_GetDetailCode@Base 2.1.0+dfsg HPDF_Error_Init@Base 2.1.0+dfsg HPDF_Error_Reset@Base 2.1.0+dfsg HPDF_ExtGState_New@Base 2.1.0+dfsg HPDF_ExtGState_SetAlphaFill@Base 2.1.0+dfsg HPDF_ExtGState_SetAlphaStroke@Base 2.1.0+dfsg HPDF_ExtGState_SetBlendMode@Base 2.1.0+dfsg HPDF_ExtGState_Validate@Base 2.1.0+dfsg HPDF_FToA@Base 2.1.0+dfsg HPDF_FileReader_New@Base 2.1.0+dfsg HPDF_FileReader_ReadFunc@Base 2.1.0+dfsg HPDF_FileReader_SeekFunc@Base 2.1.0+dfsg HPDF_FileStream_FreeFunc@Base 2.1.0+dfsg HPDF_FileStream_SizeFunc@Base 2.1.0+dfsg HPDF_FileStream_TellFunc@Base 2.1.0+dfsg HPDF_FileWriter_New@Base 2.1.0+dfsg HPDF_FileWriter_WriteFunc@Base 2.1.0+dfsg HPDF_FontDef_Cleanup@Base 2.1.0+dfsg HPDF_FontDef_Free@Base 2.1.0+dfsg HPDF_FontDef_Validate@Base 2.1.0+dfsg HPDF_Font_GetAscent@Base 2.1.0+dfsg HPDF_Font_GetBBox@Base 2.1.0+dfsg HPDF_Font_GetCapHeight@Base 2.1.0+dfsg HPDF_Font_GetDescent@Base 2.1.0+dfsg HPDF_Font_GetEncodingName@Base 2.1.0+dfsg HPDF_Font_GetFontName@Base 2.1.0+dfsg HPDF_Font_GetUnicodeWidth@Base 2.1.0+dfsg HPDF_Font_GetXHeight@Base 2.1.0+dfsg HPDF_Font_MeasureText@Base 2.1.0+dfsg HPDF_Font_TextWidth@Base 2.1.0+dfsg HPDF_Font_Validate@Base 2.1.0+dfsg HPDF_Free@Base 2.1.0+dfsg HPDF_FreeDoc@Base 2.1.0+dfsg HPDF_FreeDocAll@Base 2.1.0+dfsg HPDF_FreeMem@Base 2.1.0+dfsg HPDF_GState_Free@Base 2.1.0+dfsg HPDF_GState_New@Base 2.1.0+dfsg HPDF_GetCurrentEncoder@Base 2.1.0+dfsg HPDF_GetCurrentPage@Base 2.1.0+dfsg HPDF_GetEncoder@Base 2.1.0+dfsg HPDF_GetError@Base 2.1.0+dfsg HPDF_GetErrorDetail@Base 2.1.0+dfsg HPDF_GetFont@Base 2.1.0+dfsg HPDF_GetFontDef@Base 2.1.0+dfsg HPDF_GetInfoAttr@Base 2.1.0+dfsg HPDF_GetMem@Base 2.1.0+dfsg HPDF_GetPageByIndex@Base 2.1.0+dfsg HPDF_GetPageLayout@Base 2.1.0+dfsg HPDF_GetPageMode@Base 2.1.0+dfsg HPDF_GetStreamSize@Base 2.1.0+dfsg HPDF_GetTTFontDefFromFile@Base 2.1.0+dfsg HPDF_GetVersion@Base 2.1.0+dfsg HPDF_GetViewerPreference@Base 2.1.0+dfsg HPDF_GryphNameToUnicode@Base 2.1.0+dfsg HPDF_HasDoc@Base 2.1.0+dfsg HPDF_IToA2@Base 2.1.0+dfsg HPDF_IToA@Base 2.1.0+dfsg HPDF_Image_GetBitsPerComponent@Base 2.1.0+dfsg HPDF_Image_GetColorSpace@Base 2.1.0+dfsg HPDF_Image_GetHeight@Base 2.1.0+dfsg HPDF_Image_GetSize2@Base 2.1.0+dfsg HPDF_Image_GetSize@Base 2.1.0+dfsg HPDF_Image_GetWidth@Base 2.1.0+dfsg HPDF_Image_LoadJpegImage@Base 2.1.0+dfsg HPDF_Image_LoadPngImage@Base 2.1.0+dfsg HPDF_Image_LoadRawImage@Base 2.1.0+dfsg HPDF_Image_LoadRawImageFromMem@Base 2.1.0+dfsg HPDF_Image_SetColorMask@Base 2.1.0+dfsg HPDF_Image_SetMask@Base 2.1.0+dfsg HPDF_Image_SetMaskImage@Base 2.1.0+dfsg HPDF_Image_Validate@Base 2.1.0+dfsg HPDF_Info_GetInfoAttr@Base 2.1.0+dfsg HPDF_Info_SetInfoAttr@Base 2.1.0+dfsg HPDF_Info_SetInfoDateAttr@Base 2.1.0+dfsg HPDF_InsertPage@Base 2.1.0+dfsg HPDF_LinkAnnot_New@Base 2.1.0+dfsg HPDF_LinkAnnot_SetBorderStyle@Base 2.1.0+dfsg HPDF_LinkAnnot_SetHighlightMode@Base 2.1.0+dfsg HPDF_List_Add@Base 2.1.0+dfsg HPDF_List_Clear@Base 2.1.0+dfsg HPDF_List_Find@Base 2.1.0+dfsg HPDF_List_Free@Base 2.1.0+dfsg HPDF_List_Insert@Base 2.1.0+dfsg HPDF_List_ItemAt@Base 2.1.0+dfsg HPDF_List_New@Base 2.1.0+dfsg HPDF_List_Remove@Base 2.1.0+dfsg HPDF_List_RemoveByIndex@Base 2.1.0+dfsg HPDF_LoadJpegImageFromFile@Base 2.1.0+dfsg HPDF_LoadPngImageFromFile2@Base 2.1.0+dfsg HPDF_LoadPngImageFromFile@Base 2.1.0+dfsg HPDF_LoadRawImageFromFile@Base 2.1.0+dfsg HPDF_LoadRawImageFromMem@Base 2.1.0+dfsg HPDF_LoadTTFontFromFile2@Base 2.1.0+dfsg HPDF_LoadTTFontFromFile@Base 2.1.0+dfsg HPDF_LoadType1FontFromFile@Base 2.1.0+dfsg HPDF_LoadU3DFromFile@Base 2.1.0+dfsg HPDF_MD5Final@Base 2.1.0+dfsg HPDF_MD5Init@Base 2.1.0+dfsg HPDF_MD5Update@Base 2.1.0+dfsg HPDF_MMgr_Free@Base 2.1.0+dfsg HPDF_MMgr_New@Base 2.1.0+dfsg HPDF_MemCmp@Base 2.1.0+dfsg HPDF_MemCpy@Base 2.1.0+dfsg HPDF_MemSet@Base 2.1.0+dfsg HPDF_MemStream_FreeData@Base 2.1.0+dfsg HPDF_MemStream_FreeFunc@Base 2.1.0+dfsg HPDF_MemStream_GetBufCount@Base 2.1.0+dfsg HPDF_MemStream_GetBufPtr@Base 2.1.0+dfsg HPDF_MemStream_GetBufSize@Base 2.1.0+dfsg HPDF_MemStream_InWrite@Base 2.1.0+dfsg HPDF_MemStream_New@Base 2.1.0+dfsg HPDF_MemStream_ReadFunc@Base 2.1.0+dfsg HPDF_MemStream_Rewrite@Base 2.1.0+dfsg HPDF_MemStream_SeekFunc@Base 2.1.0+dfsg HPDF_MemStream_SizeFunc@Base 2.1.0+dfsg HPDF_MemStream_TellFunc@Base 2.1.0+dfsg HPDF_MemStream_WriteFunc@Base 2.1.0+dfsg HPDF_Name_GetValue@Base 2.1.0+dfsg HPDF_Name_New@Base 2.1.0+dfsg HPDF_Name_SetValue@Base 2.1.0+dfsg HPDF_Name_Write@Base 2.1.0+dfsg HPDF_New@Base 2.1.0+dfsg HPDF_NewDoc@Base 2.1.0+dfsg HPDF_NewEx@Base 2.1.0+dfsg HPDF_Null_New@Base 2.1.0+dfsg HPDF_Number_New@Base 2.1.0+dfsg HPDF_Number_SetValue@Base 2.1.0+dfsg HPDF_Number_Write@Base 2.1.0+dfsg HPDF_Obj_ForceFree@Base 2.1.0+dfsg HPDF_Obj_Free@Base 2.1.0+dfsg HPDF_Obj_Write@Base 2.1.0+dfsg HPDF_Obj_WriteValue@Base 2.1.0+dfsg HPDF_OutlineRoot_New@Base 2.1.0+dfsg HPDF_Outline_GetFirst@Base 2.1.0+dfsg HPDF_Outline_GetLast@Base 2.1.0+dfsg HPDF_Outline_GetNext@Base 2.1.0+dfsg HPDF_Outline_GetOpened@Base 2.1.0+dfsg HPDF_Outline_GetParent@Base 2.1.0+dfsg HPDF_Outline_GetPrev@Base 2.1.0+dfsg HPDF_Outline_New@Base 2.1.0+dfsg HPDF_Outline_SetDestination@Base 2.1.0+dfsg HPDF_Outline_SetOpened@Base 2.1.0+dfsg HPDF_Outline_Validate@Base 2.1.0+dfsg HPDF_PadOrTrancatePasswd@Base 2.1.0+dfsg HPDF_PageLabel_New@Base 2.1.0+dfsg HPDF_Page_Arc@Base 2.1.0+dfsg HPDF_Page_BeginText@Base 2.1.0+dfsg HPDF_Page_CheckState@Base 2.1.0+dfsg HPDF_Page_Circle@Base 2.1.0+dfsg HPDF_Page_Clip@Base 2.1.0+dfsg HPDF_Page_ClosePath@Base 2.1.0+dfsg HPDF_Page_ClosePathEofillStroke@Base 2.1.0+dfsg HPDF_Page_ClosePathFillStroke@Base 2.1.0+dfsg HPDF_Page_ClosePathStroke@Base 2.1.0+dfsg HPDF_Page_Concat@Base 2.1.0+dfsg HPDF_Page_Create3DAnnot@Base 2.1.0+dfsg HPDF_Page_CreateDestination@Base 2.1.0+dfsg HPDF_Page_CreateLinkAnnot@Base 2.1.0+dfsg HPDF_Page_CreateTextAnnot@Base 2.1.0+dfsg HPDF_Page_CreateURILinkAnnot@Base 2.1.0+dfsg HPDF_Page_CurveTo2@Base 2.1.0+dfsg HPDF_Page_CurveTo3@Base 2.1.0+dfsg HPDF_Page_CurveTo@Base 2.1.0+dfsg HPDF_Page_DrawImage@Base 2.1.0+dfsg HPDF_Page_Ellipse@Base 2.1.0+dfsg HPDF_Page_EndPath@Base 2.1.0+dfsg HPDF_Page_EndText@Base 2.1.0+dfsg HPDF_Page_Eoclip@Base 2.1.0+dfsg HPDF_Page_Eofill@Base 2.1.0+dfsg HPDF_Page_EofillStroke@Base 2.1.0+dfsg HPDF_Page_ExecuteXObject@Base 2.1.0+dfsg HPDF_Page_Fill@Base 2.1.0+dfsg HPDF_Page_FillStroke@Base 2.1.0+dfsg HPDF_Page_GRestore@Base 2.1.0+dfsg HPDF_Page_GSave@Base 2.1.0+dfsg HPDF_Page_GetCMYKFill@Base 2.1.0+dfsg HPDF_Page_GetCMYKStroke@Base 2.1.0+dfsg HPDF_Page_GetCharSpace@Base 2.1.0+dfsg HPDF_Page_GetCurrentFont@Base 2.1.0+dfsg HPDF_Page_GetCurrentFontSize@Base 2.1.0+dfsg HPDF_Page_GetCurrentPos2@Base 2.1.0+dfsg HPDF_Page_GetCurrentPos@Base 2.1.0+dfsg HPDF_Page_GetCurrentTextPos2@Base 2.1.0+dfsg HPDF_Page_GetCurrentTextPos@Base 2.1.0+dfsg HPDF_Page_GetDash@Base 2.1.0+dfsg HPDF_Page_GetExtGStateName@Base 2.1.0+dfsg HPDF_Page_GetFillingColorSpace@Base 2.1.0+dfsg HPDF_Page_GetFlat@Base 2.1.0+dfsg HPDF_Page_GetGMode@Base 2.1.0+dfsg HPDF_Page_GetGStateDepth@Base 2.1.0+dfsg HPDF_Page_GetGrayFill@Base 2.1.0+dfsg HPDF_Page_GetGrayStroke@Base 2.1.0+dfsg HPDF_Page_GetHeight@Base 2.1.0+dfsg HPDF_Page_GetHorizontalScalling@Base 2.1.0+dfsg HPDF_Page_GetInheritableItem@Base 2.1.0+dfsg HPDF_Page_GetLineCap@Base 2.1.0+dfsg HPDF_Page_GetLineJoin@Base 2.1.0+dfsg HPDF_Page_GetLineWidth@Base 2.1.0+dfsg HPDF_Page_GetLocalFontName@Base 2.1.0+dfsg HPDF_Page_GetMediaBox@Base 2.1.0+dfsg HPDF_Page_GetMiterLimit@Base 2.1.0+dfsg HPDF_Page_GetRGBFill@Base 2.1.0+dfsg HPDF_Page_GetRGBStroke@Base 2.1.0+dfsg HPDF_Page_GetStrokingColorSpace@Base 2.1.0+dfsg HPDF_Page_GetTextLeading@Base 2.1.0+dfsg HPDF_Page_GetTextMatrix@Base 2.1.0+dfsg HPDF_Page_GetTextRaise@Base 2.1.0+dfsg HPDF_Page_GetTextRenderingMode@Base 2.1.0+dfsg HPDF_Page_GetTextRise@Base 2.1.0+dfsg HPDF_Page_GetTransMatrix@Base 2.1.0+dfsg HPDF_Page_GetWidth@Base 2.1.0+dfsg HPDF_Page_GetWordSpace@Base 2.1.0+dfsg HPDF_Page_GetXObjectName@Base 2.1.0+dfsg HPDF_Page_InsertBefore@Base 2.1.0+dfsg HPDF_Page_LineTo@Base 2.1.0+dfsg HPDF_Page_MeasureText@Base 2.1.0+dfsg HPDF_Page_MoveTextPos2@Base 2.1.0+dfsg HPDF_Page_MoveTextPos@Base 2.1.0+dfsg HPDF_Page_MoveTo@Base 2.1.0+dfsg HPDF_Page_MoveToNextLine@Base 2.1.0+dfsg HPDF_Page_New@Base 2.1.0+dfsg HPDF_Page_Rectangle@Base 2.1.0+dfsg HPDF_Page_SetBoxValue@Base 2.1.0+dfsg HPDF_Page_SetCMYKFill@Base 2.1.0+dfsg HPDF_Page_SetCMYKStroke@Base 2.1.0+dfsg HPDF_Page_SetCharSpace@Base 2.1.0+dfsg HPDF_Page_SetDash@Base 2.1.0+dfsg HPDF_Page_SetExtGState@Base 2.1.0+dfsg HPDF_Page_SetFilter@Base 2.1.0+dfsg HPDF_Page_SetFlat@Base 2.1.0+dfsg HPDF_Page_SetFontAndSize@Base 2.1.0+dfsg HPDF_Page_SetGrayFill@Base 2.1.0+dfsg HPDF_Page_SetGrayStroke@Base 2.1.0+dfsg HPDF_Page_SetHeight@Base 2.1.0+dfsg HPDF_Page_SetHorizontalScalling@Base 2.1.0+dfsg HPDF_Page_SetLineCap@Base 2.1.0+dfsg HPDF_Page_SetLineJoin@Base 2.1.0+dfsg HPDF_Page_SetLineWidth@Base 2.1.0+dfsg HPDF_Page_SetMiterLimit@Base 2.1.0+dfsg HPDF_Page_SetRGBFill@Base 2.1.0+dfsg HPDF_Page_SetRGBStroke@Base 2.1.0+dfsg HPDF_Page_SetRotate@Base 2.1.0+dfsg HPDF_Page_SetSize@Base 2.1.0+dfsg HPDF_Page_SetSlideShow@Base 2.1.0+dfsg HPDF_Page_SetTextLeading@Base 2.1.0+dfsg HPDF_Page_SetTextMatrix@Base 2.1.0+dfsg HPDF_Page_SetTextRaise@Base 2.1.0+dfsg HPDF_Page_SetTextRenderingMode@Base 2.1.0+dfsg HPDF_Page_SetTextRise@Base 2.1.0+dfsg HPDF_Page_SetWidth@Base 2.1.0+dfsg HPDF_Page_SetWordSpace@Base 2.1.0+dfsg HPDF_Page_ShowText@Base 2.1.0+dfsg HPDF_Page_ShowTextNextLine@Base 2.1.0+dfsg HPDF_Page_ShowTextNextLineEx@Base 2.1.0+dfsg HPDF_Page_Stroke@Base 2.1.0+dfsg HPDF_Page_TextOut@Base 2.1.0+dfsg HPDF_Page_TextRect@Base 2.1.0+dfsg HPDF_Page_TextWidth@Base 2.1.0+dfsg HPDF_Page_Validate@Base 2.1.0+dfsg HPDF_Pages_AddKids@Base 2.1.0+dfsg HPDF_Pages_New@Base 2.1.0+dfsg HPDF_Pages_Validate@Base 2.1.0+dfsg HPDF_Proxy_New@Base 2.1.0+dfsg HPDF_RaiseError@Base 2.1.0+dfsg HPDF_ReadFromStream@Base 2.1.0+dfsg HPDF_Real_New@Base 2.1.0+dfsg HPDF_Real_SetValue@Base 2.1.0+dfsg HPDF_Real_Write@Base 2.1.0+dfsg HPDF_ResetError@Base 2.1.0+dfsg HPDF_ResetStream@Base 2.1.0+dfsg HPDF_SaveToFile@Base 2.1.0+dfsg HPDF_SaveToStream@Base 2.1.0+dfsg HPDF_SetCompressionMode@Base 2.1.0+dfsg HPDF_SetCurrentEncoder@Base 2.1.0+dfsg HPDF_SetEncryptionMode@Base 2.1.0+dfsg HPDF_SetError@Base 2.1.0+dfsg HPDF_SetErrorHandler@Base 2.1.0+dfsg HPDF_SetInfoAttr@Base 2.1.0+dfsg HPDF_SetInfoDateAttr@Base 2.1.0+dfsg HPDF_SetOpenAction@Base 2.1.0+dfsg HPDF_SetPageLayout@Base 2.1.0+dfsg HPDF_SetPageMode@Base 2.1.0+dfsg HPDF_SetPagesConfiguration@Base 2.1.0+dfsg HPDF_SetPassword@Base 2.1.0+dfsg HPDF_SetPermission@Base 2.1.0+dfsg HPDF_SetViewerPreference@Base 2.1.0+dfsg HPDF_StrCmp@Base 2.1.0+dfsg HPDF_StrCpy@Base 2.1.0+dfsg HPDF_StrLen@Base 2.1.0+dfsg HPDF_StrStr@Base 2.1.0+dfsg HPDF_Stream_Free@Base 2.1.0+dfsg HPDF_Stream_Read@Base 2.1.0+dfsg HPDF_Stream_ReadLn@Base 2.1.0+dfsg HPDF_Stream_Seek@Base 2.1.0+dfsg HPDF_Stream_Size@Base 2.1.0+dfsg HPDF_Stream_Tell@Base 2.1.0+dfsg HPDF_Stream_Validate@Base 2.1.0+dfsg HPDF_Stream_Write@Base 2.1.0+dfsg HPDF_Stream_WriteBinary@Base 2.1.0+dfsg HPDF_Stream_WriteChar@Base 2.1.0+dfsg HPDF_Stream_WriteEscapeName@Base 2.1.0+dfsg HPDF_Stream_WriteEscapeText2@Base 2.1.0+dfsg HPDF_Stream_WriteEscapeText@Base 2.1.0+dfsg HPDF_Stream_WriteInt@Base 2.1.0+dfsg HPDF_Stream_WriteReal@Base 2.1.0+dfsg HPDF_Stream_WriteStr@Base 2.1.0+dfsg HPDF_Stream_WriteToStream@Base 2.1.0+dfsg HPDF_Stream_WriteToStreamWithDeflate@Base 2.1.0+dfsg HPDF_Stream_WriteUChar@Base 2.1.0+dfsg HPDF_Stream_WriteUInt@Base 2.1.0+dfsg HPDF_String_Free@Base 2.1.0+dfsg HPDF_String_New@Base 2.1.0+dfsg HPDF_String_SetValue@Base 2.1.0+dfsg HPDF_String_Write@Base 2.1.0+dfsg HPDF_TTFontDef_GetCharBBox@Base 2.1.0+dfsg HPDF_TTFontDef_GetCharWidth@Base 2.1.0+dfsg HPDF_TTFontDef_GetGidWidth@Base 2.1.0+dfsg HPDF_TTFontDef_GetGlyphid@Base 2.1.0+dfsg HPDF_TTFontDef_Load2@Base 2.1.0+dfsg HPDF_TTFontDef_Load@Base 2.1.0+dfsg HPDF_TTFontDef_New@Base 2.1.0+dfsg HPDF_TTFontDef_SaveFontData@Base 2.1.0+dfsg HPDF_TTFontDef_SetTagName@Base 2.1.0+dfsg HPDF_TTFont_New@Base 2.1.0+dfsg HPDF_TextAnnot_New@Base 2.1.0+dfsg HPDF_TextAnnot_SetIcon@Base 2.1.0+dfsg HPDF_TextAnnot_SetOpened@Base 2.1.0+dfsg HPDF_ToBox@Base 2.1.0+dfsg HPDF_ToPoint@Base 2.1.0+dfsg HPDF_ToRect@Base 2.1.0+dfsg HPDF_Type0Font_New@Base 2.1.0+dfsg HPDF_Type1FontDef_Duplicate@Base 2.1.0+dfsg HPDF_Type1FontDef_GetWidth@Base 2.1.0+dfsg HPDF_Type1FontDef_GetWidthByName@Base 2.1.0+dfsg HPDF_Type1FontDef_Load@Base 2.1.0+dfsg HPDF_Type1FontDef_New@Base 2.1.0+dfsg HPDF_Type1FontDef_SetWidths@Base 2.1.0+dfsg HPDF_Type1Font_New@Base 2.1.0+dfsg HPDF_U3D_Add3DView@Base 2.1.0+dfsg HPDF_U3D_LoadU3D@Base 2.1.0+dfsg HPDF_U3D_LoadU3DFromMem@Base 2.1.0+dfsg HPDF_U3D_SetDefault3DView@Base 2.1.0+dfsg HPDF_UInt16Swap@Base 2.1.0+dfsg HPDF_URILinkAnnot_New@Base 2.1.0+dfsg HPDF_UnicodeToGryphName@Base 2.1.0+dfsg HPDF_UseCNSEncodings@Base 2.1.0+dfsg HPDF_UseCNSFonts@Base 2.1.0+dfsg HPDF_UseCNTEncodings@Base 2.1.0+dfsg HPDF_UseCNTFonts@Base 2.1.0+dfsg HPDF_UseJPEncodings@Base 2.1.0+dfsg HPDF_UseJPFonts@Base 2.1.0+dfsg HPDF_UseKREncodings@Base 2.1.0+dfsg HPDF_UseKRFonts@Base 2.1.0+dfsg HPDF_Xref_Add@Base 2.1.0+dfsg HPDF_Xref_Free@Base 2.1.0+dfsg HPDF_Xref_GetEntry@Base 2.1.0+dfsg HPDF_Xref_GetEntryByObjectId@Base 2.1.0+dfsg HPDF_Xref_New@Base 2.1.0+dfsg HPDF_Xref_WriteToStream@Base 2.1.0+dfsg