User`s guide

4-142
Guide to Printers and Printing
value popped is less than the first value popped. 1 is less than 3, so a 1 is pushed onto the
stack. The %t finds the 1 and so enters the if–then–else–then–else–then–else... sequence
looking for an integer to pair with the paper size value calculated for _Q.
The %gq fetches the stored value of _Q from the internal variable q, and pushes it onto the
stack. The %{1} pushes another 1 onto the stack. The %= pops the top two values (two 1s)
off the stack and, checking them for equality, succeeds; a 1 is pushed onto the stack. The
%t finds the 1 and so evaluates the %{2400}, which pushes 2400 onto the stack. The
calculation of wJ then falls through all but the last line of the remaining printer colon file
escape sequences defining wJ. The last escape sequence, %d, pops the top value, 2400,
off the stack and returns it, in ASCII format, to the in–progress calculation of wY.
The 2400 returned to the in–progress calculation of wY is the value of wJ, and is pushed
onto the stack. The %GwK in the else clause is skipped and the %; terminates the
if–then–else sequence. The %G_v fetches the line density (in lines per inch), 6, and pushes
it onto the stack. The %* pops the top two values (a 6 and a 2400) off the stack, multiplies
them together, and pushes the result (14400) back onto the stack. The %{300} pushes a
300 onto the stack. The %/ pops the top two values (a 14000 and a 300) off the stack,
divides the second value popped off the stack by the first value popped off the stack, and
pushes the result (48) onto the stack. The %d pops the top value (48) off the stack and
returns it to the in–progress calculation of wL.
The 48 returned to the in–progress calculation of wL is the value of _l. The value of wL was
originally referenced in the determination of the value of the ia attribute, the input
datastream pipeline for ASCII jobs. The number 48 replaces the %IwL in that determination,
so the value of the –! flag to pioformat becomes
/usr/lib/lpd/pio/fmtrs/piof5202 –l48. The –l48 can be seen in the original
diagnostic message from piobe that was the basis of this discussion; it is part of the
PIPELINE OF FILTERS section of the mail sent by the qdaemon on behalf of piobe.
The calculation of the value associated with the –w flag to piof5202 is described in
”Calculating Page Width Using Printer Colon File Escape Sequences”, on page 4-147.
The Calculation of Page Length figure depicts the stack operations (as described above)
used to obtain a final numeric value for page length in lines. The following numbered steps
correspond to the numbers on the left side of the columns in the figure, and provide a
step–by–step description of the evaluation of the printer colon file escape sequences
defining page length, in lines, for this particlular queue (asc), colon file, and command line.