/*
 *  Interpress utilities
 *
 *  Written for Xerox Corporation by William LeFebvre
 *  24-May-1984
 *
 *  Added LONG←SEQUENCE←LIMIT and OP←extractpixelarray definitions.
 *  16-Jan-1985, Keith Knox
 */

/*  This header appears at the front of every Interpress file  */

# define  IP←Header	"Interpress/Xerox/1.0 "

/* For convenience -- POINT is the size of a point in meters */
# define	POINT	(0.00035278)

/*
 *  Definitions pertaining to InterPress tokes:
 */

# define	SHORT←OP	0200
# define	LONG←OP		0240
# define	SHORT←INTEGER	0000
# define	SHORT←SEQUENCE	0300
# define	LONG←SEQUENCE	0340

/* these help us cope with short integer tokens: */
# define	INTEGER←ZERO	4000
# define	INTEGER←MAX	(32767 - INTEGER←ZERO)
# define	INTEGER←MIN	(0 - INTEGER←ZERO)

/* the long and short of sequences: */
# define	SHORT←SEQUENCE←LIMIT	255		/* ( 8 bits) */
# define	LONG←SEQUENCE←LIMIT	16777215	/* (24 bits) */

/* Sequence types: */
# define	sequenceAdaptivePixelVector	12
# define	sequenceAPV			sequenceAdaptivePixelVector
# define	sequenceComment			6
# define	sequenceCompressedPixelVector	10
# define	sequenceCPV			sequenceCompressedPixelVector
# define	sequenceContinued		7
# define	sequenceIdentifier		5
# define	sequenceInsertFile		11
# define	sequenceInteger			2
# define	sequenceLargeVector		8
# define	sequencePackedPixelVector	9
# define	sequencePPV			sequencePackedPixelVector
# define	sequenceRational		4
# define	sequenceString			1

/* imager variables: */
# define	I←DCScpx			0
# define	I←DCScpy			1
# define	I←correctMX			2
# define	I←correctMY			3
# define	I←T				4
# define	I←priorityImportant		5
# define	I←mediumXSize			6
# define	I←mediumYSize			7
# define	I←fieldXMin			8
# define	I←fieldYMin			9
# define	I←fieldXMax			10
# define	I←fieldYMax			11
# define	I←showVec			12
# define	I←color				13
# define	I←noImage			14
# define	I←strokeWidth			15
# define	I←strokeEnd			16
# define	I←underlineStart		17
# define	I←amplifySpace			18
# define	I←correctPass			19
# define	I←correctShrink			20
# define	I←correctTX			21
# define	I←correctTY			22

/* operation codes: */
# define	OP←nil				0
# define	OP←nop				1

# define	OP←setxy			10
# define	OP←setxyrel			11
# define	OP←setxrel			12
# define	OP←setyrel			13
# define	OP←linetox			14
# define	OP←linetoy			15
# define	OP←space			16
# define	OP←get				17
# define	OP←iget				18
# define	OP←iset				19
# define	OP←fget				20
# define	OP←fset				21
# define	OP←show				22
# define	OP←lineto			23
# define	OP←maskstroke			24
# define	OP←moveto			25

# define	SHORT←OP←LIMIT			31

# define	OP←metricMaster			100
# define	OP←environmentMaster		101
# define	OP←beginBlock			102
# define	OP←endBlock			103
# define	OP←noPages			104
# define	OP←pageInstructions		105
# define	OP←beginBody			106
# define	OP←endBody			107

# define	OP←correct			110

# define	OP←makesimpleco			114
# define	OP←makeco			115
# define	OP←makecompiledimage		116

# define	OP←dosavesimplebody		120
# define	OP←dobody			121
# define	OP←dosavebody			122
# define	OP←dosaveallbody		123

# define	OP←showandxrel			146
# define	OP←findfont			147
# define	OP←modifyfont			148
# define	OP←finddecompressor		149
# define	OP←findfontvec			150
# define	OP←setfont			151

# define	OP←setcorrectmeasure		154
# define	OP←setcorrecttollerance		155
# define	OP←correctmask			156
# define	OP←correctspace			157

# define	OP←getcp			159
# define	OP←maket			160
# define	OP←opent			161
# define	OP←translate			162
# define	OP←rotate			163
# define	OP←scale			164
# define	OP←concat			165
# define	OP←scale2			166
# define	OP←invert			167
# define	OP←concatt			168
# define	OP←move				169
# define	OP←trans			170

# define	OP←transform			174
# define	OP←transformvewc		175
# define	OP←roundxy			176
# define	OP←roundxyvec			177

# define	OP←pop				180
# define	OP←dup				181

# define	OP←copy				183
# define	OP←roll				184
# define	OP←exch				185
# define	OP←mark				186
# define	OP←unmark			187
# define	OP←count			188

# define	OP←unmark0			192

# define	OP←abs				200
# define	OP←add				201
# define	OP←and				202
# define	OP←ceiling			203
# define	OP←div				204
# define	OP←eq				205
# define	OP←floor			206
# define	OP←ge				207
# define	OP←gt				208
# define	OP←mod				209
# define	OP←mul				210
# define	OP←neg				211
# define	OP←not				212
# define	OP←or				213
# define	OP←sub				214
# define	OP←trunc			215
# define	OP←rem				216
# define	OP←round			217
# define	OP←eqn				218

# define	OP←type				220
# define	OP←atan				221
# define	OP←cos				222
# define	OP←exp				223
# define	OP←log				224
# define	OP←sin				225
# define	OP←sqrt				226
# define	OP←max				227
# define	OP←min				228

# define	OP←do				231
# define	OP←dosave			232
# define	OP←dosaveall			233

# define	OP←if				239
# define	OP←ifcopy			240
# define	OP←ifelse			241
# define	OP←loop				242

# define	OP←frame			250

# define	OP←poolop			253
# define	OP←pool				254
# define	OP←pget				255
# define	OP←pset				256
# define	OP←makepool			257
# define	OP←nopool			258

# define	OP←env				260

# define	OP←makeveclu			282
# define	OP←makevec			283

# define	OP←shape			285
# define	OP←openvec			286

# define	OP←getprop			287
# define	OP←getp				288
# define	OP←mergeprop			289

# define	OP←dround			300
# define	OP←getcprounded			301

# define	OP←curveto			402
# define	OP←arcto			403
# define	OP←conicto			404

# define	OP←maskfill			409
# define	OP←maskrectangle		410
# define	OP←masktrapezoidx		411
# define	OP←masktrapezoidy		412
# define	OP←startunderline		413
# define	OP←makeunderline		414

# define	OP←makeoutline			417
# define	OP←clipoutline			418
# define	OP←cliprectangle		419

# define	OP←findcoloroperator		421
# define	OP←findcolormodeloperator	422
# define	OP←findcolor			423
# define	OP←setgray			424
# define	OP←makegray			425
# define	OP←makesampledblack		426
# define	OP←makesampledcolor		427

# define	OP←maskstrokeclosed		440
# define	OP←maskvector			441

# define	OP←makepixelarray		450
# define	OP←extractpixelarray		451

# define	OP←maskpixel			452

# define	OP←LIMIT			OP←maskpixel