]> git.donarmstrong.com Git - lilypond.git/blobdiff - ttftool/include/proto.h
* configure.in (reloc_b): remove TTFTOOL_ENDIAN
[lilypond.git] / ttftool / include / proto.h
index 83d5f7a3ca3a60bd438e374450ac56a79d83c89f..604c91995b7a102f8dffdb87c10e6cf556697bcb 100644 (file)
@@ -1,28 +1,29 @@
 /* Copyright (c) 1997-1998 by Juliusz Chroboczek */
 
-extern int verbosity;
-
-struct TableDirectoryEntry *readDirectory (int fd, struct OffsetTable *ot);
-char **readNamingTable (int fd);
-void readHeadTable (int fd, struct HeadTable *ht);
-int readPostTable (int fd, int nglyphs,
-                  struct PostTable *pt, struct GlyphName **gnt);
-int readMaxpTable (int fd);
-void *readLocaTable (int fd, int nglyphs, int format);
-struct Box *readGlyfTable (int fd, int nglyphs, int format, void *loca);
-longHorMetric *readHmtxTable (int fd, int nummetrics);
-struct HheaTable *readHheaTable (int fd);
-int readKernTable (int fd, int **nke, struct KernEntry0 ***ke);
+struct TableDirectoryEntry *readDirectory (FILE *fd, struct OffsetTable *ot);
+char **readNamingTable (FILE *fd);
+void readHeadTable (FILE *fd, struct HeadTable *ht);
+int readPostTable (FILE *fd, int root_nglyphs,
+                  struct PostTable *pt, USHORT *nglyphs,
+                  struct GlyphName **gnt);
+int readMaxpTable (FILE *fd);
+void *readLocaTable (FILE *fd, int nglyphs, int format);
+struct Box *readGlyfTable (FILE *fd, int nglyphs, int format, void *loca);
+longHorMetric *readHmtxTable (FILE *fd, int nummetrics);
+struct HheaTable *readHheaTable (FILE *fd);
+int readKernTable (FILE *fd, int **nke, struct KernEntry0 ***ke);
 
 void printPSFont (void * out, struct HeadTable *ht,
                  char **strings, int nglyphs, int postType,
-                 struct PostTable *pt, struct GlyphName *gnt, int fd);
+                 struct PostTable *pt,
+                 USHORT png,
+                 struct GlyphName *gnt, FILE *fd);
 
 void printPSHeader (void * out, struct HeadTable *ht,
                    char **strings, struct PostTable *pt);
-void printPSData (void * out, int fd);
+void printPSData (void * out, FILE *fd);
 void printPSTrailer (void * out, int nglyphs,
-                    int postType, struct GlyphName *gnt);
+                    int postType, USHORT pnt, struct GlyphName *gnt);
 
 void printAFM (FILE * afm, struct HeadTable *ht,
               char **strings, int nglyphs, int postType,
@@ -52,11 +53,19 @@ void *mycalloc (size_t nelem, size_t elsize);
 void *myrealloc (void *ptr, size_t size);
 void ttf_error (char *string);
 void syserror (char *string);
-ssize_t surely_read (int fildes, void *buf, size_t nbyte);
+ssize_t surely_read (FILE *fildes, void *buf, size_t nbyte);
 char *unistrncpy (char *dst, char *str, size_t length);
 void fputpss (char *s, void * stream);
-off_t surely_lseek (int fildes, off_t offset, int whence);
+void surely_lseek (FILE *fildes, off_t offset, int whence);
 unsigned hash (char *string);
 struct hashtable *make_hashtable (int size);
 int puthash (struct hashtable *t, char *key, int value);
 int gethash (struct hashtable *t, char *key);
+
+#ifdef TEST_TTFTOOL
+#define lily_cookie_fclose fclose
+#define lily_cookie_fprintf fprintf
+#define lily_cookie_putc fputc
+#else
+#include "file-cookie.hh"
+#endif