COMPILATION LISTING OF SEGMENT comp_fill_ Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-17_1942.61_Mon_mdt Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * Copyright, (C) Honeywell Information Systems Inc., 1980 * 6* * * 7* * * 8* *********************************************************** */ 9 10 /* compose subroutine to fill lines to current line length */ 11 12 /**** format: style2,ind2,ll79,dclind4,idind15,comcol41,linecom */ 13 14 comp_fill_: 15 proc; 16 17 /* LOCAL STORAGE */ 18 19 dcl dc1_ndx fixed bin; /* index of DC1 char */ 20 dcl GAPs char (4); /* word delimiters */ 21 dcl i fixed bin; /* working index */ 22 /* hyphenation point index */ 23 /* for text measuring */ 24 dcl 1 meas2 aligned like text_entry.cur; 25 dcl minwsp fixed bin; /* strokes for current min WSP */ 26 dcl revstr char (1020) var; /* reverse of text.input_line */ 27 dcl re_fill bit (1); 28 dcl scndx fixed bin; /* line scan index */ 29 dcl usable fixed bin (31); /* net line width */ 30 31 dcl (index, length, max, min, null, substr, translate, verify) 32 builtin; 33 34 /* initialize local variables */ 35 unspec (meas2), re_fill = "0"b; 36 GAPs = " " || EN || PS || PAD; 37 tblfmtndx, tblcolndx = 0; 38 tblfmtptr, tblcolptr = null; 39 40 if shared.table_mode 41 then 42 do; 43 tblfmtndx = tbldata.ndx; 44 tblfmtptr = tbldata.fmt (tblfmtndx).ptr; 45 tblcolndx = tblfmt.ccol; 46 tblcolptr = tblfmt.colptr (tblfmt.ccol); 47 end; 48 49 /* set up for a fresh line */ 50 if text.input_line = "" 51 then 52 do; 53 i = verify (ctl_line, " ") - 1; /* check for leading WS */ 54 if i > 0 /* if any, convert to undent */ 55 then text.parms.left.undent = 56 text.parms.left.undent - i * shared.EN_width; 57 ctl_line = ltrim (ctl_line); 58 59 text.input.info = ctl.info; 60 text.input.keep = text.parms.keep; 61 text.input.quad = text.parms.quad; 62 text.input.und_prot = "0"b; 63 /**** text.input.hanging = ctl.hanging; 64*/**** ctl.hanging = "0"b;*/ 65 text.input.linespace = ctl.linespace; 66 text.input.fnt_chng = ctl.fnt_chng; 67 unspec (text.input.cur) = "0"b; 68 text.input.font, text.input.cur.font = ctl.font; 69 end; 70 71 text.input.lmarg = text.parms.left.indent - text.parms.left.undent; 72 text.input.rmarg = 73 text.parms.measure - text.parms.right.indent 74 + text.parms.right.undent; 75 76 if shared.table_mode & ^text.parms.footnote 77 then 78 do; 79 text.input.lmarg = text.input.lmarg + tblcol.margin.left; 80 text.input.rmarg = text.input.rmarg + tblcol.margin.left; 81 end; 82 83 text.input.net, usable = text.input.rmarg - text.input.lmarg; 84 85 if ^(ctl.fnt_chng | ctl.footref) /* if not a font change or ftn ref */ 86 then 87 do; /* does it end in a ctl str? */ 88 scndx = length (ctl_line); 89 look_again: 90 dc1_ndx = index (reverse (substr (ctl_line, 1, scndx)), DC1); 91 if dc1_ndx > 0 /* is there a DC1? */ 92 then 93 do; 94 if dc1_ndx < 3 95 then 96 do; /* back up */ 97 scndx = scndx - dc1_ndx - 1; 98 goto look_again; /* and try again */ 99 end; /**/ 100 /* the DC1 byte plus length byte value */ 101 scndx = length (ctl_line) - dc1_ndx + 1; 102 scndx = scndx + 3 + bin (unspec (substr (ctl_line, scndx + 2, 1))); 103 if scndx < length (ctl_line) 104 then ctl_line = rtrim (ctl_line); 105 end; 106 107 else ctl_line = rtrim (ctl_line); 108 end; 109 110 if shared.bug_mode 111 then 112 do; 113 call ioa_ ("fill: (lin=^f/^f/^f ^a=^d e^d u^f(^f))", 114 show (text.input.lmarg, 12000), show (text.input.rmarg, 12000), 115 show (usable, 12000), text.blktype, text.blkndx, text.hdr.count, 116 show (text.hdr.used, 12000), show (text.hdr.trl_ws, 12000)); 117 118 call ioa_ ("^-(lft=c^d w^f g^d ^f^2(/^f^)^[ ftn=^d/^f^;^2s^]" 119 || " ^a ^f^[ mod=^d ^d^;^2s^]" 120 || "^[ PUNC^]^[ FRF^]^[ FCS^]^[ UNSR^]" 121 || "^[ UNSP^]^[ A^]^[ |^]^[ *^])^/^5x""^a""", text.input.chrct, 122 show (text.input.width, 12000), text.input.cur.gaps, 123 show (text.input.cur.width + text.input.cur.min, 12000), 124 show (text.input.cur.width + text.input.cur.avg, 12000), 125 show (text.input.cur.width + text.input.cur.max, 12000), 126 (text.input.ftn.ct > 0), text.input.ftn.ct, 127 show (text.input.ftn.used, 12000), text.input.font.name, 128 show (text.input.font.size, 1000), (text.input.mod_start > 0), 129 text.input.mod_start, text.input.mod_len, text.input.punct, 130 text.input.footref, text.input.fnt_chng, text.input.unstrt, 131 text.input.unstop, text.input.art, 132 (text.input.cbar.mod | text.input.cbar.add), text.input.cbar.del, 133 comp_util_$display (text.input_line, 0, "0"b)); 134 135 call ioa_ ("^-(new=c^d ^a ^f^[ FRF^]^[ FCS^]" 136 || "^[ UNSR^]^[ UNSP^]^[ A^]^[ |^]^[ *^])^/^5x""^a""", 137 length (ctl_line), ctl.font.name, show (ctl.font.size, 1000), 138 ctl.footref, ctl.fnt_chng, ctl.unstrt, ctl.unstop, text.parms.art, 139 (text.input.cbar.mod | text.input.cbar.add), text.input.cbar.del, 140 comp_util_$display (ctl_line, 0, "0"b)); 141 end; 142 143 if usable <= 0 /* if the line cant be filled */ 144 then 145 do; 146 call comp_report_$ctlstr (2, 0, addr (ctl.info), ctl_line, 147 "Net line length is ^f", show (usable, 12000)); 148 goto return_; 149 end; /**/ 150 /* set start of line scan */ 151 scndx = length (text.input_line) + 1; 152 153 /* any leftover text? anything to be added ? */ 154 if length (text.input_line) > 0 & length (ctl_line) > 0 155 then 156 do; 157 revstr = reverse (text.input_line); 158 159 if ^text.input.footref /* if leftover doesnt end */ 160 then /* with footref */ 161 do; 162 if text.input.punct /* and it ends with punctuation */ 163 | (search (revstr, ".:!?") = 1 164 | (search (revstr, """)") = 1 & search (revstr, ".!?") = 2)) 165 then 166 do; 167 if ^(ctl.footref /* if addon is not a footref */ 168 | ctl.unstop) /* or UNSTOP, */ 169 then /* add PS and WORDSPACE */ 170 do; 171 text.input_line = text.input_line || PS || " "; 172 text.input.punct, text.input.footref = "0"b; 173 end; /**/ 174 /* set flag for next time */ 175 else text.input.punct = "1"b; 176 end; /* otherwise, only WORDSPACE unless */ 177 /* leftover ends with PAD, */ 178 else if index (revstr, PAD) ^= 1 & ^text.input.unstrt 179 /* UNSTRT, */ 180 /* or a word breaker, */ 181 & index (revstr, shared.wrd_brkr) ^= 1 182 /* or new is footref, UNSTOP, or FCS */ 183 & ^(ctl.footref | ctl.unstop | ctl.fnt_chng) 184 then text.input_line = text.input_line || " "; 185 end; 186 187 else /* leftover ends with footref */ 188 do; 189 if ^ctl.footref /* new isnt a footref or starts with */ 190 /* closing punctuation */ 191 & index (".,;:!?"")", substr (ctl_line, 1, 1)) = 0 192 then if text.input.punct /* if left also ends with punct */ 193 then 194 do; 195 text.input_line = text.input_line || PS || " "; 196 text.input.punct = "0"b; 197 end; 198 else text.input_line = text.input_line || " "; 199 end; 200 201 text.input.fnt_chng = ctl.fnt_chng; 202 end; /**/ 203 /* check for change bars */ 204 if text.parms.cbar.mod | text.parms.cbar.add 205 then 206 do; 207 if text.input.mod_start = 0 /* if starting mod text */ 208 then text.input.mod_start = scndx; 209 text.input.mod_len = text.input.mod_len + length (ctl_line); 210 end; 211 text.input.cbar.add = text.input.cbar.add | text.parms.cbar.add; 212 text.input.cbar.mod = text.input.cbar.mod | text.parms.cbar.mod; 213 text.input.cbar.del = text.input.cbar.del | text.parms.cbar.del; 214 text.parms.cbar.del = "0"b; 215 if text.input.cbar.del 216 then shared.cbar_type = ""; /**/ 217 /* append the new text */ 218 text.input_line = text.input_line || ctl_line; 219 text.input.art = text.input.art | text.parms.art; 220 text.input.footref = ctl.footref; 221 text.input.fnt_chng = text.input.fnt_chng & ctl.fnt_chng; 222 text.input.unstrt = ctl.unstrt; 223 text.input.unstop = ctl.unstop; 224 ctl.unstrt, ctl.unstop, ctl.fnt_chng = "0"b; 225 /* is this a hanging undent? */ 226 if text.parms.left.undent > 0 & text.input.hanging 227 then 228 do; /* measure the hanger */ 229 call comp_measure_ (text.input_line, addr (text.input.cur.font), "0"b, 230 text.input.art, quadl, 0, addr (text.input.cur), addr (meas2), 231 addr (text.input.info)); 232 233 if text.input.cur.width + text.input.cur.avg < text.parms.left.undent 234 then text.input.linespace = 0; 235 else text.input.linespace = text.parms.linespace; 236 237 text.input.quad = quadl; /* set left */ 238 239 call put_line; 240 text.input_line = ""; 241 text.input.width = 0; 242 goto return_; 243 end; 244 245 fill_loop: /* scan the line */ 246 do while (text.input.cur.chrct < length (text.input_line)); 247 /* any undent that needs protection? */ 248 if text.parms.left.undent > 0 & ^text.input.und_prot 249 then 250 do; /* measure up to the undent value */ 251 call comp_measure_ (text.input_line, addr (text.input.cur.font), 252 "0"b, text.input.art, quadl, text.parms.left.undent, 253 addr (text.input.cur), addr (meas2), addr (text.input.info)); 254 scndx = text.input.cur.chrct; /* update scan index */ 255 256 do i = 1 to text.input.cur.chrct; 257 /* protect WS */ 258 if substr (text.input_line, i, 1) = DC1 259 then /* skip control strings */ 260 do; 261 DCxx_p = addr (substr (text.input_line, i)); 262 i = i + dcxx.leng + 3; 263 end; 264 else if substr (text.input_line, i, 1) = " " 265 then substr (text.input_line, i, 1) = EN; 266 end; 267 268 text.input.und_prot = "1"b; /* undent has been protected */ 269 end; 270 271 call /* grab some text */ 272 comp_measure_ (text.input_line, addr (text.input.cur.font), "1"b, 273 text.input.art, text.input.quad, usable, addr (text.input.cur), 274 addr (meas2), addr (text.input.info)); 275 /**/ 276 /* did a footref cause an overset? */ 277 if meas2.width + meas2.avg > usable & ctl.footref & ^re_fill 278 & text.input.cur.gaps > 0 279 then 280 do; /* clear the decks */ 281 unspec (text.input.cur) = "0"b; 282 text.input.cur.font = text.input.font; 283 re_fill = "1"b; 284 goto fill_loop; /* and start over */ 285 end; 286 287 if meas2.chrct > 0 /* did it overset? */ 288 then 289 do; 290 if text.input.cur.chrct = 0 /* overlength line */ 291 then text.input.cur = meas2; 292 call put_line; 293 end; 294 295 ctl.footref, re_fill = "0"b; 296 297 if meas2.chrct = 0 /* if no overflow */ 298 then /* this is a leftover */ 299 do; /* restore font */ 300 text.input.cur.font = text.input.font; 301 goto return_; 302 end; 303 304 /* if text.input.quad ^= just /* if not justifying */ 305 /* & shared.hyph_mode /* try hyphenation? */ 306 /* & text.input.cur.width + text.input.cur.max < usable*/ 307 /* then goto try_hyph;*/ 308 309 /* text.input.width = text.input.cur.width + text.input.cur.avg;*/ 310 end fill_loop; 311 312 return_: 313 if shared.blkptr ^= null /* clean up leftover */ 314 then if text.input_line ^= "" 315 then 316 do; 317 text.input.width = text.input.cur.width; 318 text.input.cur.font = ctl.cur.font; 319 /* check punctuation */ 320 if scndx > length (text.input_line) 321 then 322 do; 323 i = length (text.input_line); 324 (nostrg): 325 if index (".:!?", substr (text.input_line, i, 1)) ^= 0 326 | (index (""")", substr (text.input_line, i, 1)) ^= 0 327 & index (".!?", substr (text.input_line, i - 1, 1)) ^= 0) 328 then text.input.punct = "1"b; 329 else text.input.punct = "0"b; 330 end; 331 end; 332 333 if shared.bug_mode 334 then 335 do; 336 if shared.end_output 337 then call ioa_ ("^5x(fill: END)"); 338 339 else call ioa_ ("^5x(fill: lft=c^d w^f g^d ^f^2(/^f^)" 340 || "^[ ftn=^d/^f^;^2s^] ^a ^f^[ mod=^d ^d^;^2s^] ^a=^d e^d" 341 || 342 " u^f(^f)^[ FRF^]^[ FCS^]^[ A^]^[ |^]^[ *^])^[^/^5x""^a""^]", 343 text.input.chrct, show (text.input.width, 12000), 344 text.input.cur.gaps, 345 show (text.input.cur.width + text.input.cur.min, 12000), 346 show (text.input.cur.width + text.input.cur.avg, 12000), 347 show (text.input.cur.width + text.input.cur.max, 12000), 348 (text.input.ftn.ct > 0), text.input.ftn.ct, 349 show (text.input.ftn.used, 12000), text.input.font.name, 350 show (text.input.font.size, 1000), 351 (text.input.mod_start > 0), text.input.mod_start, 352 text.input.mod_len, text.blktype, text.blkndx, 353 text.hdr.count, show (text.hdr.used, 12000), 354 show (text.hdr.trl_ws, 12000), text.input.footref, 355 text.input.fnt_chng, text.input.art, 356 (text.input.cbar.mod | text.input.cbar.add), 357 text.input.cbar.del, (length (text.input_line) > 0), 358 comp_util_$display (text.input_line, 0, "0"b)); 359 end; 360 return; 361 362 /* add text line to block */ 363 364 put_line: 365 proc; 366 367 dcl overset char (1020) var; /* overset text */ 368 369 overset = ""; /**/ 370 /* is there an overset? */ 371 if text.input.cur.chrct < length (text.input_line) 372 then 373 do; 374 overset = substr (text.input_line, text.input.cur.chrct + 1); 375 text.input_line = substr (text.input_line, 1, text.input.cur.chrct); 376 end; /**/ 377 /* final width */ 378 text.input.width = text.input.cur.width; 379 380 if text.input.mod_start > 0 381 & text.input.mod_start <= length (text.input_line) 382 then text.input.cbar.mod = "1"b; 383 else text.input.cbar.mod = "0"b; 384 385 if text.input.fnt_chng 386 & length (text.input_line) = length (text.input.cur.font.fcs_str) 387 then text.input.linespace = 0; 388 else if ^text.input.hanging 389 then text.input.linespace = text.parms.linespace; 390 391 call comp_util_$add_text (shared.blkptr, "0"b, "1"b, "0"b, text.input.oflo, 392 addr (text.input)); 393 text.input_line = ""; 394 text.input.cbar = text.parms.cbar; 395 396 if text.input.oflo & ^text.parms.keep & text.hdr.colno >= 0 397 & ^shared.table_mode 398 then call comp_break_ (need_break, -2); 399 400 if shared.end_output 401 then goto return_; 402 403 if overset ^= "" /* any leftovers? */ 404 then 405 do; 406 if shared.blkptr = null 407 then call comp_util_$getblk (page.hdr.col_index, shared.blkptr, "tx", 408 const.current_parms_ptr, "0"b); 409 410 text.input_line = ltrim (rtrim (overset), PS || " "); 411 412 text.input.mod_len = /* update modification data */ 413 min (length (text.input_line), 414 max (text.input.mod_start + text.input.mod_len 415 - length (text.input_line) - 1, 0)); 416 if text.input.mod_len > 0 417 then text.input.mod_start = 1; 418 else 419 do; 420 text.input.mod_start = 0; 421 unspec (text.input.cbar) = "0"b; 422 end; 423 424 text.input.font = text.input.cur.font; 425 unspec (text.input.cur) = "0"b; /* refresh scan data */ 426 text.input.cur.font = text.input.font; 427 428 text.input.lmarg = text.parms.left.indent; 429 text.input.rmarg = text.parms.measure - text.parms.right.indent; 430 text.input.net, usable = text.input.rmarg - text.input.lmarg; 431 432 if shared.table_mode & ^text.parms.footnote 433 then 434 do; 435 text.input.lmarg = text.input.lmarg + tblcol.margin.left; 436 text.input.rmarg = text.input.rmarg + tblcol.margin.left; 437 end; 438 end; 439 440 else 441 do; /* all input used */ 442 text.input_line = ""; 443 text.input.chrct, text.input.mod_start, text.input.mod_len = 0; 444 end; /**/ 445 /* undents used */ 446 text.input.hanging, text.input.und_prot = "0"b; 447 text.parms.left.undent, text.parms.right.undent = 0; 448 449 /**** if ^text.input.fnt_chng 450*/**** then col.hdr.hdspc = 0; /* head space has been covered */ 451 text.input.fnt_chng = "0"b; 452 text.input.ftn = text_entry.ftn; /* footnotes cleared out */ 453 454 scndx = 1; /* reset scan index */ 455 text.input.info = ctl.info; /* update text line stuff */ 456 457 if ^shared.table_mode 458 then 459 do; 460 text.input.lmarg = text.parms.left.indent; 461 text.input.rmarg = text.parms.measure - text.parms.right.indent; 462 text.input.net, usable = text.input.rmarg - text.input.lmarg; 463 end; /**/ 464 /* put any pictures */ 465 if shared.picture.count > 0 & text.blktype ^= "pi" 466 then call comp_util_$pictures (shared.blkptr); 467 468 end put_line; 469 470 show: 471 proc (datum, scale) returns (fixed dec (11, 3)); 472 dcl datum fixed bin (31); 473 dcl scale fixed bin (31); 474 475 return (round (dec (round (divide (datum, scale, 31, 11), 10), 11, 4), 3)); 476 end show; 477 1 1 /* BEGINE INCLUDE FILE comp_brktypes.incl.pl1 */ 1 2 1 3 /* Written - 4/18 - EJW 1 4* 1 5* Defines constants for all the types of text breaks in compose */ 1 6 1 7 /* format: style2,ind2,ll79,dclind4,idind15,comcol41,linecom */ 1 8 1 9 dcl ( 1 10 format_break init (0), 1 11 block_break init (1), 1 12 column_break init (2), 1 13 page_break init (3), 1 14 need_break init (4), 1 15 footnote_break init (5), 1 16 footer_break init (7) 1 17 ) fixed bin static options (constant); 1 18 1 19 /* END INCLUDE FILE comp_brktypes.incl.pl1 */ 478 2 1 /* BEGIN INCLUDE FILE comp_column.incl.pl1 */ 2 2 2 3 /* format: style2,ind2,ll79,dclind4,idind15,comcol41,linecom */ 2 4 2 5 dcl 1 col /* the text column */ 2 6 aligned based (shared.colptr), 2 7 2 blkptr (100) ptr, /* pointers to text blocks */ 2 8 2 depth_adj fixed bin (31), /* for variable start depth */ 2 9 2 ftrptr ptr, /* -> column footer */ 2 10 2 ftrusd fixed bin (31), /* column footer space used */ 2 11 2 gutter fixed bin (31), /* column separation */ 2 12 2 hdr like colhdr, /* column control stuff */ 2 13 2 hdrptr ptr, /* -> column header */ 2 14 2 hdrusd fixed bin (31), /* column header space used */ 2 15 2 margin, /* margin settings for column */ 2 16 3 left fixed bin (31), 2 17 3 right fixed bin (31), 2 18 2 parms, /* text parms for the column */ 2 19 3 measure fixed bin (31); /* column width */ 2 20 2 21 dcl 1 colhdr aligned based (const.colhdrptr), 2 22 /* an empty column header */ 2 23 2 balblk fixed bin, /* block to begin column balancing */ 2 24 2 baldepth fixed bin (31), /* page depth at balance point */ 2 25 2 balftn, /* footnotes at balance point */ 2 26 3 ct fixed bin, /* count */ 2 27 3 usd fixed bin (31), /* space used */ 2 28 3 blkndx (40) fixed bin, /* block index values */ 2 29 2 balusd fixed bin (31), /* space used up to balance point */ 2 30 2 blkct fixed bin, /* text block count */ 2 31 2 depth fixed bin (31), /* current page depth in the column */ 2 32 2 ftn like balftn, /* footnotes */ 2 33 2 pspc fixed bin (31), /* current white space */ 2 34 2 net fixed bin (31), /* net usable space in the column */ 2 35 2 used fixed bin (31); /* space used in this column */ 2 36 /* for quick reference */ 2 37 dcl 1 col0 aligned like col based (page.column_ptr (0)); 2 38 2 39 /* END INCLUDE FILE comp_column.incl.pl1 */ 479 3 1 /* BEGIN INCLUDE FILE ..... comp_DCdata.incl.pl1 ..... 11/16/78 J Falksen 3 2* Modified: ??/81 - EJW - Addded type_wait 3 3* Modified: 4/83 - EJW - Added type_un(strt stop), reorganized file. 3 4**/ 3 5 3 6 /* format: style2,ind3,ll79,dclind4,idind15,comcol41,linecom */ 3 7 3 8 dcl DCxx_p ptr; /* for qualification of embedded */ 3 9 /* control strings */ 3 10 /* an embedded control string */ 3 11 dcl 1 dcxx unal based (DCxx_p), 3 12 2 mark char (1) unal, /* control marker - DC1 (\021) */ 3 13 2 ctl, 3 14 3 type bit (3) unal, /* 000- device/writer control */ 3 15 /* 001- */ 3 16 /* 010- literal data */ 3 17 /* 011- family/member/size data */ 3 18 /* 100- shift */ 3 19 /* 101- */ 3 20 /* 110- vector */ 3 21 /* 111- zero-offset vector */ 3 22 3 fill1 bit (1) unal, 3 23 3 Xctl bit (2) unal, /* 00- no X value present */ 3 24 /* 01- short X value */ 3 25 /* 10- long X value */ 3 26 3 fill2 bit (1) unal, 3 27 3 Yctl bit (2) unal, /* 00- no Y value present */ 3 28 /* 01- short Y value present */ 3 29 /* 10- long Y value present */ 3 30 2 leng fixed bin (9) unal unsigned, 3 31 /* # of remaining bytes */ 3 32 2 etc; /* the rest of the control bytes */ 3 33 /* device/writer controls */ 3 34 dcl 1 dcctl unal based (DCxx_p), 3 35 2 mark char (1) unal, 3 36 2 type char (1) unal, /* control type */ 3 37 /* leng is always 0 for these */ 3 38 2 leng fixed bin (9) unal unsigned; 3 39 dcl ( 3 40 wait_signal init (" "), /* = 021001000 */ 3 41 unstart_signal init (" "), /* = 021002000 */ 3 42 unstop_signal init (" ") /* = 021003000 */ 3 43 ) char (3) static options (constant); 3 44 /* the "literal" control string */ 3 45 dcl 1 dclit unal based (DCxx_p), 3 46 2 mark char (1) unal, 3 47 2 type char (1) unal, /* control type */ 3 48 2 leng fixed bin (9) unal unsigned, 3 49 /* width in milli-points of literal */ 3 50 2 width fixed bin (31) unal, 3 51 /* actual literal, max length 509 */ 3 52 2 data char (dclit.leng - 4); 3 53 /* long (31 bits) values */ 3 54 dcl 1 dclong_val unal based (DCxx_p), 3 55 2 mark char (1) unal, 3 56 2 type char (1) unal, /* control type */ 3 57 2 leng fixed bin (9) unal unsigned, 3 58 ( 3 59 2 v1 fixed bin (31), /* long value */ 3 60 2 v2 fixed bin (31) /* long value */ 3 61 ) unal; 3 62 dcl ( 3 63 dclong_len init (8), /* 2 long values */ 3 64 dclong1_len init (4) /* 1 long value */ 3 65 ) fixed bin static options (constant); 3 66 /* short (17 bit) values */ 3 67 dcl 1 dcshort_val unal based (DCxx_p), 3 68 2 mark char (1) unal, 3 69 2 type char (1) unal, /* control type */ 3 70 2 leng fixed bin (9) unal unsigned, 3 71 ( 3 72 2 v1 fixed bin, /* short value */ 3 73 2 v2 fixed bin /* short value */ 3 74 ) unal; 3 75 dcl ( 3 76 dcshort_len init (4), /* 2 short values */ 3 77 dcshort1_len init (2) /* 1 short value */ 3 78 ) fixed bin static options (constant); 3 79 /* a font change string */ 3 80 dcl 1 dcfs unal based (DCxx_p), 3 81 2 mark char (1) unal, /* font/size data */ 3 82 2 type char (1) unal, /* control type */ 3 83 2 leng fixed bin (9) unal unsigned, 3 84 /* fnttbldata index */ 3 85 2 f fixed bin (9) unal unsigned, 3 86 /* point size in milli-points */ 3 87 2 p fixed bin (31) unal; 3 88 dcl dcfs_len fixed bin init (5) static options (constant); 3 89 3 90 dcl ( /* symbolic definitions of DC types */ 3 91 type_wait init (""), /* writer wait */ 3 92 type_unstart init (""), /* underscore start */ 3 93 type_unstop init (""), /* underscore stop */ 3 94 type_lit init (""), /* literal data */ 3 95 type_font init (""), /* family/member/size data */ 3 96 /* SHIFTS - */ 3 97 type_sy init (""), /* -- no x, short y */ 3 98 type_sly init (""), /* -- no x, long y */ 3 99 type_sx init (""), /* -- short x, no y */ 3 100 type_sxy init (" "), /* -- short x, short y */ 3 101 type_slx init (""), /* -- long x, no y */ 3 102 type_slxly init (""), /* -- long x, long y */ 3 103 /* VECTORS */ 3 104 type_vy init (""), /* -- no x, short y */ 3 105 type_vly init (""), /* -- no x, long y */ 3 106 type_vx init (""), /* -- short x, no y */ 3 107 type_vxy init (""), /* -- short x, short y */ 3 108 type_vlx init (""), /* -- long x, no y */ 3 109 type_vlxly init (""), /* -- long x, long y */ 3 110 /* ZERO-OFFSET VECTORS- */ 3 111 type_v0y init (""), /* -- no x, short y */ 3 112 type_v0ly init (""), /* -- no x, long y */ 3 113 type_v0x init (""), /* -- short x, no y */ 3 114 type_v0xy init (""), /* -- short x, short y */ 3 115 type_v0lx init (""), /* -- long x, no y */ 3 116 type_v0lxly init ("") /* -- long x, long y */ 3 117 ) char (1) unal int static options (constant); 3 118 3 119 /* END INCLUDE FILE ..... comp_DCdata.incl.pl1 ..... */ 480 4 1 /* BEGIN INCLUDE FILE - comp_dvt.incl.pl1 */ 4 2 4 3 /* Written: 9/80 - JA Falksen 4 4*/* Modified: 11/81 - EJW - Added comp_dvt.displayproc 4 5*/* Modified: 1/82 - EJW - Added length arg to comp_dvt.displayproc 4 6*/* Modified: 2/82 - EJW - Deleted ptr arg from comp_dvt.displayproc 4 7*/* Modified: 3/83 - EJW - Changed footref arg of comp_dvt.footproc to 4 8* (3) char (*) var. Version 4. */ 4 9 /* Modified: 6/83 - EJW - Added error print control switch to calling 4 10* sequence for comp_dvt.displayproc. - Version 5. 4 11*/* Modified: 11/84 - EJW - Renamed no_adjust to justifying. 4 12**/ 4 13 4 14 /* All names which end in "_r"are offset values within the device table */ 4 15 /* segment. The version of this structure is in comp_dvid.incl.pl1 */ 4 16 4 17 /* format: style2,ind3,ll79,dclind4,idind15,comcol41,linecom */ 4 18 4 19 dcl 1 comp_dvt aligned based (const.devptr), 4 20 2 devclass char (32), /* what general kind of device is */ 4 21 /* this, currently available: */ 4 22 /* "printer" (includes terminals), */ 4 23 /* "braille", "bitmap" */ 4 24 2 outproc entry /* page output processor */ 4 25 (fixed bin, /* function - 0=build */ 4 26 /* 1=init page */ 4 27 /* 2=init file */ 4 28 /* 3=cleanup */ 4 29 fixed bin (35)),/* error code */ 4 30 2 footproc entry /* footnote reference proc */ 4 31 ((3) char (*) var, 4 32 /* reference string (IN/OUT) */ 4 33 ptr), /* comp_dvt_p (IN) */ 4 34 2 artproc entry (), /* artwork proc */ 4 35 /* dont know how to describe yet */ 4 36 2 displayproc 4 37 entry /* string display interpreter */ 4 38 (char (*) var, /* raw input string */ 4 39 fixed bin (24), /* chars used in this call */ 4 40 bit (1)) /* 1= dont show display errors */ 4 41 returns (char (*) var), 4 42 /* interpreted output string */ 4 43 /* following values are in millipoints */ 4 44 2 min_WS fixed bin (31), /* minimum whitespace */ 4 45 2 min_lead fixed bin (31), /* minimun lead */ 4 46 2 vmt_min fixed bin (31), /* min usable .vmt */ 4 47 2 vmb_min fixed bin (31), /* min usable .vmb */ 4 48 2 def_vmt fixed bin (31), /* default .vmt */ 4 49 2 def_vmh fixed bin (31), /* default .vmh */ 4 50 2 def_vmf fixed bin (31), /* default .vmf */ 4 51 2 def_vmb fixed bin (31), /* default .vmb */ 4 52 2 pdw_max fixed bin (31), /* max page width available */ 4 53 2 pdl_max fixed bin (31), /* max page length available, */ 4 54 /* (0 = unlimited) */ 4 55 2 upshift fixed bin (31), /* footnote reference shift */ 4 56 2 init_ps fixed bin (31), /* initial pointsize (millipoints) */ 4 57 2 lettersp fixed bin (31), /* max letterspacing */ 4 58 2 max_pages fixed bin, /* max pages/"file" -1 ->unlimited */ 4 59 2 max_files fixed bin, /* max "files"/reel -1 ->unlimited */ 4 60 2 init_fam fixed bin, /* initial family index */ 4 61 2 init_mem fixed bin, /* initial member index */ 4 62 2 foot_fam fixed bin, /* initial foot family index */ 4 63 2 foot_mem fixed bin, /* initial foot member index */ 4 64 2 init_family 4 65 char (32), /* initial font family to use */ 4 66 2 init_member 4 67 char (32), /* initial font member to use */ 4 68 ( /* the following are offsets */ 4 69 2 atd_r, /* attach desc for on-line output */ 4 70 2 dvc_r, /* device control table relptr */ 4 71 2 comment_r, /* comment string relptr */ 4 72 2 cleanup_r, /* "cleanup" string relptr */ 4 73 2 medsel_table_r /* media select table relptr */ 4 74 ) bit (18) aligned, 4 75 2 foot_family 4 76 char (32), /* family for footnote reference */ 4 77 2 foot_member 4 78 char (32), /* member for footnote reference */ 4 79 /* if one was specified */ 4 80 2 sws unaligned, 4 81 3 interleave /* 0- page block has lines in column */ 4 82 bit (1), /* order left-to-right */ 4 83 /* 1- page block has lines in line */ 4 84 /* order top-to-bottom */ 4 85 3 justifying /* 1- device justifies lines */ 4 86 bit (1), 4 87 3 mbz bit (24), 4 88 3 endpage bit (9), /* EOP char if not "0"b */ 4 89 2 open_mode fixed bin (35), /* when going to a file */ 4 90 2 recleng fixed bin, /* length of tape records */ 4 91 2 family_ct fixed bin, /* # families present */ 4 92 2 family (comp_dvt.family_ct), 4 93 /* families of fonts defined */ 4 94 3 member_r bit (18) aligned, 4 95 /* member table relptr */ 4 96 3 name char (32); /* family name */ 4 97 4 98 4 99 /* The usage formula for units: */ 4 100 /* */ 4 101 /* rel_units * length_in_points */ 4 102 /* ---------------------------- = length_in_units */ 4 103 /* points_per_EM */ 4 104 4 105 /* END INCLUDE FILE comp_dvt.incl.pl1 */ 481 5 1 /* BEGIN INCLUDE FILE comp_entries.incl.pl1 */ 5 2 5 3 /* format: style2,ind2,ll79,dclind4,idind15,comcol41,linecom */ 5 4 5 5 dcl compose_severity_ 5 6 fixed bin (35) ext static; 5 7 dcl comp_ entry; 5 8 dcl comp_art_ entry (ptr, bit (1)); 5 9 dcl comp_block_ctls_ 5 10 entry (fixed bin); 5 11 dcl comp_break_ entry (fixed bin, fixed bin); 5 12 dcl comp_break_ctls_ 5 13 entry (fixed bin); 5 14 dcl comp_ctls_ entry (bit (1) aligned); 5 15 dcl comp_eject_page_ 5 16 entry; 5 17 dcl comp_expr_eval_ 5 18 entry (char (*) var, fixed bin (21), ptr, fixed bin, 5 19 fixed bin, bit (1), fixed bin (31), char (*) var, 5 20 bit (9), fixed bin (35)); 5 21 dcl comp_extr_str_ entry (bit (1), char (*) var, fixed bin (21), 5 22 fixed bin (21), fixed bin (21), ptr) 5 23 returns (char (*) var); 5 24 dcl comp_fill_ entry; 5 25 dcl comp_font_ entry (bit (1), char (*) var, char (8) aligned); 5 26 dcl comp_format_ctls_ 5 27 entry (fixed bin); 5 28 dcl comp_get_file_$find 5 29 entry (char (*), ptr, char (*), bit (1), char (*) var, 5 30 fixed bin (35)); 5 31 dcl comp_get_file_$open 5 32 entry (ptr, bit (1), fixed bin (35)); 5 33 dcl comp_head_page_ 5 34 entry (fixed bin (31)); 5 35 dcl comp_hft_ctls_ entry (fixed bin); 5 36 dcl comp_hft_ctls_$title 5 37 entry (ptr, ptr, char (*) var, fixed bin (31)); 5 38 dcl comp_init_$one entry; 5 39 dcl comp_init_$two entry; 5 40 dcl comp_init_$three 5 41 entry; 5 42 dcl comp_insert_ctls_ 5 43 entry (fixed bin); 5 44 dcl comp_make_page_ 5 45 entry (fixed bin, bit (1)); 5 46 dcl comp_make_page_$cleanup 5 47 entry; 5 48 dcl comp_measure_ entry (char (1020) var, ptr, bit (1), bit (1), bit (6), 5 49 fixed bin (31), ptr, ptr, ptr); 5 50 dcl comp_read_$name 5 51 entry (char (*) var, fixed bin (21), fixed bin (21), 5 52 ptr) returns (char (*) var); 5 53 dcl comp_read_$number 5 54 entry (char (*) var, (*) fixed bin (31), 5 55 fixed bin (21), fixed bin (21), ptr, fixed bin (35)) 5 56 returns (fixed bin (31)); 5 57 dcl comp_read_$line 5 58 entry (ptr, char (*) var, bit (1)); 5 59 dcl comp_report_ entry (fixed bin, fixed bin (35), char (*), ptr, 5 60 char (*) var); 5 61 dcl comp_report_$ctlstr 5 62 entry options (variable); 5 63 /**** (sev, code, info, line, ctl_str, args... */ 5 64 dcl comp_report_$exact 5 65 entry (char (*), ptr); 5 66 dcl comp_space_ entry (fixed bin (31), ptr, bit (1), bit (1), bit (1), 5 67 bit (1)); 5 68 dcl comp_tbl_ctls_ entry (fixed bin); 5 69 dcl comp_title_block_ 5 70 entry (ptr); 5 71 dcl comp_update_symbol_ 5 72 entry (bit (1), bit (1), bit (1), char (32), 5 73 char (*) var); 5 74 dcl comp_use_ref_ entry (char (*) var, bit (1), bit (1), ptr); 5 75 dcl comp_util_$add_text 5 76 entry (ptr, bit (1), bit (1), bit (1), bit (1), ptr); 5 77 dcl comp_util_$display 5 78 entry (char (*) var, fixed bin, bit (1)) 5 79 returns (char (*) var); 5 80 dcl comp_util_$escape 5 81 entry (char (*) var, ptr); 5 82 dcl comp_util_$getblk 5 83 entry (fixed bin, ptr, char (2), ptr, bit (1)); 5 84 dcl comp_util_$num_display 5 85 entry (ptr, fixed bin) returns (char (256) var); 5 86 dcl comp_util_$pageno 5 87 entry (fixed bin, char (*) var); 5 88 dcl comp_util_$pictures /* emit pending pictures */ 5 89 entry /**/ 5 90 (ptr); /* current text block */ 5 91 dcl comp_util_$pop entry (char (32)); 5 92 dcl comp_util_$push 5 93 entry (char (32)); 5 94 dcl comp_util_$relblk 5 95 entry (fixed bin, ptr); 5 96 dcl comp_util_$replace_text 5 97 entry (ptr, bit (1), ptr, ptr); 5 98 dcl comp_util_$search_tree 5 99 entry (char (32), bit (1)); 5 100 dcl comp_util_$set_bin 5 101 entry (fixed bin (31), char (32) var, fixed bin (31), 5 102 fixed bin (31), fixed bin (31), (*) fixed bin (31), 5 103 fixed bin (31)); 5 104 dcl comp_util_$set_net_page 5 105 entry (bit (1)); 5 106 dcl comp_util_$translate 5 107 entry (char (*) var) returns (char (*) var); 5 108 dcl comp_write_block_ 5 109 entry (fixed bin); 5 110 dcl comp_write_page_ 5 111 entry; 5 112 5 113 /* END INCLUDE FILE comp_entries.incl.pl1 */ 482 6 1 /* BEGIN INCLUDE FILE comp_fntstk.incl.pl1 */ 6 2 6 3 /* format: style2,ind2,ll79,dclind4,idind15,comcol41,linecom */ 6 4 6 5 dcl fntstk_eptr ptr; /* font stack entry structure */ 6 6 dcl 1 fntstk_entry aligned based (fntstk_eptr), 6 7 2 bachelor bit (1), /* 1= has no members */ 6 8 2 devfnt fixed bin, /* font in the device */ 6 9 2 fam_name char (32), /* family name */ 6 10 2 famndx fixed bin, /* family index */ 6 11 2 fntptr ptr, /* font table pointer */ 6 12 2 mem_name char (32), /* /member name (or null) */ 6 13 2 memndx fixed bin, /* member index */ 6 14 2 memptr ptr, /* member table pointer */ 6 15 2 name char (65) var, /* font name */ 6 16 2 size fixed bin (31), /* requested point size */ 6 17 2 ps fixed bin (31), /* effective point size */ 6 18 2 fcs_str char (8); /* FCS string */ 6 19 6 20 /* END INCLUDE FILE comp_fntstk.incl.pl1 */ 483 7 1 /* BEGIN INCLUDE FILE comp_font.incl.pl1 */ 7 2 7 3 /* Fonts already loaded into the compose (pdir) database */ 7 4 7 5 /* format: style2,ind2,ll79,dclind4,idind15,comcol41,linecom */ 7 6 7 7 dcl 1 fnttbldata aligned based (const.fnttbldata_ptr), 7 8 2 count fixed bin, /* number of fonts loaded */ 7 9 2 ndx fixed bin, /* index of current font */ 7 10 2 medsel_ptr ptr, /* -> media select table */ 7 11 2 ptr (100) ptr; /* 100 fonts should be plenty! */ 7 12 7 13 dcl fnttbl_ptr ptr init (null); 7 14 dcl 1 fnttbl aligned based (fnttbl_ptr), 7 15 2 min_wsp fixed bin, /* min wordspace - in strokes */ 7 16 2 avg_wsp fixed bin, /* nominal wordspace - in strokes */ 7 17 2 max_wsp fixed bin, /* max wordspace - in strokes */ 7 18 2 rel_units fixed bin, /* stroke value for this font */ 7 19 2 siztbl_ptr ptr, /* -> loaded size table */ 7 20 2 entry /* stack entry for this font */ 7 21 like fntstk_entry, 7 22 ( /* for each font character */ 7 23 2 devfnt fixed bin, /* font in the device */ 7 24 2 replptr ptr, /* replacement string ptrs */ 7 25 2 units fixed bin, /* width in strokes */ 7 26 2 white bit (1) unal /* white space flags */ 7 27 ) dimension (0:511); 7 28 7 29 dcl repl_str_ptr ptr; /* replacement strings */ 7 30 dcl 1 repl_str based (repl_str_ptr), 7 31 2 len fixed bin (35), 7 32 2 str char (256); 7 33 dcl replstr char (256) var based (repl_str_ptr); 7 34 /* media select strings */ 7 35 /* (indexed on fnttbldata.ndx) */ 7 36 dcl medsel (100) char (12) based (fnttbldata.medsel_ptr); 7 37 7 38 dcl 1 siztbl based (fnttbl.siztbl_ptr), 7 39 2 ct fixed bin, /* number of sizes */ 7 40 2 size (siztbl.ct) fixed bin (31); 7 41 7 42 /* This is the storage referred by family.member_r in comp_dvt 7 43* 7 44* If member.count is 1 and member.name(1) is null, then the font is a 7 45* 'bachelor'. 7 46* 7 47* The font stack will hold the family/member names which were used to 7 48* originally get to the font. When a bachelor is accessed, the member name 7 49* will remain but the bachelor flag will be set to tell any displayers not 7 50* to include it. 7 51* 7 52* %FontName% will contain either "family" or "family/member" depending on 7 53* the setting of the bachelor switch. */ 7 54 7 55 dcl member_ptr ptr; 7 56 dcl 1 member based (member_ptr), 7 57 2 count fixed bin, /* # members present */ 7 58 2 e (member.count), /* members defined for this device */ 7 59 3 font_r bit (18) unal, /* font character table relptr */ 7 60 3 size_r bit (18) aligned, 7 61 /* point size list relptr */ 7 62 3 Scalex fixed bin (35), /* X (hor) scaling * 1e8 - FUTURE */ 7 63 3 Scaley fixed bin (35), /* Y (ver) scaling * 1e8 - FUTURE */ 7 64 3 name char (32); /* member name */ 7 65 7 66 /* Storage referred by member.font_r */ 7 67 dcl font_ptr ptr; 7 68 dcl 1 font based (font_ptr), 7 69 ( 2 oput_r, /* offset of output data array */ 7 70 2 units_r /* offset of width array */ 7 71 ) bit (18) aligned, 7 72 2 rel_units fixed bin, /* stroke value for this table */ 7 73 2 footsep char (1), /* footref separator */ 7 74 2 fill char (3), 7 75 2 min_wsp fixed bin, /* min wordspace */ 7 76 2 avg_wsp fixed bin, /* nominal wordspace */ 7 77 2 max_wsp fixed bin; /* max wordspace */ 7 78 7 79 /* storage referred by font.units_r */ 7 80 dcl units_ptr ptr; /* width in strokes */ 7 81 dcl units (0:511) fixed bin based (units_ptr); 7 82 7 83 /* media select table in the device table */ 7 84 dcl medsel_table_ptr 7 85 ptr; 7 86 dcl 1 medsel_table based (medsel_table_ptr), 7 87 2 count fixed bin, 7 88 2 ref_r (medsel_table.count) bit (18) aligned; 7 89 7 90 /* storage referred by font.oput_r */ 7 91 dcl oput_p ptr; 7 92 dcl 1 oput based (oput_p), 7 93 2 data_ct fixed bin, /* highest char defined */ 7 94 2 e (0:oput.data_ct), 7 95 3 which /* index into view array */ 7 96 fixed bin (17) unal, 7 97 3 what_r /* output string */ 7 98 bit (18) unal; 7 99 7 100 /* storage referred by member.size_r */ 7 101 7 102 dcl sizel_p ptr; 7 103 dcl 1 sizel based (sizel_p),/* list of allowed point sizes */ 7 104 2 val_ct fixed bin, 7 105 2 val (sizel.val_ct) fixed bin (31); 7 106 7 107 /* storage referred by oput.what_r */ 7 108 7 109 dcl medchar_sel_p ptr; /* MediaChar select string */ 7 110 dcl 1 medchar_sel based (medchar_sel_p), 7 111 2 str_l fixed bin, 7 112 2 str char (medchar_sel.str_l); 7 113 dcl medchar char (medchar_sel.str_l) var based (medchar_sel_p); 7 114 7 115 dcl med_sel_p ptr; /* media select string */ 7 116 dcl 1 med_sel based (med_sel_p), 7 117 2 str_l fixed bin, 7 118 2 str char (med_sel.str_l); 7 119 7 120 /* END INCLUDE FILE comp_font.incl.pl1 */ 484 8 1 /* BEGIN INCLUDE FILE - comp_metacodes.incl.pl1 */ 8 2 8 3 /* format: style2,ind2,ll79,dclind4,idind25,comcol51,linecom */ 8 4 8 5 /* ASCII control characters */ 8 6 dcl ( 8 7 NUL init (" "), /* 000 */ 8 8 SOH init (""), /* 001 */ 8 9 STX init (""), /* 002 */ 8 10 ETX init (""), /* 003 */ 8 11 EOT init (""), /* 004 */ 8 12 ENQ init (""), /* 005 */ 8 13 ACK init (""), /* 006 */ 8 14 BEL init (""), /* 007 */ 8 15 BSP init (""), /* 010 */ 8 16 HT init (" "), 8 17 /* 011 */ 8 18 (NL, LF) init (" 8 19 "), /* 012 */ 8 20 VT init (""), /* 013 */ 8 21 FF init (""), /* 014 */ 8 22 CR init (" "), /* 015 */ 8 23 (RRS, SO) init (""), /* 016 */ 8 24 (BRS, SI) init (""), /* 017 */ 8 25 DLE init (""), /* 020 */ 8 26 DC1 init (""), /* 021 */ 8 27 (DC2, HLF, HUGE) init (""), /* 022 */ 8 28 DC3 init (""), /* 023 */ 8 29 (DC4, HLR, THICK) init (""), /* 024 */ 8 30 (NAK, MEDIUM) init (""), /* 025 */ 8 31 SYN init (""), /* 026 */ 8 32 (ETB, HAIR) init (""), /* 027 */ 8 33 (CAN, STROKE) init (""), /* 030 */ 8 34 oct031 init (""), /* 031 */ 8 35 SUB init (""), /* 032 */ 8 36 ESC init (""), /* 033 */ 8 37 FS init (""), /* 034 */ 8 38 GS init (""), /* 035 */ 8 39 RS init (""), /* 036 */ 8 40 US init (""), /* 037 */ 8 41 (DEL, PAD) init (""), /* 177 */ 8 42 /* compose meta-characters */ 8 43 multiply init (""), /* 252 - multiply symbol */ 8 44 pl_mi init (""), /* 253 - plus/minus sign */ 8 45 nabla init (""), /* 254 */ 8 46 EMdash init (""), /* 255 - EM dash */ 8 47 slash init (""), /* 256 */ 8 48 dagger init (""), /* 261 */ 8 49 perpen init (""), /* 273 - perpendicular mark */ 8 50 not_eq init (""), /* 275 - not-equal mark */ 8 51 dbldag init (""), /* 301 - double daggar */ 8 52 cright init (""), /* 303 - copyright mark */ 8 53 delta init (""), /* 304 */ 8 54 bullet init (""), /* 315 */ 8 55 prll init (""), /* 316 - parallel mark */ 8 56 PI init (""), /* 320 - uppercase Greek pi */ 8 57 tmark init (""), /* 324 - trademark */ 8 58 tfore init (""), /* 326 - therefore mark */ 8 59 approx init (""), /* 332 - approximately-equal mark */ 8 60 infin init (""), /* 337 - infinity */ 8 61 theta init (""), /* 352 */ 8 62 pi init (""), /* 360 - lowercase Greek pi */ 8 63 square init (""), /* 375 */ 8 64 overbar init (""), /* 376 */ 8 65 PS init (""), /* 377 - punctuation space */ 8 66 sup0 init (" "), /* 400 - superior digit 0 */ 8 67 sup1 init (""), /* 401 - superior digit 1 */ 8 68 sup2 init (""), /* 402 - superior digit 2 */ 8 69 sup3 init (""), /* 403 - superior digit 3 */ 8 70 sup4 init (""), /* 404 - superior digit 4 */ 8 71 sup5 init (""), /* 405 - superior digit 5 */ 8 72 sup6 init (""), /* 406 - superior digit 6 */ 8 73 sup7 init (""), /* 407 - superior digit 7 */ 8 74 sup8 init (""), /* 410 - superior digit 8 */ 8 75 sup9 init (" "), /* 411 - superior digit 9 */ 8 76 EM init (" "), /* 412 - EM space */ 8 77 EM_ init (""), /* 413 - EM aligned dash */ 8 78 EN init (""), /* 414 - EN space */ 8 79 EN_ init (" "), /* 415 - EN aligned dash */ 8 80 ENd init (""), /* 416 - EN dash */ 8 81 THIN init (""), /* 417 - thinspace */ 8 82 DEVIT init (""), /* 420 - device unit */ 8 83 lquote init (""), /* 421 - left double quote */ 8 84 rquote init (""), /* 422 - right double quote */ 8 85 modmark init (""), /* 424 - text modification/addition mark */ 8 86 delmark init (""), /* 430 - deletion mark */ 8 87 vrule init ("Z"), /* 532 - vertical rule */ 8 88 lslnt init ("^") /* 536 - left slant */ 8 89 ) char (1) unaligned static options (constant); 8 90 8 91 /* END INCLUDE FILE comp_metacodes.incl.pl1 */ 485 9 1 /* BEGIN INCLUDE FILE comp_page.incl.pl1 */ 9 2 9 3 /* format: style2,ind2,ll79,dclind4,idind15,comcol41,linecom */ 9 4 9 5 dcl max_image_lines 9 6 fixed static options (constant) init (1000); 9 7 dcl max_cols fixed static options (constant) init (20); 9 8 9 9 dcl page_version fixed bin static options (constant) init (5); 9 10 /* composed page structure */ 9 11 dcl 1 page aligned based (const.page_ptr), 9 12 2 version fixed bin, /* version of this structure */ 9 13 2 parms aligned like page_parms, 9 14 /* page formatting parameters */ 9 15 2 hdr aligned like page_header, 9 16 /* page control stuff */ 9 17 2 image_ptr ptr, /* pointer to the madeup page image */ 9 18 2 column_ptr (0:20) ptr, /* pointers to the column structures */ 9 19 2 col_image_ptr 9 20 (-2:21) ptr; /* pointers to column images */ 9 21 /* col -1 is for line numbers and */ 9 22 /* left margin change bars; */ 9 23 /* col -2 is for */ 9 24 /* right margin change bars */ 9 25 /* and/or annotation * / 9 26* /* page control stuff */ 9 27 dcl 1 page_header aligned based (const.page_header_ptr), 9 28 2 sws, 9 29 3 art bit (1) unal, /* 1 = header/footer art */ 9 30 3 blankpage 9 31 bit (1) unal, /* 1 = intentional blank page */ 9 32 3 frontpage 9 33 bit (1) unal, /* 1 = odd page number */ 9 34 3 headed bit (1) unal, /* 1 = page header has been written */ 9 35 3 modified bit (1) unal, /* 1 = page has been modified */ 9 36 3 overflow bit (1) unal, /* OBSOLETE */ 9 37 3 MBZ bit (12) unal, 9 38 3 dot_addltr 9 39 char (1) unal, /* dot page add letter, if any */ 9 40 3 pgc_select 9 41 char (1) unal, /* for selecting change pages */ 9 42 2 baldepth fixed bin (31), /* page depth at balance point */ 9 43 2 balusd fixed bin (31), /* space used at balance point */ 9 44 2 col_count fixed bin, /* highest value of col_index for the page */ 9 45 2 col_index fixed bin, /* column index */ 9 46 2 depth fixed bin (31), /* current page depth */ 9 47 2 hdspc fixed bin (31), /* TOP white space */ 9 48 2 lmarg fixed bin (31), /* left margin for this page */ 9 49 2 net fixed bin (31), /* net usable space on the page */ 9 50 2 pageno char (32) var, /* current page number */ 9 51 2 used fixed bin (31); /* space already used on the page */ 9 52 9 53 dcl page_image_version 9 54 fixed bin (35) static options (constant) init (2); 9 55 /* structure passed to writers */ 9 56 dcl 1 page_image aligned based (page.image_ptr), 9 57 2 version fixed bin (35), /* structure version no */ 9 58 2 count fixed bin, /* count of page image lines */ 9 59 2 file_id char (32) var, /* compout identifier */ 9 60 2 func fixed bin, /* function code; 0 = build, 9 61* 1 = intialize, 2 = cleanup */ 9 62 2 text_ptr ptr, /* pointer to the text area */ 9 63 /* the image lines */ 9 64 2 line (max_image_lines), 9 65 3 sws, 9 66 4 quad bit (6) unal, /* text set position flags */ 9 67 4 art bit (1) unal, /* 1 = artwork in the line */ 9 68 4 cbar bit (1) unal, /* 1= line has a cbar, dont erase */ 9 69 4 mrgtxt bit (1) unal, /* line number or marginal note */ 9 70 4 white bit (1) unal, /* line is white */ 9 71 4 MBZ bit (26) unal, 9 72 3 depth fixed bin (31), /* page depth for the text */ 9 73 3 gaps fixed bin, /* number of WS gaps in the line */ 9 74 3 info like text_entry.info, 9 75 /* input file info */ 9 76 3 lead fixed bin (31), /* lead value if trailing WS */ 9 77 3 lfnt fixed bin, /* font at the left margin */ 9 78 3 lmarg fixed bin (31), /* text left margin position */ 9 79 3 lsize fixed bin (31), /* pointsize at the left margin */ 9 80 3 net fixed bin (31), /* net width for filling */ 9 81 3 pos fixed bin (31), /* current horiz position */ 9 82 3 ptr ptr, /* pointer to the text */ 9 83 3 rmarg fixed bin (31), /* text right margin position */ 9 84 3 width fixed bin (31); /* width of the text */ 9 85 /* current page formatting parms */ 9 86 dcl 1 page_parms aligned based (const.page_parms_ptr), 9 87 2 init_page_depth 9 88 fixed bin (31), /* initial page depth */ 9 89 2 length fixed bin (31), /* page length */ 9 90 2 lmarg, /* page left margin */ 9 91 3 even fixed bin (31), 9 92 3 odd fixed bin (31), 9 93 2 margin, /* margin values */ 9 94 3 top fixed bin (31), 9 95 3 header fixed bin (31), 9 96 3 footer fixed bin (31), 9 97 3 bottom fixed bin (31), 9 98 2 measure fixed bin (31), /* line space available for text */ 9 99 2 net, /* net usable space on page */ 9 100 3 even fixed bin (31), /* even pages */ 9 101 3 odd fixed bin (31), /* odd pages */ 9 102 /* arrays at the end */ 9 103 2 cols, /* columns defined for the page */ 9 104 3 bal bit (1) unal, /* column balancing control flag */ 9 105 3 MBZ bit (17) unal, 9 106 3 count fixed bin unal; /* the number of columns */ 9 107 /* default page formatting parms */ 9 108 dcl 1 init_page_parms 9 109 aligned like page_parms 9 110 based (const.init_page_parms_ptr); 9 111 9 112 /* END INCLUDE FILE comp_page.incl.pl1 */ 486 10 1 /* BEGIN INCLUDE FILE comp_shared.incl.pl1 */ 10 2 10 3 /* format: style2,ind2,ll79,dclind4,idind15,comcol41,linecom */ 10 4 10 5 dcl shared_version fixed bin (35) static options (constant) init (17); 10 6 10 7 dcl 1 shared aligned based (const.shared_ptr), 10 8 2 version fixed bin (35), /* version of this structure */ 10 9 2 chars, 10 10 ( 3 sym_delim, /* delimiter for symbols */ 10 11 3 ttl_delim, /* delimiter for title parts */ 10 12 3 wrd_brkr /* word break character */ 10 13 ) char (1) unal, 10 14 3 PAD char (1) unal, 10 15 2 cbar_type char (4) var, /* change bar type */ 10 16 2 dot_add_letter /* dot page add letter */ 10 17 char (1) var, 10 18 2 EN_width fixed bin (31), /* width of EN in current font */ 10 19 2 eqn_refct fixed bin, /* equation reference counter */ 10 20 2 footref_fcs /* footnote ref FCS string */ 10 21 char (8) aligned, 10 22 2 ftn_reset char (8) var, /* footnote reset mode */ 10 23 2 ftnrefct fixed bin, /* footnote ref counter */ 10 24 2 hyph_size fixed bin (31), /* least word part size for hyphing */ 10 25 2 if_nest, /* if/then/else logic control */ 10 26 3 ndx fixed bin, /* depth of logic nest */ 10 27 3 e (25), /* nest entries */ 10 28 /* .if control switch */ 10 29 4 sw fixed bin, /* 0=off, 1=(then), -1=(else) */ 10 30 4 info aligned like text_entry.info, 10 31 4 line char (256) var, /* the control line */ 10 32 2 indctl, /* indent ctls stack */ 10 33 3 ndx fixed bin, /* current level */ 10 34 /* switch bits */ 10 35 3 stk (0:35) bit (1) unal, 10 36 2 input_dirname 10 37 char (168) var, /* dir containing current input file */ 10 38 2 input_filename 10 39 char (200) var, /* current input file name */ 10 40 2 lead fixed bin (31), /* current linespacing value */ 10 41 2 lit_count fixed bin (35), /* count of literal lines */ 10 42 2 next_pagenmbr 10 43 char (32) var, /* next page number / */ 10 44 2 output_file 10 45 char (32) var, /* output file identifier */ 10 46 2 pagecount fixed bin, /* number of pages produced */ 10 47 2 pagenum, /* page number structure */ 10 48 3 index fixed bin, /* level currently counting */ 10 49 ( 10 50 3 sep char (1) unal, /* separator chars */ 10 51 3 nmbr fixed bin (31), /* the counters */ 10 52 3 mode /* display modes */ 10 53 fixed bin (8) unal 10 54 ) dimension (20), 10 55 2 parameter char (254) var, /* command line parameter */ 10 56 2 param_pres bit (1), /* passed parameter flag */ 10 57 2 pass_counter 10 58 fixed bin, /* pass counter */ 10 59 2 picture, /* picture blocks */ 10 60 3 count fixed bin, /* number of them */ 10 61 3 space fixed bin (31), /* total picture space */ 10 62 3 blk (10), /* picture blocks */ 10 63 4 type char (4), /* type = page/col */ 10 64 4 place char (4), /* place = top/cen/bot */ 10 65 4 ptr ptr, /* pointer to block */ 10 66 4 size fixed bin (31), /* size of the picture */ 10 67 2 ptrs, 10 68 ( 3 aux_file_data_ptr, /* -> auxiliary file data */ 10 69 3 blank_footer_ptr, /* -> blank page footer */ 10 70 3 blank_header_ptr, /* -> blank page header */ 10 71 3 blank_text_ptr, /* -> blank page text */ 10 72 3 blkptr, /* -> active text */ 10 73 3 colptr, /* current column */ 10 74 3 compout_ptr, /* iocb pointer for output */ 10 75 3 compx_ptr, /* iocb pointer for compx file */ 10 76 3 ctb_ptr, /* current line artwork table */ 10 77 3 epftrptr, /* even page footer block */ 10 78 3 ephdrptr, /* even page header block */ 10 79 3 fcb_ptr, /* input file control block pointer */ 10 80 3 ftnblk_data_ptr, /* footnote block data pointer */ 10 81 3 footnote_header_ptr, /* footnote header "title" */ 10 82 3 graphic_page_ptr, /* graphic output page */ 10 83 3 hit_data_ptr, /* hit data pointer */ 10 84 3 htab_ptr, /* horizontal tab tables */ 10 85 3 hwrd_data_ptr, /* local hyphenation table */ 10 86 3 insert_ptr, /* data entry for current input file */ 10 87 3 opftrptr, /* odd page footer block */ 10 88 3 ophdrptr, /* odd page header block */ 10 89 3 ptb_ptr, /* previous line artwork table */ 10 90 3 spcl_blkptr, /* "special" block pointer */ 10 91 3 tbldata_ptr, /* table column data structure */ 10 92 3 tblkdata_ptr, /* text block data array */ 10 93 3 text_header_ptr /* empty text header structure */ 10 94 ) ptr, 10 95 2 scale, /* space conversion scale factors */ 10 96 3 horz fixed bin (31), /* horizontal */ 10 97 3 vert fixed bin (31), /* vertical */ 10 98 2 source_filename 10 99 char (200) var, /* current source file name */ 10 100 2 sws, /* switch bits */ 10 101 ( 3 bug_mode, /* debug mode */ 10 102 3 compout_not_headed, /* compout is not headed */ 10 103 3 end_input, /* EOF for current input file */ 10 104 3 end_output, /* no more output is wanted */ 10 105 3 firstpass, /* first pass over input */ 10 106 3 ftn_mode, /* in footnote mode */ 10 107 3 hyph_mode, /* hyphenating mode */ 10 108 3 inserting_hfc, /* inserting hdr, ftr, or cap */ 10 109 3 literal_mode, /* literal line mode flag */ 10 110 3 pageblock, /* blocks belong to page */ 10 111 3 picture_mode, /* building a picture */ 10 112 3 print_flag, /* producing output */ 10 113 3 purge_ftns, /* purging footnotes */ 10 114 3 suppress_footref, /* suppress next footnote ref */ 10 115 3 table_mode /* table mode */ 10 116 ) bit (1) unal, 10 117 3 MBZ bit (21) unal, 10 118 2 trans, /* trans table for .tr */ 10 119 3 in char (128) var, /* input chars */ 10 120 3 out char (128) var, /* output chars */ 10 121 2 widow_size fixed bin (31), /* widow size */ 10 122 2 widow_foot fixed bin (31); /* widow for footnotes */ 10 123 /* to save shared data between files/passes */ 10 124 dcl 1 save_shared aligned like shared based (const.save_shared_ptr); 10 125 10 126 dcl dot_addltr_symb_index 10 127 fixed bin static options (constant) init (12); 10 128 dcl max_text_lines fixed bin static options (constant) init (1000); 10 129 dcl mode_string char (16) static options (constant) 10 130 init ("arbihxocalaurlru"); 10 131 /* value overlays */ 10 132 dcl flag_value bit (1) based; 10 133 dcl num_value fixed bin (31) based; 10 134 10 135 /* END INCLUDE FILE comp_shared.incl.pl1 */ 487 11 1 /* BEGIN INCLUDE FILE comp_table.incl.pl1 */ 11 2 11 3 /* format: style2,ind3,ll79,dclind4,idind15,comcol41,linecom */ 11 4 11 5 dcl 1 tbldata aligned based (shared.tbldata_ptr), 11 6 2 ct fixed bin, /* number of active table formats */ 11 7 2 ndx fixed bin, /* index of current active format */ 11 8 2 fmt (20), /* the format */ 11 9 3 name char (32) var, /* name of the format */ 11 10 3 ptr ptr; /* pointer to the format data */ 11 11 11 12 dcl tblfmtndx fixed bin; /* current table format index */ 11 13 dcl tblfmtptr ptr; /* -> current table format */ 11 14 /* table format data */ 11 15 dcl 1 tblfmt aligned based (tblfmtptr), 11 16 2 context bit (1), /* =1 if context mode */ 11 17 2 ccol fixed bin, /* the current table column */ 11 18 2 maxdepth fixed bin (31), /* max depth in table */ 11 19 2 ncols fixed bin, /* number of columns in this format */ 11 20 2 colptr (0:20) ptr; /* pointers to the columns */ 11 21 11 22 dcl tblcolndx fixed bin; /* current table column index */ 11 23 /* -> current table column */ 11 24 dcl tblcolptr ptr init (null ()); 11 25 /* table column data */ 11 26 dcl 1 tblcol aligned based (tblcolptr), 11 27 2 align, /* column alignment mode */ 11 28 3 posn fixed bin (31), 11 29 3 str char (32) var, 11 30 2 depth fixed bin (31), /* current depth for column */ 11 31 2 gutter fixed bin (31), 11 32 2 leader char (16) var, /* leadering string */ 11 33 2 margin, 11 34 3 left fixed bin (31), 11 35 3 right fixed bin (31), 11 36 2 valign bit (4) unal, /* vertical alignment flags */ 11 37 2 MBZ bit (29) unal, 11 38 2 parms /* parms for columns */ 11 39 aligned like default_parms; 11 40 11 41 dcl 1 tblcol0 aligned like tblcol based (tblfmt.colptr (0)); 11 42 /* -> previous table column */ 11 43 dcl prvtblcolptr ptr init (null ()); 11 44 dcl 1 prvtblcol like tblcol aligned based (prvtblcolptr); 11 45 11 46 dcl vtop bit (4) static options (constant) init ("1000"b); 11 47 dcl vcen bit (4) static options (constant) init ("0100"b); 11 48 dcl vbot bit (4) static options (constant) init ("0010"b); 11 49 dcl vjust bit (4) static options (constant) init ("0001"b); 11 50 11 51 /* END INCLUDE FILE comp_table.incl.pl1 */ 488 12 1 /* BEGIN INCLUDE FILE comp_text.incl.pl1 */ 12 2 12 3 /* format: style2,ind2,ll79,dclind4,idind15,comcol41,linecom */ 12 4 12 5 dcl 1 tblkdata /* data for allocated text blocks */ 12 6 aligned based (shared.tblkdata_ptr), 12 7 2 block, /* block pool */ 12 8 3 count fixed bin, 12 9 3 ptr (500) ptr, /* block pointers */ 12 10 /* block state flags */ 12 11 3 free (500) bit (1) unal, 12 12 2 line_area, /* line area pool */ 12 13 3 count fixed bin, 12 14 3 ptr (500) ptr, /* area pointers */ 12 15 /* area state flags */ 12 16 3 free (500) bit (1) unal, 12 17 2 text_area, /* text area pool */ 12 18 3 count fixed bin, 12 19 3 ptr (500) ptr, /* area pointers */ 12 20 /* area state flags */ 12 21 3 free (500) bit (1) unal, 12 22 3 string_area_count 12 23 fixed bin; /* line areas */ 12 24 dcl LINE_AREA_SIZE fixed bin static options (constant) init (24); 12 25 dcl line_area_ptr ptr init (null); 12 26 dcl 1 line_area aligned based (line_area_ptr), 12 27 2 next ptr, /* forward thread */ 12 28 2 prev ptr, /* backward thread */ 12 29 2 count fixed bin, /* number of lines allocated */ 12 30 2 ndx fixed bin, /* index of current line */ 12 31 2 pndx fixed bin, /* area pool index */ 12 32 2 linptr (LINE_AREA_SIZE) ptr; 12 33 /* text areas */ 12 34 dcl TEXT_AREA_SIZE fixed bin static options (constant) init (6); 12 35 dcl text_area_ptr ptr init (null); 12 36 dcl 1 text_area aligned based (text_area_ptr), 12 37 2 next ptr, /* forward thread */ 12 38 2 count fixed bin, /* number of areas allocated */ 12 39 2 ndx fixed bin, /* index of current strarea */ 12 40 2 pndx fixed bin, /* area pool index */ 12 41 2 strareaptr (TEXT_AREA_SIZE) ptr; 12 42 /* text string area */ 12 43 dcl string_area (256) fixed bin based; 12 44 dcl txtstrptr ptr; /* current text string */ 12 45 dcl txtstr char (1020) var based (txtstrptr); 12 46 12 47 dcl TEXT_VERSION fixed bin static options (constant) init (9); 12 48 /* general text block */ 12 49 dcl 1 text aligned based (shared.blkptr), 12 50 2 version fixed bin, /* version of structure */ 12 51 2 blkndx fixed bin, /* block data index */ 12 52 2 blktype char (2), /* block type code */ 12 53 /* dynamic block control stuff */ 12 54 2 hdr aligned like text_header, 12 55 /* text read from input file */ 12 56 2 input aligned like text_entry, 12 57 2 input_line char (1020) var,/* input buffer */ 12 58 2 line_area, 12 59 3 first ptr, /* head of line area thread */ 12 60 3 cur ptr, /* current line area */ 12 61 2 next_text ptr, /* next text string */ 12 62 /* text formatting parameters */ 12 63 2 parms aligned like default_parms, 12 64 2 text_area, 12 65 3 first ptr, /* head of text area thread */ 12 66 3 cur ptr; /* current text area */ 12 67 /* an empty text block line */ 12 68 dcl 1 text_entry aligned based (const.text_entry_ptr), 12 69 2 sws, /* unaligned switches, etc. */ 12 70 3 art bit (1) unal, /* line has artwork */ 12 71 3 cbar, /* change bar flags */ 12 72 4 add bit (1) unal, /* text addition flag */ 12 73 4 del bit (1) unal, /* text deletion flag */ 12 74 4 mod bit (1) unal, /* text modification flag */ 12 75 3 default bit (1) unal, /* 1 = default case as needed */ 12 76 3 DVctl bit (1) unal, /* 1 = line is a device ctl string */ 12 77 3 embedded bit (1) unal, /* 1 = line has an embedded control */ 12 78 3 end_keep bit (1) unal, /* 1= line ends a keep */ 12 79 3 fnt_chng bit (1) unal, /* 1 = text is a font change string */ 12 80 3 footref bit (1) unal, /* 1 = line has a footnote reference */ 12 81 3 hanging bit (1) unal, /* 1 = a hanging undent */ 12 82 3 keep bit (1) unal, /* 1 = unsplittable line */ 12 83 3 no_trim bit (1) unal, /* 1 = untrimmable white line */ 12 84 3 oflo bit (1) unal, /* line causes overflow */ 12 85 3 punct bit (1) unal, /* 1 = line ends with punctuation */ 12 86 3 quad bit (6) unal, /* text alignment flags */ 12 87 3 space_added /* 1= line has added space */ 12 88 bit (1) unal, 12 89 3 spcl, /* special entry - not output text */ 12 90 4 file bit (1) unal, /* 1= output to special file */ 12 91 4 blk_splt /* 1= action at block split time */ 12 92 bit (1) unal, 12 93 4 page_mkup /* 1= action at page makeup time */ 12 94 bit (1) unal, 12 95 3 table bit (1) unal, /* 1= line is a table entry */ 12 96 3 tblspc bit (1) unal, /* 1= WS fill for table mode */ 12 97 3 title bit (1) unal, /* 1= line is a