diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-11-08 16:53:46 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-11-08 16:53:46 +0000 |
commit | 8b70788fa0333ae44b46195dd78f8614438443c9 (patch) | |
tree | 467400baaaeaf8b4ffffc650c4414c208ab11ac4 /Build/source/texk/ttfdump/libttf/vhea.c | |
parent | 35d16fdfd460a826228374bc74b0d68c7923e112 (diff) |
ttfdump: Major update (see ChangeLog for details)
git-svn-id: svn://tug.org/texlive/trunk@24546 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ttfdump/libttf/vhea.c')
-rw-r--r-- | Build/source/texk/ttfdump/libttf/vhea.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/Build/source/texk/ttfdump/libttf/vhea.c b/Build/source/texk/ttfdump/libttf/vhea.c index e00c4f2268f..374c2c1bef7 100644 --- a/Build/source/texk/ttfdump/libttf/vhea.c +++ b/Build/source/texk/ttfdump/libttf/vhea.c @@ -7,48 +7,27 @@ #include "ttf.h" #include "ttfutil.h" -#ifdef MEMCHECK -#include <dmalloc.h> -#endif - /* $Id: vhea.c,v 1.1.1.1 1998/06/05 07:47:52 robert Exp $ */ -#ifndef lint -static char vcid[] = "$Id: vhea.c,v 1.1.1.1 1998/06/05 07:47:52 robert Exp $"; -#endif /* lint */ - - -static VHEAPtr ttfAllocVHEA(TTFontPtr font); static void ttfLoadVHEA(FILE *fp,VHEAPtr vhea,ULONG offset); void ttfInitVHEA(TTFontPtr font) { - ULONG tag = 'v' | 'h' << 8 | 'e' << 16 | 'a' << 24; + ULONG tag = FT_MAKE_TAG ('v', 'h', 'e', 'a'); TableDirPtr ptd; if ((ptd = ttfLookUpTableDir(tag,font)) != NULL) { - font->vhea = ttfAllocVHEA(font); + font->vhea = XCALLOC1 (VHEA); ttfLoadVHEA(font->fp,font->vhea,ptd->offset); } } -static VHEAPtr ttfAllocVHEA(TTFontPtr font) -{ - VHEAPtr vhea; - - if ((vhea = (VHEAPtr) calloc(1,sizeof(VHEA))) == NULL) - { - ttfError("Out of Memory in __FILE__:__LINE__\n"); - return NULL; - } - return vhea; -} + static void ttfLoadVHEA (FILE *fp,VHEAPtr vhea,ULONG offset) { int i; - if (fseek(fp,offset,SEEK_SET) != 0) - ttfError("Fseek Failed in ttfLoadVHEA \n"); + xfseek(fp, offset, SEEK_SET, "ttfLoadVHEA"); vhea->version = ttfGetFixed(fp); vhea->ascent = ttfGetSHORT(fp); |