Annotation of researchv10no/cmd/post.src/postdaisy/postdaisy.h, revision 1.1

1.1     ! root        1: /*
        !             2:  *
        !             3:  * Definitions used by the PostScript translator for Diablo 1640 files.
        !             4:  *
        !             5:  * Diablo printers have horizontal and vertical resolutions of 120 and 48 dpi.
        !             6:  * We'll use a single resolution of 240 dpi and let the program scale horizontal
        !             7:  * and vertical positions by HSCALE and VSCALE.
        !             8:  *
        !             9:  */
        !            10: 
        !            11: #define RES            240
        !            12: #define HSCALE         2
        !            13: #define VSCALE         5
        !            14: 
        !            15: /*
        !            16:  *
        !            17:  * HMI is the default character spacing and VMI is the line spacing. Both values
        !            18:  * are in terms of the 240 dpi resolution.
        !            19:  *
        !            20:  */
        !            21: 
        !            22: #define HMI            (12 * HSCALE)
        !            23: #define VMI            (8 * VSCALE)
        !            24: 
        !            25: /*
        !            26:  *
        !            27:  * Paper dimensions don't seem to be all that important. They're just used to
        !            28:  * set the right and bottom margins. Both are given in terms of the 240 dpi
        !            29:  * resolution.
        !            30:  *
        !            31:  */
        !            32: 
        !            33: #define LEFTMARGIN     0
        !            34: #define RIGHTMARGIN    3168
        !            35: #define TOPMARGIN      0
        !            36: #define BOTTOMMARGIN   2640
        !            37: 
        !            38: /*
        !            39:  *
        !            40:  * ROWS and COLUMNS set the dimensions of the horizontal and vertical tab arrays.
        !            41:  * The way I've implemented both kinds of tabs leaves something to be desired, but
        !            42:  * it was simple and should be good enough for now. If arrays are going to be used
        !            43:  * to mark tab stops I probably should use malloc() to get enough space once the
        !            44:  * initial hmi and vmi are know.
        !            45:  *
        !            46:  */
        !            47: 
        !            48: #define ROWS           400
        !            49: #define COLUMNS                200
        !            50: 
        !            51: /*
        !            52:  *
        !            53:  * An array of type Fontmap helps convert font names requested by users into
        !            54:  * legitimate PostScript names. The array is initialized using FONTMAP, which must
        !            55:  * end with an entry that has NULL defined as its name field.
        !            56:  *
        !            57:  */
        !            58: 
        !            59: typedef struct {
        !            60:        char    *name;                  /* user's font name */
        !            61:        char    *val;                   /* corresponding PostScript name */
        !            62: } Fontmap;
        !            63: 
        !            64: #define FONTMAP                                                                \
        !            65:                                                                        \
        !            66:        {                                                               \
        !            67:            "R", "Courier",                                             \
        !            68:            "I", "Courier-Oblique",                                     \
        !            69:            "B", "Courier-Bold",                                        \
        !            70:            "CO", "Courier",                                            \
        !            71:            "CI", "Courier-Oblique",                                    \
        !            72:            "CB", "Courier-Bold",                                       \
        !            73:            "CW", "Courier",                                            \
        !            74:            "PO", "Courier",                                            \
        !            75:            "courier", "Courier",                                       \
        !            76:            "cour", "Courier",                                          \
        !            77:            "co", "Courier",                                            \
        !            78:            NULL, NULL                                                  \
        !            79:        }
        !            80: 
        !            81: /*
        !            82:  *
        !            83:  * Some of the non-integer functions in postdaisy.c.
        !            84:  *
        !            85:  */
        !            86: 
        !            87: char   *get_font();
        !            88: 

unix.superglobalmegacorp.com

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