summaryrefslogtreecommitdiff
path: root/Build/source/texk/ttfdump/libttf/prep.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-11-08 16:53:46 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-11-08 16:53:46 +0000
commit8b70788fa0333ae44b46195dd78f8614438443c9 (patch)
tree467400baaaeaf8b4ffffc650c4414c208ab11ac4 /Build/source/texk/ttfdump/libttf/prep.c
parent35d16fdfd460a826228374bc74b0d68c7923e112 (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/prep.c')
-rw-r--r--Build/source/texk/ttfdump/libttf/prep.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/Build/source/texk/ttfdump/libttf/prep.c b/Build/source/texk/ttfdump/libttf/prep.c
index 55d674b7521..03a123ea044 100644
--- a/Build/source/texk/ttfdump/libttf/prep.c
+++ b/Build/source/texk/ttfdump/libttf/prep.c
@@ -7,35 +7,26 @@
#include "ttf.h"
#include "ttfutil.h"
-#ifdef MEMCHECK
-#include <dmalloc.h>
-#endif
-
/* $Id: prep.c,v 1.1.1.1 1998/06/05 07:47:52 robert Exp $ */
-#ifndef lint
-static char vcid[] = "$Id: prep.c,v 1.1.1.1 1998/06/05 07:47:52 robert Exp $";
-#endif /* lint */
static void ttfLoadPREP(FILE *fp,BYTE *prep,USHORT lenght,ULONG offset);
void ttfInitPREP(TTFontPtr font)
{
- ULONG tag = 'p' | 'r' << 8 | 'e' << 16 | 'p' << 24;
+ ULONG tag = FT_MAKE_TAG ('p', 'r', 'e', 'p');
TableDirPtr ptd;
if ((ptd = ttfLookUpTableDir(tag,font)) != NULL)
{
font->prepLength = ptd->length;
- font->prep = (BYTE *) calloc(font->prepLength, sizeof(BYTE));
- if (font->prep != NULL)
- ttfLoadPREP(font->fp,font->prep,font->prepLength,ptd->offset);
+ font->prep = XCALLOC (font->prepLength, BYTE);
+ ttfLoadPREP(font->fp,font->prep,font->prepLength,ptd->offset);
}
}
static void ttfLoadPREP(FILE *fp,BYTE *prep,USHORT length,ULONG offset)
{
- if (fseek(fp,offset,SEEK_SET) != 0)
- ttfError("Fseek Failed in ttfLoadPREP \n");
+ xfseek(fp, offset, SEEK_SET, "ttfLoadPREP");
if (fread(prep, sizeof(BYTE), length, fp) != length)
ttfError("Error when getting PREP\n");