Annotation of researchv10no/cmd/post.src/dpost/font.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  *
                      3:  * Characteristics of a font - for postprocessors. Differs some from the troff
                      4:  * version.
                      5:  *
                      6:  */
                      7: 
                      8: #define ALPHABET       256             /* characters in basic alphabet */
                      9: #define MAXCH          512
                     10: #define MAXFONTS       99
                     11: 
                     12: /*
                     13:  *
                     14:  * State of a table entry in fonts[].
                     15:  *
                     16:  */
                     17: 
                     18: #define NEWFONT                0
                     19: #define RELEASED       1
                     20: #define INMEMORY       2
                     21: 
                     22: /*
                     23:  *
                     24:  * Flags - for setting bits in a font's flag field.
                     25:  *
                     26:  */
                     27: 
                     28: #define USED           1
                     29: #define NAMED          2
                     30: 
                     31: #define skipline(f)    while ( getc(f) != '\n' )
                     32: 
                     33: /*
                     34:  *
                     35:  * Data about each character on a font. Omitted the ascender/descender field.
                     36:  * An unsigned char is good enough for the code field on PostScript printers.
                     37:  *
                     38:  */
                     39: 
                     40: typedef struct {
                     41:        short           num;    /* 0 means not on this font */
                     42:        unsigned char   wid;    /* width */
                     43:        unsigned char   code;   /* code for actual device. */
                     44: } Chwid;
                     45: 
                     46: /*
                     47:  *
                     48:  * Font header - one for each available position.
                     49:  *
                     50:  */
                     51: 
                     52: typedef struct {
                     53:        char    *path;          /* where it came from */
                     54:        char    *name;          /* as known to troff */
                     55:        char    *fontname;      /* real name (e.g. Times-Roman) */
                     56:        char    state;          /* NEWFONT, RELEASED, or INMEMORY */
                     57:        char    flags;          /* for now just USED and NAMED */
                     58:        char    mounted;        /* mounted on this many positions */
                     59:        char    specfont;       /* 1 == special font */
                     60:        short   nchars;         /* number of width entries for this font */
                     61:        Chwid   *wp;            /* widths, etc., of the real characters */
                     62: } Font;
                     63: 
                     64: /*
                     65:  *
                     66:  * Non-integer functions.
                     67:  *
                     68:  */
                     69: 
                     70: extern char    *chname();
                     71: extern char    *strsave();
                     72: extern char    *allocate();
                     73: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.