diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-04-27 13:11:55 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-04-27 13:11:55 +0000 |
commit | 4cff2654a7dd5b9f1ca98699cc75d6c8b8c763a8 (patch) | |
tree | 8c522514a54dfa93a30d29a94cd2c667c38d078f /Build/source/texk/xdvipdfmx/src | |
parent | cf5698840040d0111b1ebba692bc58093a39d7eb (diff) |
(x)dvipdfmx: Reduce differences between these two
git-svn-id: svn://tug.org/texlive/trunk@26149 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src')
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/cid.c | 22 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/cid.h | 4 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/cidtype0.c | 4 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/cidtype2.c | 3 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/mem.c | 17 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/mem.h | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/truetype.c | 6 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/tt_cmap.c | 7 |
8 files changed, 40 insertions, 25 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/cid.c b/Build/source/texk/xdvipdfmx/src/cid.c index 3fea81f0be6..59a4ca40707 100644 --- a/Build/source/texk/xdvipdfmx/src/cid.c +++ b/Build/source/texk/xdvipdfmx/src/cid.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/cid.c,v 1.31 2008/05/17 04:18:47 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/cid.c,v 1.34 2011/03/06 03:14:13 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -59,16 +59,18 @@ static struct { const char *registry; const char *ordering; - /* Heighest Supplement values supported by PDF-1.0, 1.1, ... */ + /* Heighest Supplement values supported by PDF-1.0, 1.1, ...; see + * also http://partners.adobe.com/public/developer/font/index.html#ckf + */ int supplement[16]; } CIDFont_stdcc_def[] = { - {"Adobe", "UCS", {-1, -1, 0, 0, 0, 0, 0}}, - {"Adobe", "GB1", {-1, -1, 0, 2, 4, 4, 4}}, - {"Adobe", "CNS1", {-1, -1, 0, 0, 3, 4, 4}}, - {"Adobe", "Japan1", {-1, -1, 2, 2, 4, 5, 6}}, - {"Adobe", "Korea1", {-1, -1, 1, 1, 2, 2, 2}}, - {"Adobe", "Identity", {-1, -1, 0, 0, 0, 0, 0}}, - {NULL, NULL, {0,0,0,0,0,0,0}} + {"Adobe", "UCS", {-1, -1, 0, 0, 0, 0, 0, 0}}, + {"Adobe", "GB1", {-1, -1, 0, 2, 4, 4, 4, 4}}, + {"Adobe", "CNS1", {-1, -1, 0, 0, 3, 4, 4, 4}}, + {"Adobe", "Japan1", {-1, -1, 2, 2, 4, 5, 6, 6}}, + {"Adobe", "Korea1", {-1, -1, 1, 1, 2, 2, 2, 2}}, + {"Adobe", "Identity", {-1, -1, 0, 0, 0, 0, 0, 0}}, + {NULL, NULL, { 0, 0, 0, 0, 0, 0, 0, 0}} }; #define UCS_CC 0 #define ACC_START 1 @@ -113,11 +115,13 @@ CIDFont_set_verbose (void) __verbose++; } +#if 0 int CIDFont_require_version (void) { return PDF_CID_SUPPORT_MIN; } +#endif CIDFont * CIDFont_new (void) diff --git a/Build/source/texk/xdvipdfmx/src/cid.h b/Build/source/texk/xdvipdfmx/src/cid.h index 97b846e6f4f..cfdff86a883 100644 --- a/Build/source/texk/xdvipdfmx/src/cid.h +++ b/Build/source/texk/xdvipdfmx/src/cid.h @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/cid.h,v 1.13 2004/09/02 12:23:06 hirata Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/cid.h,v 1.14 2008/11/30 21:12:27 matthias Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -44,7 +44,9 @@ extern CIDSysInfo CSI_UNICODE; typedef struct CIDFont CIDFont; extern void CIDFont_set_verbose (void); +#if 0 extern int CIDFont_require_version (void); +#endif extern void CIDFont_set_flags (long flags); #define CIDFONT_FORCE_FIXEDPITCH (1 << 1) diff --git a/Build/source/texk/xdvipdfmx/src/cidtype0.c b/Build/source/texk/xdvipdfmx/src/cidtype0.c index 3f5cd1a90d2..f0b2be75664 100644 --- a/Build/source/texk/xdvipdfmx/src/cidtype0.c +++ b/Build/source/texk/xdvipdfmx/src/cidtype0.c @@ -1,8 +1,8 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/cidtype0.c,v 1.39 2008/10/13 19:42:48 matthias Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/cidtype0.c,v 1.40 2011/03/06 03:14:13 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team <dvipdfmx@project.ktug.or.kr> This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/xdvipdfmx/src/cidtype2.c b/Build/source/texk/xdvipdfmx/src/cidtype2.c index 7d3df254c59..8ff1bea2dfd 100644 --- a/Build/source/texk/xdvipdfmx/src/cidtype2.c +++ b/Build/source/texk/xdvipdfmx/src/cidtype2.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/cidtype2.c,v 1.36 2008/05/17 04:18:47 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/cidtype2.c,v 1.38 2011/03/06 03:14:13 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -548,6 +548,7 @@ CIDFont_type2_dofont (CIDFont *font) sfont = sfnt_open(fp); } #endif + if (!sfont) { ERROR("Could not open TTF file: %s", font->ident); } diff --git a/Build/source/texk/xdvipdfmx/src/mem.c b/Build/source/texk/xdvipdfmx/src/mem.c index 0e1ebeea227..b0f02309b0b 100644 --- a/Build/source/texk/xdvipdfmx/src/mem.c +++ b/Build/source/texk/xdvipdfmx/src/mem.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/mem.c,v 1.5 2007/11/17 18:08:58 matthias Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/mem.c,v 1.8 2009/09/18 23:56:02 matthias Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -171,10 +171,15 @@ void *new (size_t size) void *renew (void *mem, size_t size) { - void *result = realloc (mem, size); - if (!result) { - ERROR("Out of memory - asked for %lu bytes\n", (unsigned long) size); + if (size) { + void *result = realloc (mem, size); + if (!result) { + ERROR("Out of memory - asked for %lu bytes\n", (unsigned long) size); + } + return result; + } else { + /* realloc may not return NULL if size == 0 */ + free(mem); + return NULL; } - - return result; } diff --git a/Build/source/texk/xdvipdfmx/src/mem.h b/Build/source/texk/xdvipdfmx/src/mem.h index a4d76f8746a..852a011e168 100644 --- a/Build/source/texk/xdvipdfmx/src/mem.h +++ b/Build/source/texk/xdvipdfmx/src/mem.h @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/mem.h,v 1.5 2007/11/17 18:08:58 matthias Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/mem.h,v 1.6 2009/11/29 01:18:20 matthias Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. diff --git a/Build/source/texk/xdvipdfmx/src/truetype.c b/Build/source/texk/xdvipdfmx/src/truetype.c index 15bde765995..ffbe747d62e 100644 --- a/Build/source/texk/xdvipdfmx/src/truetype.c +++ b/Build/source/texk/xdvipdfmx/src/truetype.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/truetype.c,v 1.11 2009/08/28 00:26:17 matthias Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/truetype.c,v 1.12 2011/03/06 03:14:15 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -92,6 +92,7 @@ pdf_font_open_truetype (pdf_font *font) sfont = sfnt_open(fp); } #endif + if (!sfont) { WARN("Could not open TrueType font: %s", ident); if (fp) @@ -886,7 +887,7 @@ pdf_font_load_truetype (pdf_font *font) #ifdef ENABLE_NOEMBED int embedding = pdf_font_get_flag(font, PDF_FONT_FLAG_NOEMBED) ? 0 : 1; #endif /* ENABLE_NOEMBED */ - int index = pdf_font_get_index(font); + int index = pdf_font_get_index(font); char **enc_vec; pdf_obj *fontfile; FILE *fp = NULL; @@ -909,6 +910,7 @@ pdf_font_load_truetype (pdf_font *font) sfont = sfnt_open(fp); } #endif + if (!sfont) { ERROR("Unable to open TrueType/dfont file: %s", ident); if (fp) diff --git a/Build/source/texk/xdvipdfmx/src/tt_cmap.c b/Build/source/texk/xdvipdfmx/src/tt_cmap.c index 0a5890d583a..363f9fe65f1 100644 --- a/Build/source/texk/xdvipdfmx/src/tt_cmap.c +++ b/Build/source/texk/xdvipdfmx/src/tt_cmap.c @@ -1,8 +1,8 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/tt_cmap.c,v 1.26 2008/05/08 18:51:59 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/tt_cmap.c,v 1.27 2009/09/18 23:56:02 matthias Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team <dvipdfmx@project.ktug.or.kr> This program is free software; you can redistribute it and/or modify @@ -1685,9 +1685,10 @@ fprintf(stderr, "otf_load_Unicode_CMap(%s, %d)\n", map_name, ttc_index); if (!fp) return -1; sfont = dfont_open(fp, ttc_index); } else { - sfont = sfnt_open(fp, -1); + sfont = sfnt_open(fp); } #endif + if (!sfont) { ERROR("Could not open OpenType/TrueType/dfont font file \"%s\"", map_name); } |