summaryrefslogtreecommitdiff
path: root/Build/source/texk/ttfdump/libttf/ttfutil.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-12-01 13:24:38 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-12-01 13:24:38 +0000
commit3131715fb5bce44da6c7584315237731aa752eba (patch)
treeb4e748ed3b19d603c4ac1b29f33340c196003e0e /Build/source/texk/ttfdump/libttf/ttfutil.c
parent9417d53067c450b541cecd8c3ae224e5d17b8e54 (diff)
ttfdump: Added functionality
- do not segfault for fonts without loca table - allow cmap subtables with format 8, 10, 12, and 13 - handle GPOS and GSUB tables - additional tests git-svn-id: svn://tug.org/texlive/trunk@24713 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ttfdump/libttf/ttfutil.c')
-rw-r--r--Build/source/texk/ttfdump/libttf/ttfutil.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/Build/source/texk/ttfdump/libttf/ttfutil.c b/Build/source/texk/ttfdump/libttf/ttfutil.c
index 96a1bd3eb53..a31478002a5 100644
--- a/Build/source/texk/ttfdump/libttf/ttfutil.c
+++ b/Build/source/texk/ttfdump/libttf/ttfutil.c
@@ -32,12 +32,22 @@ void ttfError(const char * msg)
}
/* Functions copied or adapted from kpathsea. */
+long
+xftell (FILE *fp, const char *funcname)
+{
+ long where = ftell (fp);
+
+ if (where < 0)
+ FATAL_PERROR(funcname);
+
+ return where;
+}
+
void
xfseek (FILE *f, long offset, int wherefrom, const char *funcname)
{
- if (fseek (f, offset, wherefrom) < 0) {
+ if (fseek (f, offset, wherefrom) < 0)
FATAL_PERROR(funcname);
- }
}
void *
@@ -55,7 +65,7 @@ xmalloc (size_t size)
}
void *
-xcalloc (size_t nelem, size_t elsize)
+xcalloc (size_t nelem, size_t elsize)
{
void *new_mem = (void*)calloc(nelem ? nelem : 1, elsize ? elsize : 1);