Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members  

t1lib.h

Go to the documentation of this file.
00001 /*  $Id: t1lib.h,v 1.4 2000/11/30 04:03:13 dbryson Exp $ */
00002 
00006 #ifndef T1LIB_H
00007 #define T1LIB_H
00008 
00009 #ifdef __cplusplus
00010 extern "C" {
00011 #endif
00012 
00013 #define PFB_MARKER      128
00014 #define PFB_ASCII       1
00015 #define PFB_BINARY      2
00016 #define PFB_DONE        3
00017 
00018 /*
00019 **  This next structure is called a "font_reader" in the original source code
00020 **  but this doesn't make any sense (they are all OUTPUT functions!) so I 
00021 **  have renamed it to "font_writer".  Derry Bryson <derry@techass.com>
00022 */
00023 struct font_writer 
00024 {
00025   void (*output_ascii)(PSStream* fio, char* data);
00026   void (*output_binary)(PSStream* fio, unsigned char *data, int len);
00027   void (*output_end)(PSStream* fio);
00028 };
00029 
00030 int process_pfa(PSStream* in, struct font_writer* fw, PSStream* out);
00031 int process_pfb(PSStream* in, struct font_writer* fw, PSStream* out);
00032 
00033 struct pfb_writer {
00034   unsigned char *buf;
00035   unsigned len;
00036   unsigned max_len;
00037   unsigned pos;
00038   int blocktyp;
00039   int binary_blocks_written;
00040   PSStream *fio;
00041 };
00042 
00043 int init_pfb_writer(struct pfb_writer *, int, PSStream* fio);
00044 void pfb_writer_output_block(struct pfb_writer *);
00045 void pfb_writer_grow_buf(struct pfb_writer *);
00046 void pfb_writer_end(struct pfb_writer *);
00047 #define PFB_OUTPUT_BYTE(w, b)   do { \
00048         if ((w)->pos >= (w)->len) pfb_writer_grow_buf(w); \
00049         (w)->buf[(w)->pos++] = (b); \
00050       } while (0)
00051 
00052 int crcbuf(int crc, unsigned int len, unsigned char *buf);
00053 int hqx_crcbuf(int crc, unsigned int len, unsigned char *buf);
00054 
00055 #if 0
00056 /* whoever uses this code must provide a definition for these functions */
00057 extern void error(const char *, ...);
00058 extern void fatal_error(const char *, ...);
00059 #endif
00060 
00061 #ifdef __cplusplus
00062 }
00063 #endif
00064 
00065 #endif

Generated at Mon Dec 11 22:46:28 2000 for Postscript Utility Library by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000