1: /* 2: * Interpress utilities 3: * 4: * Copyright (c) 1984, 1985 Xerox Corp. 5: * 6: * Written for Xerox Corporation by William LeFebvre 7: * 24-May-1984 8: * 9: */ 10: 11: /* This header appears at the front of every Interpress file */ 12: 13: # define IP_Header "Interpress/Xerox/1.0 " 14: 15: /* For convenience -- POINT is the size of a point in meters */ 16: # define POINT (0.00035278) 17: 18: /* 19: * Definitions pertaining to InterPress tokes: 20: */ 21: 22: # define SHORT_OP 0200 23: # define LONG_OP 0240 24: # define SHORT_INTEGER 0000 25: # define SHORT_SEQUENCE 0300 26: # define LONG_SEQUENCE 0340 27: 28: /* these help us cope with short integer tokens: */ 29: # define INTEGER_ZERO 4000 30: # define INTEGER_MAX (32767 - INTEGER_ZERO) 31: # define INTEGER_MIN (0 - INTEGER_ZERO) 32: 33: /* the long and short of sequences: */ 34: # define SHORT_SEQUENCE_LIMIT 255 /* (8 bits) */ 35: # define LONG_SEQUENCE_LIMIT 16777215 /* (24 bits) */ 36: 37: /* Sequence types: */ 38: # define sequenceAdaptivePixelVector 12 39: # define sequenceAPV sequenceAdaptivePixelVector 40: # define sequenceComment 6 41: # define sequenceCompressedPixelVector 10 42: # define sequenceCPV sequenceCompressedPixelVector 43: # define sequenceContinued 7 44: # define sequenceIdentifier 5 45: # define sequenceInsertFile 11 46: # define sequenceInteger 2 47: # define sequenceLargeVector 8 48: # define sequencePackedPixelVector 9 49: # define sequencePPV sequencePackedPixelVector 50: # define sequenceRational 4 51: # define sequenceString 1 52: 53: /* imager variables: */ 54: # define I_DCScpx 0 55: # define I_DCScpy 1 56: # define I_correctMX 2 57: # define I_correctMY 3 58: # define I_T 4 59: # define I_priorityImportant 5 60: # define I_mediumXSize 6 61: # define I_mediumYSize 7 62: # define I_fieldXMin 8 63: # define I_fieldYMin 9 64: # define I_fieldXMax 10 65: # define I_fieldYMax 11 66: # define I_showVec 12 67: # define I_color 13 68: # define I_noImage 14 69: # define I_strokeWidth 15 70: # define I_strokeEnd 16 71: # define I_underlineStart 17 72: # define I_amplifySpace 18 73: # define I_correctPass 19 74: # define I_correctShrink 20 75: # define I_correctTX 21 76: # define I_correctTY 22 77: 78: /* operation codes: */ 79: # define OP_nil 0 80: # define OP_nop 1 81: 82: # define OP_setxy 10 83: # define OP_setxyrel 11 84: # define OP_setxrel 12 85: # define OP_setyrel 13 86: # define OP_linetox 14 87: # define OP_linetoy 15 88: # define OP_space 16 89: # define OP_get 17 90: # define OP_iget 18 91: # define OP_iset 19 92: # define OP_fget 20 93: # define OP_fset 21 94: # define OP_show 22 95: # define OP_lineto 23 96: # define OP_maskstroke 24 97: # define OP_moveto 25 98: 99: # define SHORT_OP_LIMIT 31 100: 101: # define OP_metricMaster 100 102: # define OP_environmentMaster 101 103: # define OP_beginBlock 102 104: # define OP_endBlock 103 105: # define OP_noPages 104 106: # define OP_pageInstructions 105 107: # define OP_beginBody 106 108: # define OP_endBody 107 109: 110: # define OP_correct 110 111: 112: # define OP_makesimpleco 114 113: # define OP_makeco 115 114: # define OP_makecompiledimage 116 115: 116: # define OP_dosavesimplebody 120 117: # define OP_dobody 121 118: # define OP_dosavebody 122 119: # define OP_dosaveallbody 123 120: 121: # define OP_showandxrel 146 122: # define OP_findfont 147 123: # define OP_modifyfont 148 124: # define OP_finddecompressor 149 125: # define OP_findfontvec 150 126: # define OP_setfont 151 127: 128: # define OP_setcorrectmeasure 154 129: # define OP_setcorrecttollerance 155 130: # define OP_correctmask 156 131: # define OP_correctspace 157 132: 133: # define OP_getcp 159 134: # define OP_maket 160 135: # define OP_opent 161 136: # define OP_translate 162 137: # define OP_rotate 163 138: # define OP_scale 164 139: # define OP_concat 165 140: # define OP_scale2 166 141: # define OP_invert 167 142: # define OP_concatt 168 143: # define OP_move 169 144: # define OP_trans 170 145: 146: # define OP_transform 174 147: # define OP_transformvewc 175 148: # define OP_roundxy 176 149: # define OP_roundxyvec 177 150: 151: # define OP_pop 180 152: # define OP_dup 181 153: 154: # define OP_copy 183 155: # define OP_roll 184 156: # define OP_exch 185 157: # define OP_mark 186 158: # define OP_unmark 187 159: # define OP_count 188 160: 161: # define OP_unmark0 192 162: 163: # define OP_abs 200 164: # define OP_add 201 165: # define OP_and 202 166: # define OP_ceiling 203 167: # define OP_div 204 168: # define OP_eq 205 169: # define OP_floor 206 170: # define OP_ge 207 171: # define OP_gt 208 172: # define OP_mod 209 173: # define OP_mul 210 174: # define OP_neg 211 175: # define OP_not 212 176: # define OP_or 213 177: # define OP_sub 214 178: # define OP_trunc 215 179: # define OP_rem 216 180: # define OP_round 217 181: # define OP_eqn 218 182: 183: # define OP_type 220 184: # define OP_atan 221 185: # define OP_cos 222 186: # define OP_exp 223 187: # define OP_log 224 188: # define OP_sin 225 189: # define OP_sqrt 226 190: # define OP_max 227 191: # define OP_min 228 192: 193: # define OP_do 231 194: # define OP_dosave 232 195: # define OP_dosaveall 233 196: 197: # define OP_if 239 198: # define OP_ifcopy 240 199: # define OP_ifelse 241 200: # define OP_loop 242 201: 202: # define OP_frame 250 203: 204: # define OP_poolop 253 205: # define OP_pool 254 206: # define OP_pget 255 207: # define OP_pset 256 208: # define OP_makepool 257 209: # define OP_nopool 258 210: 211: # define OP_env 260 212: 213: # define OP_makeveclu 282 214: # define OP_makevec 283 215: 216: # define OP_shape 285 217: # define OP_openvec 286 218: 219: # define OP_getprop 287 220: # define OP_getp 288 221: # define OP_mergeprop 289 222: 223: # define OP_dround 300 224: # define OP_getcprounded 301 225: 226: # define OP_curveto 402 227: # define OP_arcto 403 228: # define OP_conicto 404 229: 230: # define OP_maskfill 409 231: # define OP_maskrectangle 410 232: # define OP_masktrapezoidx 411 233: # define OP_masktrapezoidy 412 234: # define OP_startunderline 413 235: # define OP_maskunderline 414 236: 237: # define OP_makeoutline 417 238: # define OP_clipoutline 418 239: # define OP_cliprectangle 419 240: 241: # define OP_findcoloroperator 421 242: # define OP_findcolormodeloperator 422 243: # define OP_findcolor 423 244: # define OP_setgray 424 245: # define OP_makegray 425 246: # define OP_makesampledblack 426 247: # define OP_makesampledcolor 427 248: 249: # define OP_maskstrokeclosed 440 250: # define OP_maskvector 441 251: 252: # define OP_makepixelarray 450 253: 254: # define OP_extractpixelarray 451 255: 256: # define OP_maskpixel 452 257: 258: # define OP_LIMIT OP_maskpixel