Annotation of researchv10no/cmd/dimpress/dimpress.h, revision 1.1

1.1     ! root        1: 
        !             2: /*
        !             3:  *
        !             4:  * Some definitions used by the troff post-processor dimpress. The stuff at
        !             5:  * the beginning of the file is rather general and you probably won't have
        !             6:  * to change any of it. The printer dependent stuff can all be found at the
        !             7:  * end of the file.
        !             8:  *
        !             9:  */
        !            10: 
        !            11: 
        !            12: #define NFONT          60              /* max number of font positions */
        !            13: 
        !            14: 
        !            15: /*
        !            16:  *
        !            17:  * These guys are used set the program exit status. If everything we're
        !            18:  * supposed to do gets finished the exit status will eventually be set to
        !            19:  * zero.
        !            20:  *
        !            21:  */
        !            22: 
        !            23: 
        !            24: #define DO_ACCT                1               /* still want to do job accounting */
        !            25: #define FILE_STARTED   2               /* started file but didn't finish yet */
        !            26: #define NO_ACCTFILE    8               /* couldn't open the accounting file */
        !            27: 
        !            28: 
        !            29: /*
        !            30:  *
        !            31:  * Landscape mode has been added to the post-processor. It's set using the
        !            32:  * -l option.
        !            33:  *
        !            34:  */
        !            35: 
        !            36: 
        !            37: #define PORTRAIT       0
        !            38: #define LANDSCAPE      1
        !            39: 
        !            40: 
        !            41: /*
        !            42:  *
        !            43:  * SLOP controls how much horizontal positioning error we'll accept. It's
        !            44:  * used when we're printing glyphs to check if the troff and the printer
        !            45:  * have gotten too far out of sync.
        !            46:  *
        !            47:  */
        !            48: 
        !            49: 
        !            50: #define SLOP           1               /* not acccepting much error */
        !            51: 
        !            52: 
        !            53: /*
        !            54:  *
        !            55:  * I've written the post-processor so it can handle raster files in both
        !            56:  * the old format and in Imagen's Rst format. Obviously different routines
        !            57:  * need to be called depending which style we're using. These definitions
        !            58:  * are used in dimpress.c to figure out which routines to call.
        !            59:  *
        !            60:  */
        !            61: 
        !            62: 
        !            63: #define OLD_FORMAT     0
        !            64: #define RST_FORMAT     1
        !            65: 
        !            66: 
        !            67: /*
        !            68:  *
        !            69:  * The raster files in the old format (not Imagen's) weren't portable and
        !            70:  * neither was much of the code used to read them. CONVINT() is a macro
        !            71:  * that we found was needed on 3b's, but only when we were using the old
        !            72:  * files.
        !            73:  *
        !            74:  */
        !            75: 
        !            76: 
        !            77: #ifdef u3b
        !            78: #define CONVINT(C)     convint(C)
        !            79: #else
        !            80: #define CONVINT(C)     C
        !            81: #endif
        !            82: 
        !            83: 
        !            84: /*
        !            85:  *
        !            86:  * The rest of the stuff in this file deals with the different printers
        !            87:  * directly supported by the post-processor.
        !            88:  *
        !            89:  * There really are only five or six variables in the post-processor that
        !            90:  * are printer dependent. They include prname, pres, xoff, yoff, penwidth,
        !            91:  * and possibly bitdir.
        !            92:  *
        !            93:  * This structure keeps track of the printer dependent values. An array
        !            94:  * of Prdata is defined in dimpress.c and initialized using PR_INIT below.
        !            95:  * The values of the corresponding program variables are set in initialize()
        !            96:  * after the options are read.
        !            97:  *
        !            98:  */
        !            99: 
        !           100: 
        !           101: typedef struct  {
        !           102: 
        !           103:     char       *prname;                /* name of the printer - *realdev */
        !           104:     int                pres;                   /* resolution of the printer */
        !           105:     float      xoff;                   /* reasonable values for the offsets */
        !           106:     float      yoff;                   /* in inches */
        !           107:     int                penwidth;               /* decent looking pen diameter */
        !           108:     char       *bitdir;                /* raster table directory */
        !           109: 
        !           110: } Prdata;
        !           111: 
        !           112: 
        !           113: /*
        !           114:  *
        !           115:  * PR_INIT is used in dimpress.c to initialize the Prdata array. Its data
        !           116:  * is given next. The list of printers must be terminated by an entry with
        !           117:  * the prname field set to NULL.
        !           118:  *
        !           119:  */
        !           120: 
        !           121: 
        !           122: #define PR_INIT                                                                \
        !           123:                                                                        \
        !           124:        {                                                               \
        !           125:            { "im300", 300, .20, 0.0, 3, BITDIR },                      \
        !           126:            { "i300", 300, .20, 0.0, 3, BITDIR },                       \
        !           127:            { "i240", 240, .41, 0.0, 2, BITDIR },                       \
        !           128:            { "i480", 480, .41, 0.0, 4, BITDIR },                       \
        !           129:            { "i10", 240, .41, 0.0, 2, OLDBITDIR },                     \
        !           130:            { "a490", 300, .10, 0.0, 3, BITDIR },                       \
        !           131:            { NULL, 0, 0, 0, 0, NULL }                                  \
        !           132:        }
        !           133: 
        !           134: 
        !           135: /*
        !           136:  *
        !           137:  * This guy is used to initialize pr_num in dimpress.c. It will be the 'line'
        !           138:  * PR_INIT (actually the index in prdata[]) that will be used as the default
        !           139:  * printer.
        !           140:  *
        !           141:  */
        !           142: 
        !           143: 
        !           144: #define PR_NUM         0
        !           145: 
        !           146: 
        !           147: /*
        !           148:  *
        !           149:  * Printer emulation, especially for the APS-5, is important at Murray Hill
        !           150:  * and our users expect we'll do the best we can in showing font and size
        !           151:  * changes. The next typedef is used to help us map troff fonts for other
        !           152:  * devices into what's available on Postscript printers.
        !           153:  *
        !           154:  */
        !           155: 
        !           156: 
        !           157: typedef struct {
        !           158: 
        !           159:        char    *name;                  /* font name we're looking for */
        !           160:        char    *use;                   /* and this is what we should use */
        !           161: 
        !           162: } Fontmap;
        !           163: 
        !           164: 
        !           165: /*
        !           166:  *
        !           167:  * The next definition is used to initialize the default Fontmap array in dpost.
        !           168:  * It's not meant to include all the fonts available on every printer. It's
        !           169:  * just a reasonable default that you can override with special fontmap files
        !           170:  * for any device. In particular if file *fontdir/devpost/fontmaps/*devname
        !           171:  * exists, it's used instead of the deafult map defined here. The list must end
        !           172:  * with an entry that has NULL defined for the name field.
        !           173:  *
        !           174:  */
        !           175: 
        !           176: 
        !           177: #define        FONTMAP                                                         \
        !           178:                                                                        \
        !           179:        {                                                               \
        !           180:            "G", "H",                                                   \
        !           181:            "LO", "S",                                                  \
        !           182:            "S2", "S",                                                  \
        !           183:            "GI", "HI",                                                 \
        !           184:            "HM", "H",                                                  \
        !           185:            "HK", "H",                                                  \
        !           186:            "HL", "H",                                                  \
        !           187:            "PA", "R",                                                  \
        !           188:            "PI", "I",                                                  \
        !           189:            "PB", "B",                                                  \
        !           190:            "PX", "BI",                                                 \
        !           191:            NULL, NULL,                                                 \
        !           192:        }
        !           193: 
        !           194: 

unix.superglobalmegacorp.com

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