home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume38 / lout / part29 < prev    next >
Encoding:
Text File  |  1993-08-11  |  73.3 KB  |  1,880 lines

  1. Newsgroups: comp.sources.misc
  2. From: jeff@joyce.cs.su.oz.au (Jeff Kingston)
  3. Subject: v38i097:  lout - Lout document formatting system, v2.05, Part29/35
  4. Message-ID: <1993Aug10.132231.18861@sparky.sterling.com>
  5. X-Md4-Signature: e81424ff486e33443f0e43cad93dd8e0
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Tue, 10 Aug 1993 13:22:31 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: jeff@joyce.cs.su.oz.au (Jeff Kingston)
  12. Posting-number: Volume 38, Issue 97
  13. Archive-name: lout/part29
  14. Environment: UNIX
  15. Supersedes: lout: Volume 37, Issue 99-128
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then feed it
  19. # into a shell via "sh file" or similar.  To overwrite existing files,
  20. # type "sh file -c".
  21. # Contents:  doc/tr.begin/s14 doc/tr.impl/s5.1 doc/tr.lout/ch1.02
  22. #   doc/tr.lout/setup font/ZapfDin.AFM z07.c z11.c z30.c
  23. # Wrapped by kent@sparky on Sun Aug  8 12:29:32 1993
  24. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  25. echo If this archive is complete, you will see the following message:
  26. echo '          "shar: End of archive 29 (of 35)."'
  27. if test -f 'doc/tr.begin/s14' -a "${1}" != "-c" ; then 
  28.   echo shar: Will not clobber existing file \"'doc/tr.begin/s14'\"
  29. else
  30.   echo shar: Extracting \"'doc/tr.begin/s14'\" \(9025 characters\)
  31.   sed "s/^X//" >'doc/tr.begin/s14' <<'END_OF_FILE'
  32. X@Section
  33. X   @Tag { booklayout }
  34. X   @Title { Books }
  35. X@Begin
  36. X@PP
  37. XThe DocumentLayout package may also be used to produce books.  Type
  38. X@Code "-ibook" in the Unix command instead of {@Code "-idoc"} to use the
  39. Xpackage in this way.
  40. X@PP
  41. XA book begins with a @Code "@Book" symbol:
  42. X@ID @Code {
  43. X"@Book"
  44. X"    @Title {}"
  45. X"    @Author {}"
  46. X"    @Edition {}"
  47. X"    @Publisher {}"
  48. X"    @InitialFont { Times Roman 12p }"
  49. X"    @InitialBreak { adjust 1.2fx }"
  50. X"    @Hyphenate { Yes }"
  51. X"//"
  52. X}
  53. XThe first four options are printed on the title page, the first three
  54. Xusing {@Code "clines @Break"} (see page {@PageOf clines}).  There are no
  55. X{@Code "@Columns"}, {@Code "@PageNumbers"}, or {@Code "@FirstPageNumber"}
  56. Xoptions.  The last three options are as for @Code "@Document" and
  57. X{@Code "@Report"}.  Disaster will ensue if the @Code "//" is omitted.
  58. X@PP
  59. XNext comes an optional preface:
  60. X@ID @Code {
  61. X"@Preface"
  62. X"    @Tag { preface }"
  63. X"    @Title { About this book }"
  64. X"@Begin"
  65. X"@PP"
  66. X"..."
  67. X"@End @Preface"
  68. X}
  69. XSince the title of most prefaces is simply Preface, this is the default
  70. Xvalue of the @Code "@Title" option.  After the preface, BookLayout will
  71. Xproduce a table of contents listing the introduction, chapters,
  72. Xsections, subsections, appendices, biblio&-graphy, and index as
  73. Xappropriate.
  74. X@PP
  75. XThe pages up to this point will be numbered in lower case Roman
  76. Xnumerals; subsequent pages will be numbered in Arabic starting from 1.
  77. X@PP
  78. XNext comes an optional introduction, in exactly the same style as the
  79. Xpreface except that @Code "@Introduction" replaces @Code "@Preface" and
  80. Xthe default title is Introduction.  After that comes a sequence of chapters
  81. Xin the usual style:
  82. X@ID @Code {
  83. X"@Chapter"
  84. X"    @Title { Principles }"
  85. X"    @Tag { principles }"
  86. X"@Begin"
  87. X"@PP"
  88. X"..."
  89. X"@End @Chapter"
  90. X}
  91. XNo @Code "@BeginChapters" or @Code "@EndChapters" symbols are
  92. Xneeded.  Within a chapter, there may be a sequence of sections,
  93. Xeach introduced by @Code "@Section" in the usual way, all bracketed
  94. Xby @Code "@BeginSections" and {@Code "@EndSections"}.  Within each
  95. Xsection there may be subsections, each introduced by {@Code "@SubSection"},
  96. Xand the sequence as a whole bracketed by @Code "@BeginSubSections" and
  97. X{@Code "@EndSubSections"}.  The first subsection of the first section of the
  98. Xfirst chapter will be numbered 1.1.1, and so on.  There are no sub-subsections.
  99. X@PP
  100. XFinally there is opportunity for a sequence of appendices, each
  101. Xintroduced by @Code "@Appendix" in the usual way.  No
  102. X@Code "@BeginAppendices" or @Code "@EndAppendices" symbols are
  103. Xneeded.  The appendices are numbered A, B, C, etc., and there
  104. Xare sub-appendices, obtained in the usual way.
  105. X@PP
  106. XEach symbol with a @Code "@Title" option also has a @Code "@RunningTitle"
  107. Xoption.  The more important parts of the book (preface, introduction,
  108. Xchapters, and appendices) have their @Code "@RunningTitle" printed at
  109. Xthe top of each even-numbered page; if omitted, the @Code "@Title" option
  110. Xis used instead.
  111. X@PP
  112. XWith Basser Lout, a long document is best broken into a sequence of files,
  113. Xeach containing one section, from @Code "@Section" to @Code "@End @Section"
  114. Xinclusive.  Other files are needed for the beginning of each chapter,
  115. Xfrom @Code "@Chapter" to {@Code "@BeginSections"}, and for the end of
  116. Xeach chapter, that is the final @Code "@EndSections" and
  117. X{@Code "@End @Chapter"}.  On the Unix operating system a good scheme for
  118. Xnaming these files is
  119. X@ID lines @Break {
  120. X@Code ch0.00     @Code "@Book" ... @Code "//"
  121. X@Code ch0.01     Preface
  122. X@Code ch0.02     Introduction
  123. X@Code ch1.00     Beginning of Chapter 1
  124. X@Code ch1.01     Section 1.1
  125. X@Code ch1.02     Section 1.2
  126. X. . .
  127. X@Code ch1.99     End of Chapter 1
  128. X@Code ch2.00     Beginning of Chapter 2
  129. X@Code ch2.01     Section 2.1
  130. X@Code ch2.02     Section 2.2
  131. X. . .
  132. X@Code ch2.99     End of Chapter 2
  133. X}
  134. Xand so on.  Then the Unix command
  135. X@ID @Code "lout -ibook ch0.00 ch3.??"
  136. Xwill format Chapter 3 only; and
  137. X@ID @Code "lout -ibook ch?.??"
  138. Xwill format the entire book.  The whole book must be formatted by one
  139. Xcommand to get the page numbers right, but there is no need to do
  140. Xthis until everything is perfect.
  141. X@PP
  142. XThe symbols described in Sections 1--7 above are all available as
  143. Xusual.  The numbering of figures and tables includes a chapter or
  144. Xappendix number:  the first figure of Appendix A will be numbered A.1,
  145. Xand so on.  Figures and tables within the preface and introduction are
  146. Xnumbered 1, 2, 3, etc.  When figures and tables appear near the end of
  147. Xa chapter, the following page on which they appear may also be the first
  148. Xpage of the next chapter, which looks very poor.  The solution is to move
  149. Xthe figure or table to an earlier point in the chapter.
  150. X@PP
  151. XFigures and tables work in a slightly different way to previously, owing
  152. Xto the need to attach a chapter or appendix number to each one.  The
  153. Xfirst figure of each chapter or appendix must be preceded by
  154. X{@Code "@BeginFigures"}, and the last figure of each chapter or appendix
  155. Xmust be followed by {@Code "@EndFigures"}.  These symbols must also bracket
  156. Xfigures in the preface and introduction.  The symbols are not required
  157. Xwhen there are no figures.  Similarly, {@Code "@BeginTables"} and
  158. X{@Code "@EndTables"} must bracket tables.
  159. X@PP
  160. XCross referencing works as described in Section {@NumberOf cross};
  161. X@Code "@Tag" options may be given to the preface, introduction,
  162. Xchapters, sections, subsections, appendices, and sub-appendices.
  163. X@PP
  164. XReferences work as described in Section {@NumberOf refs}, except
  165. Xthat @Code "@ReferenceSection" is added automatically as needed.  A variant of
  166. Xthe @Code "@Ref" symbol called @Code "@ChapRef" is provided, which
  167. Xcauses the reference to appear at the end of the current preface,
  168. Xintroduction, chapter, or appendix, rather than at the end of the book.
  169. X@PP
  170. XAlso available are symbols for making an index.  To
  171. Xadd an entry to the index, place
  172. X@ID @Code "packages @Index { Packages }"
  173. Xfor example at the relevant point.  The result will be something like
  174. X@ID { Packages, 27 }
  175. Xappearing in the index in the alphabetical position determined by the
  176. Xleft parameter, which should be a juxtaposition of simple words composed,
  177. Xby convention, of lower-case letters and periods only.
  178. X@PP
  179. XA variant called @Code "@SubIndex" provides a small indent, as is
  180. Xconventional for sub-entries in indexes.  For example,
  181. X@ID @Code {
  182. X"package  @Index  { Packages }"
  183. X"package.r @SubIndex {ReportLayout}"
  184. X"package.b @SubIndex {BookLayout}"
  185. X}
  186. Xscattered through a document will produce something like
  187. X@ID lines @Break {
  188. XPackages, 27
  189. X   BookLayout, 45
  190. X   ReportLayout, 40
  191. X}
  192. XNote how the left parameters have been carefully chosen to produce the
  193. Xcorrect ordering.  There is also a @Code "@SubSubIndex" symbol with a
  194. Xdouble indent.
  195. X@PP
  196. XThese symbols attach one page number to each entry.  Although the best
  197. Xauthorities recommend exactly this, many authors choose to have entries
  198. Xlike
  199. X@ID { Fourier Transform, 576, 583--593 }
  200. Xdespite the inconvenience to their readers.  {@Code "@RawIndex"},
  201. X{@Code "@RawSubIndex"}, and {@Code "@RawSubSubIndex"}
  202. Xsymbols are provided which do not add page numbers to the entry, leaving
  203. Xthis to the user.  For example, one systematic way to get page number
  204. Xranges is to place
  205. X@ID @Code {
  206. X"packages @RawIndex {"
  207. X"    Packages, {@PageOf packages}"
  208. X"    -- {@PageOf packages.end}"
  209. X"}"
  210. X}
  211. Xat the start of the range, and
  212. X@ID @Code {
  213. X"{@PageMark packages.end}"
  214. X}
  215. Xat the end of the range.  This works because all six index symbols
  216. Xinclude a @Code "@PageMark" operation.  Incidentally, this means that
  217. Xindex tags should be different from chapter and other tags.
  218. X@PP
  219. XAnother use for @Code "@RawIndex" is to get blank lines into the index
  220. Xbetween the letters of the alphabet, by inserting phantom entries:
  221. X@ID @Code {
  222. X"b @RawIndex {}"
  223. X"c @RawIndex {}"
  224. X"..."
  225. X"z @RawIndex {}"
  226. X}
  227. XIn fact there is a symbol called @Code "@IndexBlanks" which creates
  228. Xexactly these 25 entries.  Unfortunately, these blanks will occasionally
  229. Xappear at the top of a column, and if there are no entries beginning with
  230. Xx, for example, there will be two blank lines between the w and y
  231. Xentries.  The careful user can start off with @Code "@IndexBlanks" and
  232. Xreplace it later by the appropriate subset.
  233. X@FootNote {
  234. XFor Lout to solve this problem automatically, it would need to be told
  235. Xwhich letter each index entry belongs under, perhaps by symbols
  236. X{@Code "@AIndex"}, {@Code "@BIndex"}, etc.  The author
  237. Xfelt that this would have been too tedious.
  238. X}
  239. X@PP
  240. XOwing to problems behind the scenes, the Index heading will be printed,
  241. Xand an entry will be made in the table of contents, even if there are no
  242. Xentries in the index.  To prevent this, you will need to change the
  243. X@Code "@MakeIndex" option in the @Code book setup file to {@Code "No"},
  244. Xusing the method described in the following section.
  245. X@PP
  246. XAlthough the page numbers in index entries will be kept up to date
  247. Xautomatically as the document changes, as all cross references are, 
  248. Xthe user is recommended to refrain from inserting index entries until
  249. Xthe book is complete and an overall plan of the structure of the index
  250. Xcan be made.
  251. X@End @Section
  252. END_OF_FILE
  253.   if test 9025 -ne `wc -c <'doc/tr.begin/s14'`; then
  254.     echo shar: \"'doc/tr.begin/s14'\" unpacked with wrong size!
  255.   fi
  256.   # end of 'doc/tr.begin/s14'
  257. fi
  258. if test -f 'doc/tr.impl/s5.1' -a "${1}" != "-c" ; then 
  259.   echo shar: Will not clobber existing file \"'doc/tr.impl/s5.1'\"
  260. else
  261.   echo shar: Extracting \"'doc/tr.impl/s5.1'\" \(6118 characters\)
  262.   sed "s/^X//" >'doc/tr.impl/s5.1' <<'END_OF_FILE'
  263. X@SubSection
  264. X    @Tag { galleys }
  265. X    @Title { The galley abstraction }
  266. X@Begin
  267. X@PP
  268. XLet us take the footnote as a representative example.  At some point in
  269. Xthe document, we wish to write
  270. X@ID @Code {
  271. X"preceding text"
  272. X"@FootNote { footnote text }"
  273. X"following text"
  274. X}
  275. Xand we expect the formatter to remove the footnote from this context and
  276. Xplace it at the bottom of the current page, possibly splitting some or
  277. Xall of it onto a following page if space is insufficient.
  278. X@PP
  279. XAn object appears in the final document at the point it is invoked, but
  280. Xthis basic property does not hold for footnotes:  the point of
  281. Xinvocation and the point of appearance are different.  In some way, the
  282. Xfootnote is attached to the document at both points, introducing a cross
  283. Xlinking (Section {@NumberOf genesis}) that cannot be described in purely
  284. Xfunctional terms.
  285. X@PP
  286. XSince the interpretation of any object depends on an environment and
  287. Xstyle inherited from the context, the first question must be whether
  288. Xthe footnote inherits them through the invocation point or through
  289. Xthe point(s) of appearance.
  290. X@PP
  291. XIf symbols are to be interpreted statically as heretofore, then environments
  292. Xmust be inherited through the invocation point alone.  Dynamic inheritance
  293. Xthrough the point of appearance is enticing in some ways:  it might
  294. Xreplace the body parameter, and it might help with automatic numbering,
  295. Xsince the number of a footnote is known only at the point of appearance;
  296. Xbut the implementation problems are severe, and static inheritance seems
  297. Xmuch simpler and more comprehensible to the user.  Style, at least its
  298. Xavailable width and height part, must of necessity be inherited through
  299. Xthe point of appearance.  For consistency, the entire style should be
  300. Xinherited in this way.  There is a suggestive analogy here with actual
  301. Xparameters, which have a point of invocation from which they inherit an
  302. Xenvironment, and a point of appearance within the body of the enclosing
  303. Xdefinition, from which they inherit a style.  It may be possible to treat
  304. Xa footnote as the actual parameter of some symbol, therefore, although
  305. Xthe details seem very obscure.
  306. X@PP
  307. XBut the most profound consequence of having two types of attachment
  308. Xpoint is that it leads to two distinctive tree structures.  Considering
  309. Xinvocation points only leads to static trees like this one:
  310. X@ID @I @Fig margin { 0.3c } { @Tree {
  311. X@Node @Ellipse { body text }
  312. X@LeftSub { @Node @Ellipse footnote }
  313. X@RightSub {
  314. X   @Node @Ellipse figure
  315. X   @FirstSub { @Node @Ellipse footnote }
  316. X}
  317. X}}
  318. Xwhich shows that the body text contains a footnote and a figure, the
  319. Xlatter itself containing a footnote.  Considering points of appearance
  320. Xonly gives a completely different, dynamic tree:
  321. X@ID @I @Fig margin { 0.3c } { @Tree {
  322. X@Node @Ellipse { sequence of pages }
  323. X@FirstSub { @Node @Ellipse { body text } }
  324. X@NextSub  { @Node @Ellipse { footnote  } }
  325. X@NextSub  { @Node @Ellipse { figure    } }
  326. X@NextSub  { @Node @Ellipse { footnote  } }
  327. X}}
  328. XThe tree can be deeper, for example with sections appearing within
  329. Xchapters which appear within the body text, which appears within the
  330. Xfinal sequence of pages.  Document formatting languages generally shirk
  331. Xthe issues raised by this dual tree structure, by making the dynamic
  332. Xtree built-in, by limiting one or both trees to two levels, and so on,
  333. Xproviding a classic example of the impoverishing effect of failing to
  334. Xpermit language features to attain their natural level of generality.
  335. X@PP
  336. XWe are thus led to propose a second abstraction for document formatting,
  337. Xwhich we name the @I galley in recognition of its similarity to the
  338. Xgalleys used in manual typesetting.  A galley consists of an object (such
  339. Xas a footnote) together with a sequence of places where that object may
  340. Xappear (such as the bottoms of the current and following pages).  Splitting
  341. Xoccurs quite naturally when space at any place is insufficient to hold
  342. Xthe entire object.
  343. X@PP
  344. XIn Lout, a footnote galley and its place of appearance are defined
  345. Xas follows:
  346. X@ID @Code {
  347. X"def @FootPlace { @Galley }"
  348. X""
  349. X"def @FootNote into { @FootPlace&&following }"
  350. X"    right x"
  351. X"{ x }"
  352. X}
  353. XThe @Code "@FootPlace" symbol contains the special symbol {@Code "@Galley"},
  354. Xindicating that it is a point of appearance for a galley.  By placing
  355. Xinvocations of @Code "@FootPlace" at the bottoms of pages, as in Section
  356. X{@NumberOf recursion}, we define the desired points of appearance for
  357. Xfootnotes.  Symbols whose body contains @Code "@Galley" either directly
  358. Xor indirectly are called receptive symbols, meaning receptive to
  359. Xgalleys, and they are expanded only on demand.  The effect of the
  360. X@Code "into" clause is to make each invocation of @Code "@FootNote" a
  361. Xgalley whose object is the result of the invocation in the usual way,
  362. Xand whose sequence of points of appearance is specified by the @Code "into"
  363. Xclause; in this example, the sequence of all @Code "@FootPlace" symbols
  364. Xfollowing the invocation point.
  365. X@PP
  366. XLout permits galleys to be invoked within other galleys to arbitrary
  367. Xdepth, so that one may have footnotes within figures within the body
  368. Xtext galley, for example, creating arbitrary static trees.  Receptive
  369. Xsymbols like @Code "@FootPlace" may appear within any galley, creating
  370. Xarbitrary dynamic trees as well.  The root of the dynamic tree, which
  371. Xwould normally consist of the sequence of pages of the complete assembled
  372. Xdocument, is considered to be a galley whose point of appearance is the 
  373. Xoutput file.  Points of appearance may be @Code preceding or @Code following
  374. Xthe invocation point; entries in tables of contents are the main users
  375. Xof {@Code preceding}.
  376. X@PP
  377. XThe galley abstraction is adequate for all of the applications listed at
  378. Xthe beginning of this section, except that there is no provision for
  379. Xsorting index entries and references.  Sorting of galleys has been added
  380. Xto Lout as a built-in feature, invoked by adding a special @Code "@Key"
  381. Xparameter to the galleys, and using its value as the sort key.  The author
  382. Xwas at a loss to find any other way, or any useful generalization of this
  383. Xfeature.  Its implementation will be discussed in Section
  384. X{@NumberOf cross.impl}.
  385. X@End @SubSection
  386. END_OF_FILE
  387.   if test 6118 -ne `wc -c <'doc/tr.impl/s5.1'`; then
  388.     echo shar: \"'doc/tr.impl/s5.1'\" unpacked with wrong size!
  389.   fi
  390.   # end of 'doc/tr.impl/s5.1'
  391. fi
  392. if test -f 'doc/tr.lout/ch1.02' -a "${1}" != "-c" ; then 
  393.   echo shar: Will not clobber existing file \"'doc/tr.lout/ch1.02'\"
  394. else
  395.   echo shar: Extracting \"'doc/tr.lout/ch1.02'\" \(8755 characters\)
  396.   sed "s/^X//" >'doc/tr.lout/ch1.02' <<'END_OF_FILE'
  397. X@Section
  398. X   @Title { Definitions }
  399. X   @Tag { definitions }
  400. X@Begin
  401. X@PP
  402. XThe features of Lout are very general.  They do not assume that documents
  403. Xare composed of pages, nor that there are such things as margins and
  404. Xfootnotes, for example.  @I Definitions
  405. Xdefinitions. @Index { Definitions }
  406. Xbridge the gap between Lout's general features and the
  407. Xspecial features -- footnotes, equations, pages -- that particular
  408. Xdocuments require.  They hold the instr&-uct&-ions for producing these
  409. Xspecial features, conveniently packaged ready for use.
  410. X@PP
  411. XFor example, consider the challenge posed by `@TeX', which is the name of
  412. Xone of Lout's most illustrious rivals [{@Ref knuth84}].  Lout solves it
  413. Xeasily enough, like this:
  414. X@ID @Code {
  415. X"T{ /0.2fo E }X"
  416. X}
  417. Xbut to type this every time @TeX is mentioned would be tedious and
  418. Xerror-prone.  So we place a definition at the beginning of the document:
  419. X@ID @Code {
  420. X"def  @TeX  {  T{ /0.2fo E }X  }"
  421. X}
  422. XNow @Code "@TeX" stands for the object following it between
  423. Xbraces, and we may write
  424. X@ID @Code {
  425. Xconsider the challenge posed by "`@TeX'", ...
  426. X}
  427. Xas the author did earlier in this paragraph.
  428. X@PP
  429. XA @I symbol
  430. Xsymbol. @Index Symbol
  431. Xis a name, like {@Code "@TeX"}, which stands for
  432. Xsomething other than itself.  The initial @Code "@" is not compulsory,
  433. Xbut it does make the name stand out clearly.  A @I definition of a symbol
  434. Xdeclares a name to be a symbol, and says what the symbol stands for.  The
  435. X@I body of a definition
  436. Xbody.of @Index { Body of a definition }
  437. Xis the part following the name, between the braces.  To @I invoke
  438. Xinvocation @Index { Invocation of a symbol }
  439. Xa symbol is to make use of it.
  440. X@PP
  441. XAnother expression ripe for packaging in a definition is
  442. X@ID @Code {
  443. X"@OneRow {  |  -2p @Font n  ^/0.5fk  2  }"
  444. X}
  445. Xwhich produces @OneRow { | -2p @Font n ^/0.5sk 2 } as the reader
  446. Xfamiliar with Chapter {@NumberOf details}
  447. Xcan verify.  But this time we would like to be able to write
  448. X@ID {
  449. X@I object  @Code "@Super"  @I object
  450. X}
  451. Xso that @Code { a "@Super" 2 } would come out as {a @Super 2}, and so
  452. Xon, for in this way the usefulness of the definition is greatly
  453. Xincreased.  Here is how it is done:
  454. X@ID @Code {
  455. X"def @Super"
  456. X"   left x"
  457. X"   right y"
  458. X"{ @OneRow {  |  -2p @Font y  ^/0.5fk  x  }"
  459. X"}"
  460. X}
  461. XThis definition says that @Code "@Super" has two {@I parameters},
  462. Xparameter @Index Parameter
  463. X@Code x and {@Code y}.  When @Code "@Super" is invoked, all occurrences
  464. Xof @Code x in the body will be replaced by the object just to the left
  465. Xof {@Code "@Super"}, and all occurrences of @Code y will be replaced by
  466. Xthe object just to the right.  So, for example, the expression
  467. X@ID @Code {
  468. X"2  @Super  { Slope @Font n }"
  469. X}
  470. Xis equal to
  471. X@ID @Code {
  472. X"@OneRow {  |  -2p @Font { Slope @Font n }  ^/0.5fk  2  }"
  473. X}
  474. Xand so comes out as {2 @Super {Slope @Font n}}.
  475. X@PP
  476. XLout permits definitions to invoke themselves, a peculiarly circular
  477. Xthing to do which goes by the name of
  478. Xrecursion @Index Recursion
  479. X@I recursion.  Here is an example
  480. Xof a recursive definition:
  481. X@ID @Code {
  482. X"def  @Leaders  {  ..   @Leaders  }"
  483. X}
  484. XThe usual rule is that the value of an invocation of a symbol is a copy of
  485. Xthe body of the symbol's definition, so the value of @Code "@Leaders" must be
  486. X@ID @Code {
  487. X"..   @Leaders"
  488. X}
  489. XBut now this rule applies to this new invocation of {@Code "@Leaders"};
  490. Xsubstituting its body gives
  491. X@ID @Code {
  492. X"..   ..   @Leaders"
  493. X}
  494. Xand so on forever.  In order to make this useful,
  495. Xan invocation of a recursive symbol is replaced by its body only if
  496. Xsufficient space is available.  So, for example,
  497. X@ID @Code {
  498. X"4i @Wide { Chapter 7  @Leaders   62 }"
  499. X}
  500. Xhas for its result the object
  501. X@ID {
  502. X4i @Wide { Chapter 7  @Leaders   62 }
  503. X}
  504. Xwith Lout checking before each replacement of @Code "@Leaders" by
  505. X@OneCol @Code { ".."   "@Leaders" } that the total length afterwards,
  506. Xincluding the other words, would not exceed four inches.
  507. X@PP
  508. XThe remaining issue is what happens when Lout decides that it is time to
  509. Xstop.  The obvious thing to do is to replace the last invocation by an
  510. Xempty object:
  511. X@ID @Code {
  512. X"..    ..    ..    ..    ..    ..    ..    ..    {}"
  513. X}
  514. XAs the example shows, this would leave a small trailing space, which in
  515. Xpractice turns out to be a major headache.  Lout solves this problem
  516. Xby replacing the last invocation with a different kind of empty object,
  517. Xcalled @@Null, whose effect is to make an adjacent concatenation symbol
  518. Xdisappear, preferably one preceding the @@Null.  Thus, when Lout
  519. Xreplaces @Code "@Leaders" by @@Null in the expression
  520. X@ID @Code {
  521. X"..    ..    ..    ..    ..    ..    ..    ..    @Leaders"
  522. X}
  523. Xthe trailing space, which is really a horizontal concatenation symbol,
  524. Xdisappears as well.  This is carefully taken into account when deciding
  525. Xwhether there is room to replace @Code "@Leaders" by its body at each
  526. Xstage.
  527. X@PP
  528. XThe remainder of this section is devoted to showing how definitions may
  529. Xbe used to specify the @I {page layout}
  530. Xpage.layout @RawIndex { Page layout }
  531. Xpage.layout.basic @SubIndex { principles of }
  532. Xof a document.  To begin with,
  533. Xwe can define a page like this:
  534. X@ID @Code {
  535. X"def @Page"
  536. X"{"
  537. X"    //1i  ||1i"
  538. X"    6i @Wide 9.5i @High"
  539. X"    { @TextPlace  //1rt  @FootSect }"
  540. X"    ||1i  //1i"
  541. X"}"
  542. X}
  543. XNow @Code "@Page" is an eight by
  544. Xeleven and a half inch object, with one inch margins, a place at the top for
  545. Xtext, and a section at the bottom for footnotes (since @Code "//1rt" leaves
  546. Xsufficient space to bottom-justify the following object).  It will be
  547. Xconvenient for us to show the effect of invoking @Code "@Page" like this:
  548. X@ID @Code
  549. X{ { //0.5ix 8p @Font "@Page" &2m => } &2m
  550. X@LittlePage { "@TextPlace" //1rt "@FootSect" }
  551. X}
  552. Xwith the invoked symbol appearing to the left of the arrow, and its body to
  553. Xthe right.
  554. X@PP
  555. XThe definition of a vertical list of pages should come as no surprise:
  556. X@ID @Code {
  557. X"def @PageList"
  558. X"{"
  559. X"    @Page"
  560. X"    //"
  561. X"    @PageList"
  562. X"}"
  563. X}
  564. XThis allows invocations like the following:
  565. X@ID @Code @HExpand @HScale {
  566. X{ //0.5ix 8p @Font "@PageList" }
  567. X||1m { //0.5ix => } ||1m
  568. X{        @LittlePage { "@TextPlace" //1rt "@FootSect" }
  569. X  //0.2c 8p @Font "@PageList"
  570. X}
  571. X||1m { //0.5ix => } ||1m
  572. X{        @LittlePage { "@TextPlace" //1rt "@FootSect" }
  573. X  //     @LittlePage { "@TextPlace" //1rt "@FootSect" }
  574. X  //0.2c 8p @Font "@PageList"
  575. X}
  576. X||1m { //0.5ix => } ||1m
  577. X{        @LittlePage { "@TextPlace" //1rt "@FootSect" }
  578. X  //     @LittlePage { "@TextPlace" //1rt "@FootSect" }
  579. X}
  580. X}
  581. Xsetting  @Code "@PageList" to @Code @@Null on the last step.  An
  582. Xarbitrary number of pages can be generated in this way.
  583. X@PP
  584. XA definition for @Code "@TextPlace" is beyond us at present, since
  585. X@Code "@TextPlace" must be replaced by different parts of the text
  586. Xof the document on different pages.  We can,
  587. Xhowever, define @Code "@FootSect" to be a small space followed by a
  588. Xhorizontal line followed by a list of places where footnotes are to go:
  589. X@ID @Code {
  590. X"def @FootList         "
  591. X"{                     "
  592. X"   @FootPlace         "
  593. X"   //0.3v             "
  594. X"   @FootList          "
  595. X"}                     "
  596. X"                      "
  597. X"def @FootSect"
  598. X"{                        "
  599. X"   //0.3v 1i @Wide @HLine"
  600. X"   //0.3v @FootList      "
  601. X"}                        "
  602. X}
  603. Xassuming that @Code "@HLine" will produce a horizontal line of the
  604. Xindicated width.  With this definition we can generate pages like this:
  605. X@ID @Code {
  606. X@LittlePage { "@TextPlace"
  607. X               //1rt
  608. X               "@FootSect"
  609. X             }
  610. X||2m { //0.5ix => } ||2m
  611. X@LittlePage { "@TextPlace"
  612. X               //1rt
  613. X               @OneRow { 1c @Wide @HLine
  614. X                         //0.1c
  615. X                         "@FootList"
  616. X                       }
  617. X             }
  618. X||2m { //0.5ix => } ||2m
  619. X@LittlePage { "@TextPlace"
  620. X               //1rt
  621. X               @OneRow { 1c @Wide @HLine
  622. X                         //0.1c
  623. X                         "@FootPlace"
  624. X                         //0.1c
  625. X                         "@FootList"
  626. X                       }
  627. X             }
  628. X}
  629. Xand so on for arbitrarily many footnotes.
  630. X@PP
  631. XWe will see in the next section how invocations of @Code "@PageList",
  632. X@Code "@FootSect" and @Code "@FootList" are replaced by their bodies only
  633. Xwhen the need to insert text and footnotes obliges Lout to do so;
  634. Xotherwise the invocations are replaced by @@Null.  In this way, the
  635. Xright number of pages is made, the small line appears only on pages that
  636. Xhave at least one footnote, and unnecessary concatenation symbols
  637. Xdisappear.
  638. X@PP
  639. XThis approach to page layout is the most original contribution Lout has
  640. Xmade to document formatting.  It is extraordinarily flexible.  Two-column
  641. Xpages?  Use
  642. X@ID @Code {
  643. X"{2.8i @Wide @TextPlace}  ||0.4i  {2.8i @Wide @TextPlace}"
  644. X}
  645. Xinstead of {@Code "@TextPlace"}.  Footnotes in smaller type?  Use
  646. X@Code { -2p "@Font" "@FootPlace" } instead of {@Code "@FootPlace"}.  And
  647. Xon and on.
  648. X@End @Section
  649. END_OF_FILE
  650.   if test 8755 -ne `wc -c <'doc/tr.lout/ch1.02'`; then
  651.     echo shar: \"'doc/tr.lout/ch1.02'\" unpacked with wrong size!
  652.   fi
  653.   # end of 'doc/tr.lout/ch1.02'
  654. fi
  655. if test -f 'doc/tr.lout/setup' -a "${1}" != "-c" ; then 
  656.   echo shar: Will not clobber existing file \"'doc/tr.lout/setup'\"
  657. else
  658.   echo shar: Extracting \"'doc/tr.lout/setup'\" \(8613 characters\)
  659.   sed "s/^X//" >'doc/tr.lout/setup' <<'END_OF_FILE'
  660. X
  661. X######################################################
  662. X#                                                    #
  663. X#  Lout setup file for producing the user manual.    #
  664. X#                                                    #
  665. X#  Jeffrey H. Kingston                               #
  666. X#  20 June 1991                                      #
  667. X#  22 December 1991                                  #
  668. X#                                                    #
  669. X######################################################
  670. X
  671. X@SysInclude { ft  }
  672. X@SysInclude { dl  }
  673. X@SysInclude { eq  }
  674. X@SysInclude { fig }
  675. X@SysInclude { tab }
  676. X
  677. X
  678. X   def "->" { {Symbol Base} @Font "\256" } #174 decimal
  679. X   def "=>" { {Symbol Base} @Font "\336" } #222 decimal
  680. X   macro @JP    { /0.5v  }
  681. X
  682. X   def @Code right x
  683. X   { { Helvetica Base -1p } @Font lines @Break x }
  684. X
  685. X   macro @JL { //1vx }
  686. X
  687. X   ###################################################
  688. X   #                                                 #
  689. X   #  Lout keywords.                                 #
  690. X   #                                                 #
  691. X   ###################################################
  692. X
  693. X   def @@Begin             { @Code "@Begin"             }
  694. X   def @@Break             { @Code "@Break"             }
  695. X   def @@Case              { @Code "@Case"              }
  696. X   def @@Database          { @Code "@Database"          }
  697. X   def @@End               { @Code "@End"               }
  698. X   def @@Font              { @Code "@Font"              }
  699. X   def @@Char              { @Code "@Char"              }
  700. X   def @@Galley            { @Code "@Galley"            }
  701. X   def @@Graphic           { @Code "@Graphic"           }
  702. X   def @@HAdjust           { @Code "@HAdjust"           }
  703. X   def @@HContract         { @Code "@HContract"         }
  704. X   def @@HExpand           { @Code "@HExpand"           }
  705. X   def @@HScale            { @Code "@HScale"            }
  706. X   def @@High              { @Code "@High"              }
  707. X   def @@Include           { @Code "@Include"           }
  708. X   def @@IncludeGraphic    { @Code "@IncludeGraphic"    }
  709. X   def @@Key               { @Code "@Key"               }
  710. X   def @@LClos             { @Code "@LClos"             }
  711. X   def @@LEnv              { @Code "@LEnv"              }
  712. X   def @@LInput            { @Code "@LInput"            }
  713. X   def @@LVis              { @Code "@LVis"              }
  714. X   def @@Moment            { @Code "@Moment"            }
  715. X   def @@Next              { @Code "@Next"              }
  716. X   def @@Null              { @Code "@Null"              }
  717. X   def @@OneCol            { @Code "@OneCol"            }
  718. X   def @@OneRow            { @Code "@OneRow"            }
  719. X   def @@Open              { @Code "@Open"              }
  720. X   def @@PAdjust           { @Code "@PAdjust"           }
  721. X   def @@PrependGraphic    { @Code "@PrependGraphic"    }
  722. X   def @@Rotate            { @Code "@Rotate"            }
  723. X   def @@Scale             { @Code "@Scale"             }
  724. X   def @@Space             { @Code "@Space"             }
  725. X   def @@SysDatabase       { @Code "@SysDatabase"       }
  726. X   def @@SysInclude        { @Code "@SysInclude"        }
  727. X   def @@SysIncludeGraphic { @Code "@SysIncludeGraphic" }
  728. X   def @@SysPrependGraphic { @Code "@SysPrependGraphic" }
  729. X   def @@Tag               { @Code "@Tag"               }
  730. X   def @@Tagged            { @Code "@Tagged"            }
  731. X   def @@Use               { @Code "@Use"               }
  732. X   def @@VAdjust           { @Code "@VAdjust"           }
  733. X   def @@VContract         { @Code "@VContract"         }
  734. X   def @@VExpand           { @Code "@VExpand"           }
  735. X   def @@VScale            { @Code "@VScale"            }
  736. X   def @@Yield             { @Code "@Yield"             }
  737. X   def @@Wide              { @Code "@Wide"              }
  738. X
  739. X
  740. X   ###################################################
  741. X   #                                                 #
  742. X   #  Miscellaneous, mostly graphical definitions.   #
  743. X   #                                                 #
  744. X   ###################################################
  745. X
  746. X   def @TeX { T{ /0.2fo E}X }
  747. X
  748. X   export sp sb
  749. X   def @Equation
  750. X      body x
  751. X   @Begin
  752. X
  753. X      def sp left x right y { @OneRow { | "-2p" @Font y ^/0.5fk x } }
  754. X      def sb left x right y { @OneRow { x ^/0.5fk | "-2p" @Font y } }
  755. X
  756. X      Slope @Font x
  757. X
  758. X   @End @Equation
  759. X
  760. X   def @Super
  761. X      left x
  762. X      right y
  763. X   { @OneRow { | -2p @Font y ^/0.5fk x }
  764. X   }
  765. X
  766. X   def @NineSquare
  767. X      right x
  768. X   {
  769. X      def @Three { x |0.2i x |0.2i x }
  770. X
  771. X      @Three /0.2i @Three /0.2i @Three
  772. X   }
  773. X
  774. X   def @Leaders
  775. X   { ..   @Leaders
  776. X   }
  777. X
  778. X   def @HLine
  779. X   {
  780. X    { 0 0 moveto xsize 0 lineto stroke } @Graphic {}
  781. X   }
  782. X
  783. X   def @VDashLine
  784. X      right length
  785. X   {
  786. X      length @High {
  787. X    { 0 0 moveto 0 ysize lineto [ 3 pt ] 0 setdash stroke } @Graphic {}
  788. X      }
  789. X   }
  790. X
  791. X   def @LBox
  792. X      right offset
  793. X   {  @HContract @VContract
  794. X      {
  795. X        {  //0.2c
  796. X           0.6c @High 1.2c @Wide
  797. X           { 0 0 moveto xsize 0 lineto
  798. X         xsize ysize lineto 0 ysize lineto closepath
  799. X         gsave 0.9 setgray fill grestore stroke }
  800. X           @Graphic {}
  801. X        }
  802. X        ||offset @VDashLine 1c
  803. X      }
  804. X   }
  805. X
  806. X   def @Arrow
  807. X      right length
  808. X   {  @OneCol @OneRow
  809. X      {
  810. X       30d @Rotate {0.12c @Wide @HLine}
  811. X       //
  812. X       length @Wide @HLine
  813. X       //
  814. X       "-30d" @Rotate {0.12c @Wide @HLine}
  815. X      }
  816. X   }
  817. X
  818. X   def @DoubleArrow
  819. X      right length
  820. X   {  @OneCol @OneRow
  821. X      { 
  822. X         & 180d @Rotate @Arrow length
  823. X         |0io @Arrow length
  824. X      }
  825. X   }
  826. X
  827. X   def @Put
  828. X     left coord
  829. X     right x
  830. X   { @OneCol @OneRow
  831. X     { coord / | @OneCol @OneRow x
  832. X     }
  833. X   }
  834. X   
  835. X   macro @At { //0io }
  836. X
  837. X
  838. X   ###################################################
  839. X   #                                                 #
  840. X   #  Interpolated example documents.                #
  841. X   #                                                 #
  842. X   ###################################################
  843. X
  844. X   def @LittleEndRunPlace { @Galley }
  845. X   def @LittleEndRun
  846. X      force into { @LittleEndRunPlace&&preceding }
  847. X   {}
  848. X
  849. X   def @LittleTextPlace { @Galley }
  850. X   def @LittleText into { @LittleTextPlace&&preceding }
  851. X      right x
  852. X   { x
  853. X   }
  854. X
  855. X   def @LittleFootPlace { @Galley }
  856. X   def @LittleFootNote into { @LittleFootPlace&&following }
  857. X      right x
  858. X   { x
  859. X   }
  860. X
  861. X   def @LittlePageColumn
  862. X      right x
  863. X   {
  864. X        9px @Break 8p @Font
  865. X        2.8c @Wide x
  866. X   }
  867. X
  868. X   def @LittlePage
  869. X      right x
  870. X   {
  871. X      @HContract @VContract {
  872. X        { 0 0 moveto xsize 0 lineto xsize ysize lineto
  873. X          0 ysize lineto closepath stroke } @Graphic
  874. X        {  //0.3c ||0.3c
  875. X           9px @Break 8p @Font
  876. X           2.8c @Wide 3.8c @High x
  877. X           ||0.3c //0.3c
  878. X        }
  879. X      }
  880. X   }
  881. X
  882. X   def @LittleFootSect
  883. X   {  1c @Wide @HLine
  884. X      //0.3v @LittleFootPlace ||0.5c
  885. X   }
  886. X
  887. X   def @LittlePageList
  888. X     right @PageNum
  889. X   {
  890. X      @LittlePage { # |0.5rt @PageNum //0.8v
  891. X        //0.3v @LittleTextPlace
  892. X        //1rt @LittleFootSect
  893. X         }
  894. X      //
  895. X      @LittlePageList @Next @PageNum
  896. X   }
  897. X
  898. X   def @LittleDocument
  899. X   {  @LittlePage
  900. X      {  @LittleTextPlace
  901. X         //1rt @LittleFootSect
  902. X      }
  903. X      // @LittlePageList 2
  904. X      // @LittleEndRunPlace
  905. X   }
  906. X        
  907. X   def @ShowMarks
  908. X      named linewidth  { 0.015 cm }
  909. X      named linestyle  { dashed   }
  910. X      named dashlength { 0.15 cm  }
  911. X      named paint      { light    }
  912. X      right x
  913. X   {
  914. X      @HContract @VContract @Fig
  915. X      {   @Box margin { 0c } linewidth { linewidth } paint { paint }
  916. X      {   @Figure
  917. X         shape { -0.3 cm ymark
  918. X             {xsize ymark} ++ {0.3 cm 0}  []
  919. X             xmark -0.3 cm
  920. X             {xmark ysize} ++ {0 0.3 cm}
  921. X               }
  922. X         linewidth { linewidth }
  923. X         linestyle { linestyle }
  924. X         dashlength { dashlength }
  925. X          x
  926. X      }
  927. X
  928. X      }
  929. X   }
  930. X
  931. X   def @ShowVMark
  932. X      named linewidth  { 0.015 cm }
  933. X      named linestyle  { dashed   }
  934. X      named dashlength { 0.15 cm  }
  935. X      named paint      { light    }
  936. X      right x
  937. X   {
  938. X      @Fig
  939. X      {   
  940. X     @Figure
  941. X         shape {
  942. X             xmark -0.3 cm
  943. X             {xmark ysize} ++ {0 0.3 cm}
  944. X               }
  945. X         linewidth { linewidth }
  946. X         linestyle { linestyle }
  947. X         dashlength { dashlength }
  948. X     x
  949. X      }
  950. X   }
  951. X
  952. X   def @Strange
  953. X       named @Format right @Val { [@Val] }
  954. X       right x
  955. X   {   @Format x
  956. X   }
  957. X
  958. X   def @Box right x
  959. X   {
  960. X     "0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath stroke"
  961. X     @Graphic x
  962. X   }
  963. X
  964. X   def @GreyBox right x
  965. X   {
  966. X     "0 0 moveto xsize 0 lineto xsize ysize lineto 0 ysize lineto closepath 0.8 setgray fill"
  967. X     @Graphic x
  968. X   }
  969. X
  970. X@Use { @DocumentLayout
  971. X  @MakeIndex        { Yes                  }
  972. X  @TableOfContents  { Yes                  }
  973. X  @AppendixGap      { 1.10b                }
  974. X  @BookTitleFormat  { {Bold 2.0f} @Font {//2.0f @Title //0.5f} }
  975. X}
  976. X
  977. X@SysDatabase @Reference { loutrefs }
  978. END_OF_FILE
  979.   if test 8613 -ne `wc -c <'doc/tr.lout/setup'`; then
  980.     echo shar: \"'doc/tr.lout/setup'\" unpacked with wrong size!
  981.   fi
  982.   # end of 'doc/tr.lout/setup'
  983. fi
  984. if test -f 'font/ZapfDin.AFM' -a "${1}" != "-c" ; then 
  985.   echo shar: Will not clobber existing file \"'font/ZapfDin.AFM'\"
  986. else
  987.   echo shar: Extracting \"'font/ZapfDin.AFM'\" \(9316 characters\)
  988.   sed "s/^X//" >'font/ZapfDin.AFM' <<'END_OF_FILE'
  989. XStartFontMetrics 2.0
  990. XComment Copyright (c) 1984 Adobe Systems Incorporated.     All Rights Reserved.
  991. XComment Creation Date:Tue Mar 3 15:22:45 PST 1987
  992. XFontName ZapfDingbats
  993. XEncodingScheme FontSpecific
  994. XFullName ITC Zapf Dingbats
  995. XFamilyName ITC Zapf Dingbats
  996. XWeight Medium
  997. XItalicAngle 0.0
  998. XIsFixedPitch false
  999. XUnderlinePosition -98
  1000. XUnderlineThickness 54
  1001. XVersion 001.001
  1002. XNotice ITC Zapf Dingbats is a registered trademark of International Typeface Corporation.
  1003. XFontBBox -1 -143 981 820
  1004. XStartCharMetrics 202
  1005. XC 32 ; WX 278 ; N space ; B 0 0 0 0 ;
  1006. XC 33 ; WX 974 ; N a1 ; B 35 72 939 621 ;
  1007. XC 34 ; WX 961 ; N a2 ; B 35 81 927 611 ;
  1008. XC 35 ; WX 974 ; N a202 ; B 35 72 939 621 ;
  1009. XC 36 ; WX 980 ; N a3 ; B 35 0 945 692 ;
  1010. XC 37 ; WX 719 ; N a4 ; B 34 139 685 566 ;
  1011. XC 38 ; WX 789 ; N a5 ; B 35 -14 755 705 ;
  1012. XC 39 ; WX 790 ; N a119 ; B 35 -14 755 705 ;
  1013. XC 40 ; WX 791 ; N a118 ; B 35 -14 761 705 ;
  1014. XC 41 ; WX 690 ; N a117 ; B 35 138 655 553 ;
  1015. XC 42 ; WX 960 ; N a11 ; B 35 123 925 568 ;
  1016. XC 43 ; WX 939 ; N a12 ; B 35 134 904 559 ;
  1017. XC 44 ; WX 549 ; N a13 ; B 29 -11 516 705 ;
  1018. XC 45 ; WX 855 ; N a14 ; B 34 59 820 632 ;
  1019. XC 46 ; WX 911 ; N a15 ; B 35 50 876 642 ;
  1020. XC 47 ; WX 933 ; N a16 ; B 35 139 899 550 ;
  1021. XC 48 ; WX 911 ; N a105 ; B 35 50 876 642 ;
  1022. XC 49 ; WX 945 ; N a17 ; B 35 139 909 553 ;
  1023. XC 50 ; WX 974 ; N a18 ; B 35 104 938 586 ;
  1024. XC 51 ; WX 755 ; N a19 ; B 34 -14 721 704 ;
  1025. XC 52 ; WX 846 ; N a20 ; B 36 -14 811 705 ;
  1026. XC 53 ; WX 762 ; N a21 ; B 35 0 727 692 ;
  1027. XC 54 ; WX 761 ; N a22 ; B 35 0 727 692 ;
  1028. XC 55 ; WX 571 ; N a23 ; B -1 -68 571 661 ;
  1029. XC 56 ; WX 677 ; N a24 ; B 36 -14 642 705 ;
  1030. XC 57 ; WX 763 ; N a25 ; B 35 0 728 692 ;
  1031. XC 58 ; WX 760 ; N a26 ; B 35 0 726 692 ;
  1032. XC 59 ; WX 759 ; N a27 ; B 35 0 725 692 ;
  1033. XC 60 ; WX 754 ; N a28 ; B 35 0 720 692 ;
  1034. XC 61 ; WX 494 ; N a6 ; B 35 0 460 692 ;
  1035. XC 62 ; WX 552 ; N a7 ; B 35 0 517 692 ;
  1036. XC 63 ; WX 537 ; N a8 ; B 35 0 503 692 ;
  1037. XC 64 ; WX 577 ; N a9 ; B 35 96 542 596 ;
  1038. XC 65 ; WX 692 ; N a10 ; B 35 -14 657 705 ;
  1039. XC 66 ; WX 786 ; N a29 ; B 35 -14 751 705 ;
  1040. XC 67 ; WX 788 ; N a30 ; B 35 -14 752 705 ;
  1041. XC 68 ; WX 788 ; N a31 ; B 35 -14 753 705 ;
  1042. XC 69 ; WX 790 ; N a32 ; B 35 -14 756 705 ;
  1043. XC 70 ; WX 793 ; N a33 ; B 35 -14 759 705 ;
  1044. XC 71 ; WX 794 ; N a34 ; B 35 -14 759 705 ;
  1045. XC 72 ; WX 816 ; N a35 ; B 35 -14 782 705 ;
  1046. XC 73 ; WX 823 ; N a36 ; B 35 -14 787 705 ;
  1047. XC 74 ; WX 789 ; N a37 ; B 35 -14 754 705 ;
  1048. XC 75 ; WX 841 ; N a38 ; B 35 -14 807 705 ;
  1049. XC 76 ; WX 823 ; N a39 ; B 35 -14 789 705 ;
  1050. XC 77 ; WX 833 ; N a40 ; B 35 -14 798 705 ;
  1051. XC 78 ; WX 816 ; N a41 ; B 35 -13 782 705 ;
  1052. XC 79 ; WX 831 ; N a42 ; B 35 -14 796 705 ;
  1053. XC 80 ; WX 923 ; N a43 ; B 35 -14 888 705 ;
  1054. XC 81 ; WX 744 ; N a44 ; B 35 0 710 692 ;
  1055. XC 82 ; WX 723 ; N a45 ; B 35 0 688 692 ;
  1056. XC 83 ; WX 749 ; N a46 ; B 35 0 714 692 ;
  1057. XC 84 ; WX 790 ; N a47 ; B 34 -14 756 705 ;
  1058. XC 85 ; WX 792 ; N a48 ; B 35 -14 758 705 ;
  1059. XC 86 ; WX 695 ; N a49 ; B 35 -14 661 706 ;
  1060. XC 87 ; WX 776 ; N a50 ; B 35 -6 741 699 ;
  1061. XC 88 ; WX 768 ; N a51 ; B 35 -7 734 699 ;
  1062. XC 89 ; WX 792 ; N a52 ; B 35 -14 757 705 ;
  1063. XC 90 ; WX 759 ; N a53 ; B 35 0 725 692 ;
  1064. XC 91 ; WX 707 ; N a54 ; B 35 -14 672 705 ;
  1065. XC 92 ; WX 708 ; N a55 ; B 35 -14 672 705 ;
  1066. XC 93 ; WX 682 ; N a56 ; B 35 -14 647 705 ;
  1067. XC 94 ; WX 701 ; N a57 ; B 35 -14 666 705 ;
  1068. XC 95 ; WX 826 ; N a58 ; B 35 -14 791 705 ;
  1069. XC 96 ; WX 815 ; N a59 ; B 35 -14 780 705 ;
  1070. XC 97 ; WX 789 ; N a60 ; B 35 -14 754 705 ;
  1071. XC 98 ; WX 789 ; N a61 ; B 35 -14 754 705 ;
  1072. XC 99 ; WX 707 ; N a62 ; B 34 -14 673 705 ;
  1073. XC 100 ; WX 687 ; N a63 ; B 36 0 651 692 ;
  1074. XC 101 ; WX 696 ; N a64 ; B 35 0 661 691 ;
  1075. XC 102 ; WX 689 ; N a65 ; B 35 0 655 692 ;
  1076. XC 103 ; WX 786 ; N a66 ; B 34 -14 751 705 ;
  1077. XC 104 ; WX 787 ; N a67 ; B 35 -14 752 705 ;
  1078. XC 105 ; WX 713 ; N a68 ; B 35 -14 678 705 ;
  1079. XC 106 ; WX 791 ; N a69 ; B 35 -14 756 705 ;
  1080. XC 107 ; WX 785 ; N a70 ; B 36 -14 751 705 ;
  1081. XC 108 ; WX 791 ; N a71 ; B 35 -14 757 705 ;
  1082. XC 109 ; WX 873 ; N a72 ; B 35 -14 838 705 ;
  1083. XC 110 ; WX 761 ; N a73 ; B 35 0 726 692 ;
  1084. XC 111 ; WX 762 ; N a74 ; B 35 0 727 692 ;
  1085. XC 112 ; WX 762 ; N a203 ; B 35 0 727 692 ;
  1086. XC 113 ; WX 759 ; N a75 ; B 35 0 725 692 ;
  1087. XC 114 ; WX 759 ; N a204 ; B 35 0 725 692 ;
  1088. XC 115 ; WX 892 ; N a76 ; B 35 0 858 705 ;
  1089. XC 116 ; WX 892 ; N a77 ; B 35 -14 858 692 ;
  1090. XC 117 ; WX 788 ; N a78 ; B 35 -14 754 705 ;
  1091. XC 118 ; WX 784 ; N a79 ; B 35 -14 749 705 ;
  1092. XC 119 ; WX 438 ; N a81 ; B 35 -14 403 705 ;
  1093. XC 120 ; WX 138 ; N a82 ; B 35 0 104 692 ;
  1094. XC 121 ; WX 277 ; N a83 ; B 35 0 242 692 ;
  1095. XC 122 ; WX 415 ; N a84 ; B 35 0 380 692 ;
  1096. XC 123 ; WX 392 ; N a97 ; B 35 263 357 705 ;
  1097. XC 124 ; WX 392 ; N a98 ; B 34 263 357 705 ;
  1098. XC 125 ; WX 668 ; N a99 ; B 35 263 633 705 ;
  1099. XC 126 ; WX 668 ; N a100 ; B 36 263 634 705 ;
  1100. XC 161 ; WX 732 ; N a101 ; B 35 -143 697 806 ;
  1101. XC 162 ; WX 544 ; N a102 ; B 56 -14 488 706 ;
  1102. XC 163 ; WX 544 ; N a103 ; B 34 -14 508 705 ;
  1103. XC 164 ; WX 910 ; N a104 ; B 35 40 875 651 ;
  1104. XC 165 ; WX 667 ; N a106 ; B 35 -14 633 705 ;
  1105. XC 166 ; WX 760 ; N a107 ; B 35 -14 726 705 ;
  1106. XC 167 ; WX 760 ; N a108 ; B 0 121 758 569 ;
  1107. XC 168 ; WX 776 ; N a112 ; B 35 0 741 705 ;
  1108. XC 169 ; WX 595 ; N a111 ; B 34 -14 560 705 ;
  1109. XC 170 ; WX 694 ; N a110 ; B 35 -14 659 705 ;
  1110. XC 171 ; WX 626 ; N a109 ; B 34 0 591 705 ;
  1111. XC 172 ; WX 788 ; N a120 ; B 35 -14 754 705 ;
  1112. XC 173 ; WX 788 ; N a121 ; B 35 -14 754 705 ;
  1113. XC 174 ; WX 788 ; N a122 ; B 35 -14 754 705 ;
  1114. XC 175 ; WX 788 ; N a123 ; B 35 -14 754 705 ;
  1115. XC 176 ; WX 788 ; N a124 ; B 35 -14 754 705 ;
  1116. XC 177 ; WX 788 ; N a125 ; B 35 -14 754 705 ;
  1117. XC 178 ; WX 788 ; N a126 ; B 35 -14 754 705 ;
  1118. XC 179 ; WX 788 ; N a127 ; B 35 -14 754 705 ;
  1119. XC 180 ; WX 788 ; N a128 ; B 35 -14 754 705 ;
  1120. XC 181 ; WX 788 ; N a129 ; B 35 -14 754 705 ;
  1121. XC 182 ; WX 788 ; N a130 ; B 35 -14 754 705 ;
  1122. XC 183 ; WX 788 ; N a131 ; B 35 -14 754 705 ;
  1123. XC 184 ; WX 788 ; N a132 ; B 35 -14 754 705 ;
  1124. XC 185 ; WX 788 ; N a133 ; B 35 -14 754 705 ;
  1125. XC 186 ; WX 788 ; N a134 ; B 35 -14 754 705 ;
  1126. XC 187 ; WX 788 ; N a135 ; B 35 -14 754 705 ;
  1127. XC 188 ; WX 788 ; N a136 ; B 35 -14 754 705 ;
  1128. XC 189 ; WX 788 ; N a137 ; B 35 -14 754 705 ;
  1129. XC 190 ; WX 788 ; N a138 ; B 35 -14 754 705 ;
  1130. XC 191 ; WX 788 ; N a139 ; B 35 -14 754 705 ;
  1131. XC 192 ; WX 788 ; N a140 ; B 35 -14 754 705 ;
  1132. XC 193 ; WX 788 ; N a141 ; B 35 -14 754 705 ;
  1133. XC 194 ; WX 788 ; N a142 ; B 35 -14 754 705 ;
  1134. XC 195 ; WX 788 ; N a143 ; B 35 -14 754 705 ;
  1135. XC 196 ; WX 788 ; N a144 ; B 35 -14 754 705 ;
  1136. XC 197 ; WX 788 ; N a145 ; B 35 -14 754 705 ;
  1137. XC 198 ; WX 788 ; N a146 ; B 35 -14 754 705 ;
  1138. XC 199 ; WX 788 ; N a147 ; B 35 -14 754 705 ;
  1139. XC 200 ; WX 788 ; N a148 ; B 35 -14 754 705 ;
  1140. XC 201 ; WX 788 ; N a149 ; B 35 -14 754 705 ;
  1141. XC 202 ; WX 788 ; N a150 ; B 35 -14 754 705 ;
  1142. XC 203 ; WX 788 ; N a151 ; B 35 -14 754 705 ;
  1143. XC 204 ; WX 788 ; N a152 ; B 35 -14 754 705 ;
  1144. XC 205 ; WX 788 ; N a153 ; B 35 -14 754 705 ;
  1145. XC 206 ; WX 788 ; N a154 ; B 35 -14 754 705 ;
  1146. XC 207 ; WX 788 ; N a155 ; B 35 -14 754 705 ;
  1147. XC 208 ; WX 788 ; N a156 ; B 35 -14 754 705 ;
  1148. XC 209 ; WX 788 ; N a157 ; B 35 -14 754 705 ;
  1149. XC 210 ; WX 788 ; N a158 ; B 35 -14 754 705 ;
  1150. XC 211 ; WX 788 ; N a159 ; B 35 -14 754 705 ;
  1151. XC 212 ; WX 894 ; N a160 ; B 35 58 860 634 ;
  1152. XC 213 ; WX 838 ; N a161 ; B 35 153 803 539 ;
  1153. XC 214 ; WX 1016 ; N a163 ; B 34 151 981 541 ;
  1154. XC 215 ; WX 458 ; N a164 ; B 35 -127 422 820 ;
  1155. XC 216 ; WX 748 ; N a196 ; B 35 94 698 597 ;
  1156. XC 217 ; WX 924 ; N a165 ; B 35 140 890 552 ;
  1157. XC 218 ; WX 748 ; N a192 ; B 35 94 698 597 ;
  1158. XC 219 ; WX 918 ; N a166 ; B 35 167 884 525 ;
  1159. XC 220 ; WX 927 ; N a167 ; B 35 32 892 660 ;
  1160. XC 221 ; WX 928 ; N a168 ; B 35 129 891 562 ;
  1161. XC 222 ; WX 928 ; N a169 ; B 35 128 893 563 ;
  1162. XC 223 ; WX 834 ; N a170 ; B 35 155 799 537 ;
  1163. XC 224 ; WX 873 ; N a171 ; B 35 93 838 599 ;
  1164. XC 225 ; WX 828 ; N a172 ; B 35 104 791 588 ;
  1165. XC 226 ; WX 924 ; N a173 ; B 35 98 889 594 ;
  1166. XC 227 ; WX 924 ; N a162 ; B 35 97 889 593 ;
  1167. XC 228 ; WX 917 ; N a174 ; B 35 0 882 692 ;
  1168. XC 229 ; WX 930 ; N a175 ; B 35 84 896 608 ;
  1169. XC 230 ; WX 931 ; N a176 ; B 35 84 896 608 ;
  1170. XC 231 ; WX 463 ; N a177 ; B 35 -99 429 791 ;
  1171. XC 232 ; WX 883 ; N a178 ; B 35 71 848 623 ;
  1172. XC 233 ; WX 836 ; N a179 ; B 35 44 802 648 ;
  1173. XC 234 ; WX 836 ; N a193 ; B 35 44 802 648 ;
  1174. XC 235 ; WX 867 ; N a180 ; B 35 101 832 591 ;
  1175. XC 236 ; WX 867 ; N a199 ; B 35 101 832 591 ;
  1176. XC 237 ; WX 696 ; N a181 ; B 35 44 661 648 ;
  1177. XC 238 ; WX 696 ; N a200 ; B 35 44 661 648 ;
  1178. XC 239 ; WX 874 ; N a182 ; B 35 77 840 619 ;
  1179. XC 241 ; WX 874 ; N a201 ; B 35 73 840 615 ;
  1180. XC 242 ; WX 760 ; N a183 ; B 35 0 725 692 ;
  1181. XC 243 ; WX 946 ; N a184 ; B 35 160 911 533 ;
  1182. XC 244 ; WX 771 ; N a197 ; B 34 37 736 655 ;
  1183. XC 245 ; WX 865 ; N a185 ; B 35 207 830 481 ;
  1184. XC 246 ; WX 771 ; N a194 ; B 34 37 736 655 ;
  1185. XC 247 ; WX 888 ; N a198 ; B 34 -19 853 712 ;
  1186. XC 248 ; WX 967 ; N a186 ; B 35 124 932 568 ;
  1187. XC 249 ; WX 888 ; N a195 ; B 34 -19 853 712 ;
  1188. XC 250 ; WX 831 ; N a187 ; B 35 113 796 579 ;
  1189. XC 251 ; WX 873 ; N a188 ; B 36 118 838 578 ;
  1190. XC 252 ; WX 927 ; N a189 ; B 35 150 891 542 ;
  1191. XC 253 ; WX 970 ; N a190 ; B 35 76 931 616 ;
  1192. XC 254 ; WX 918 ; N a191 ; B 34 99 884 593 ;
  1193. XC -1 ; WX 509 ; N a205 ; B 35 0 475 692 ;
  1194. XC -1 ; WX 410 ; N a206 ; B 35 0 375 692 ;
  1195. XC -1 ; WX 509 ; N a85 ; B 35 0 475 692 ;
  1196. XC -1 ; WX 410 ; N a86 ; B 35 0 375 692 ;
  1197. XC -1 ; WX 234 ; N a87 ; B 35 -14 199 705 ;
  1198. XC -1 ; WX 234 ; N a88 ; B 35 -14 199 705 ;
  1199. XC -1 ; WX 390 ; N a89 ; B 35 -14 356 705 ;
  1200. XC -1 ; WX 390 ; N a90 ; B 35 -14 355 705 ;
  1201. XC -1 ; WX 276 ; N a91 ; B 35 0 242 692 ;
  1202. XC -1 ; WX 276 ; N a92 ; B 35 0 242 692 ;
  1203. XC -1 ; WX 317 ; N a93 ; B 35 0 283 692 ;
  1204. XC -1 ; WX 317 ; N a94 ; B 35 0 283 692 ;
  1205. XC -1 ; WX 334 ; N a95 ; B 35 0 299 692 ;
  1206. XC -1 ; WX 334 ; N a96 ; B 35 0 299 692 ;
  1207. XEndCharMetrics
  1208. XEndFontMetrics
  1209. END_OF_FILE
  1210.   if test 9316 -ne `wc -c <'font/ZapfDin.AFM'`; then
  1211.     echo shar: \"'font/ZapfDin.AFM'\" unpacked with wrong size!
  1212.   fi
  1213.   # end of 'font/ZapfDin.AFM'
  1214. fi
  1215. if test -f 'z07.c' -a "${1}" != "-c" ; then 
  1216.   echo shar: Will not clobber existing file \"'z07.c'\"
  1217. else
  1218.   echo shar: Extracting \"'z07.c'\" \(9004 characters\)
  1219.   sed "s/^X//" >'z07.c' <<'END_OF_FILE'
  1220. X/*@z07.c:Object Service:SplitIsDefinite(), DisposeObject()@*******************/
  1221. X/*                                                                           */
  1222. X/*  LOUT: A HIGH-LEVEL LANGUAGE FOR DOCUMENT FORMATTING (VERSION 2.05)       */
  1223. X/*  COPYRIGHT (C) 1993 Jeffrey H. Kingston                                   */
  1224. X/*                                                                           */
  1225. X/*  Jeffrey H. Kingston (jeff@cs.su.oz.au)                                   */
  1226. X/*  Basser Department of Computer Science                                    */
  1227. X/*  The University of Sydney 2006                                            */
  1228. X/*  AUSTRALIA                                                                */
  1229. X/*                                                                           */
  1230. X/*  This program is free software; you can redistribute it and/or modify     */
  1231. X/*  it under the terms of the GNU General Public License as published by     */
  1232. X/*  the Free Software Foundation; either version 1, or (at your option)      */
  1233. X/*  any later version.                                                       */
  1234. X/*                                                                           */
  1235. X/*  This program is distributed in the hope that it will be useful,          */
  1236. X/*  but WITHOUT ANY WARRANTY; without even the implied warranty of           */
  1237. X/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            */
  1238. X/*  GNU General Public License for more details.                             */
  1239. X/*                                                                           */
  1240. X/*  You should have received a copy of the GNU General Public License        */
  1241. X/*  along with this program; if not, write to the Free Software              */
  1242. X/*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                */
  1243. X/*                                                                           */
  1244. X/*  FILE:         z07.c                                                      */
  1245. X/*  MODULE:       Object Service                                             */
  1246. X/*  EXTERNS:      MakeWord(), MakeWordTwo(), DisposeObject(), CopyObject(),  */
  1247. X/*                SplitIsDefinite()                                          */
  1248. X/*                                                                           */
  1249. X/*****************************************************************************/
  1250. X#include "externs"
  1251. X
  1252. X
  1253. X/*****************************************************************************/
  1254. X/*                                                                           */
  1255. X/*  BOOLEAN SplitIsDefinite(x)                                               */
  1256. X/*                                                                           */
  1257. X/*  Return TRUE if x is a definite SPLIT object (both children definite)     */
  1258. X/*                                                                           */
  1259. X/*****************************************************************************/
  1260. X
  1261. XBOOLEAN SplitIsDefinite(x)
  1262. XOBJECT x;
  1263. X{ OBJECT y1, y2;
  1264. X  assert( type(x) == SPLIT, "SplitIsDefinite: x not a SPLIT!" );
  1265. X  Child(y1, DownDim(x, COL));
  1266. X  Child(y2, DownDim(x, ROW));
  1267. X  return is_definite(type(y1)) && is_definite(type(y2));
  1268. X} /* end SplitIsDefinite */
  1269. X
  1270. X
  1271. X/*****************************************************************************/
  1272. X/*                                                                           */
  1273. X/*  DisposeObject(x)                                                         */
  1274. X/*                                                                           */
  1275. X/*  Dispose object x recrusively, leaving intact any shared descendants.     */
  1276. X/*                                                                           */
  1277. X/*****************************************************************************/
  1278. X
  1279. XDisposeObject(x)
  1280. XOBJECT x;
  1281. X{ debug2(DOS,D,"[DisposeObject( %d ), type = %s, x =", (int) x, Image(type(x)));
  1282. X  ifdebug(DOS, DD, DebugObject(x));
  1283. X  assert( Up(x) == x, "DisposeObject: x has a parent!" );
  1284. X  while( Down(x) != x )  DisposeChild(Down(x));   Dispose(x);
  1285. X  debug0(DOS, D, "]DisposeObject returning.");
  1286. X} /* end DisposeObject */
  1287. X
  1288. X
  1289. X/*@::MakeWord(), MakeWordTwo()@***********************************************/
  1290. X/*                                                                           */
  1291. X/*  OBJECT MakeWord(typ, str, pos)                                           */
  1292. X/*                                                                           */
  1293. X/*  Return an unsized WORD or QWORD made from the given string and fpos.     */
  1294. X/*                                                                           */
  1295. X/*****************************************************************************/
  1296. X
  1297. XOBJECT MakeWord(typ, str, pos)
  1298. Xunsigned typ;  FULL_CHAR *str;  FILE_POS *pos;
  1299. X{ OBJECT res = NewWord(typ, StringLength(str), pos);
  1300. X  StringCopy(string(res), str);
  1301. X  FposCopy(fpos(res), *pos);
  1302. X  debug4(DOS, DD, "MakeWord(%s, %s, %s) returning %s",
  1303. X    Image(typ), str, EchoFilePos(pos), EchoObject(res));
  1304. X  return res;
  1305. X} /* end MakeWord */
  1306. X
  1307. X
  1308. X/*****************************************************************************/
  1309. X/*                                                                           */
  1310. X/*  OBJECT MakeWordTwo(typ, str1, str2, pos)                                 */
  1311. X/*                                                                           */
  1312. X/*  Return an unsized WORD or QWORD made from the two strings and fpos.      */
  1313. X/*                                                                           */
  1314. X/*****************************************************************************/
  1315. X
  1316. XOBJECT MakeWordTwo(typ, str1, str2, pos)
  1317. Xunsigned typ;  FULL_CHAR *str1, *str2;  FILE_POS *pos;
  1318. X{ int len1 = StringLength(str1);
  1319. X  int len2 = StringLength(str2);
  1320. X  OBJECT res = NewWord(typ, len1 + len2, pos);
  1321. X  StringCopy(string(res), str1);
  1322. X  StringCopy(&string(res)[len1], str2);
  1323. X  FposCopy(fpos(res), *pos);
  1324. X  debug5(DOS, DD, "MakeWordTwo(%s, %s, %s, %s) returning %s",
  1325. X    Image(typ), str1, str2, EchoFilePos(pos), EchoObject(res));
  1326. X  return res;
  1327. X} /* end MakeWordTwo */
  1328. X
  1329. X
  1330. X/*@::CopyObject()@************************************************************/
  1331. X/*                                                                           */
  1332. X/*  OBJECT CopyObject(x, pos)                                                */
  1333. X/*                                                                           */
  1334. X/*  Make a copy of unsized object x, setting all file positions to *pos.     */
  1335. X/*                                                                           */
  1336. X/*****************************************************************************/
  1337. X
  1338. XOBJECT CopyObject(x, pos)
  1339. XOBJECT x;  FILE_POS *pos;
  1340. X{ OBJECT y, link, res, tmp;
  1341. X
  1342. X  debug2(DOS, DD, "CopyObject(%s, %s)", EchoObject(x), EchoFilePos(pos));
  1343. X  switch( type(x) )
  1344. X  {
  1345. X
  1346. X    case WORD:
  1347. X    case QWORD:
  1348. X    
  1349. X      res = NewWord(type(x), StringLength(string(x)), pos);
  1350. X      StringCopy(string(res), string(x));
  1351. X      break;
  1352. X
  1353. X
  1354. X    case GAP_OBJ:
  1355. X    
  1356. X      res = New(type(x));
  1357. X      mark(gap(res)) = mark(gap(x));
  1358. X      join(gap(res)) = join(gap(x));
  1359. X      if( Down(x) != x )
  1360. X      {    Child(y, Down(x));
  1361. X    tmp = CopyObject(y, pos);
  1362. X    Link(res, tmp);
  1363. X      }
  1364. X      else
  1365. X      {    hspace(res) = hspace(x);
  1366. X    vspace(res) = vspace(x);
  1367. X      }
  1368. X      break;
  1369. X
  1370. X
  1371. X    /* case HEAD: */
  1372. X    case NULL_CLOS:
  1373. X    case CROSS:
  1374. X    case ONE_COL:
  1375. X    case ONE_ROW:
  1376. X    case WIDE:
  1377. X    case HIGH:
  1378. X    case HSCALE:
  1379. X    case VSCALE:
  1380. X    case SCALE:
  1381. X    case HCONTRACT:
  1382. X    case VCONTRACT:
  1383. X    case HEXPAND:
  1384. X    case VEXPAND:
  1385. X    case PADJUST:
  1386. X    case HADJUST:
  1387. X    case VADJUST:
  1388. X    case ROTATE:
  1389. X    case CASE:
  1390. X    case YIELD:
  1391. X    case XCHAR:
  1392. X    case FONT:
  1393. X    case SPACE:
  1394. X    case BREAK:
  1395. X    case NEXT:
  1396. X    case OPEN:
  1397. X    case TAGGED:
  1398. X    case INCGRAPHIC:
  1399. X    case SINCGRAPHIC:
  1400. X    case GRAPHIC:
  1401. X    case VCAT:
  1402. X    case HCAT:
  1403. X    case ACAT:
  1404. X    
  1405. X      res = New(type(x));
  1406. X      for( link = Down(x);  link != x;  link = NextDown(link) )
  1407. X      {    Child(y, link);
  1408. X    tmp = CopyObject(y, pos);
  1409. X    Link(res, tmp);
  1410. X      }
  1411. X      break;
  1412. X
  1413. X
  1414. X    case ENV:
  1415. X    
  1416. X      res = x;  /* do not copy environments */
  1417. X      break;
  1418. X
  1419. X
  1420. X    case PAR:
  1421. X    
  1422. X      res = New(PAR);
  1423. X      actual(res) = actual(x);
  1424. X      assert( Down(x) != x, "CopyObject: PAR child!" );
  1425. X      Child(y, Down(x));
  1426. X      tmp = CopyObject(y, pos);
  1427. X      Link(res, tmp);
  1428. X      break;
  1429. X
  1430. X
  1431. X    case CLOSURE:
  1432. X    
  1433. X      res = New(type(x));
  1434. X      for( link = Down(x);  link != x;  link = NextDown(link) )
  1435. X      {    Child(y, link);
  1436. X    assert( type(y) != CLOSURE, "CopyObject: CLOSURE!" );
  1437. X    tmp = CopyObject(y, pos);
  1438. X    Link(res, tmp);
  1439. X      }
  1440. X      actual(res) = actual(x);
  1441. X      StyleCopy(save_style(res), save_style(x));
  1442. X      break;
  1443. X
  1444. X
  1445. X    default:
  1446. X    
  1447. X      Error(INTERN, pos, "CopyObject: %s found", Image(type(x)));
  1448. X      break;
  1449. X
  1450. X  } /* end switch */
  1451. X  if( pos == no_fpos )  FposCopy(fpos(res), fpos(x));
  1452. X  else FposCopy(fpos(res), *pos);
  1453. X  debug1(DOS, DD, "CopyObject returning %s", EchoObject(res));
  1454. X  return res;
  1455. X} /* end CopyObject */
  1456. END_OF_FILE
  1457.   if test 9004 -ne `wc -c <'z07.c'`; then
  1458.     echo shar: \"'z07.c'\" unpacked with wrong size!
  1459.   fi
  1460.   # end of 'z07.c'
  1461. fi
  1462. if test -f 'z11.c' -a "${1}" != "-c" ; then 
  1463.   echo shar: Will not clobber existing file \"'z11.c'\"
  1464. else
  1465.   echo shar: Extracting \"'z11.c'\" \(8879 characters\)
  1466.   sed "s/^X//" >'z11.c' <<'END_OF_FILE'
  1467. X/*@z11.c:Style Service:EchoStyle()@*******************************************/
  1468. X/*                                                                           */
  1469. X/*  LOUT: A HIGH-LEVEL LANGUAGE FOR DOCUMENT FORMATTING (VERSION 2.05)       */
  1470. X/*  COPYRIGHT (C) 1993 Jeffrey H. Kingston                                   */
  1471. X/*                                                                           */
  1472. X/*  Jeffrey H. Kingston (jeff@cs.su.oz.au)                                   */
  1473. X/*  Basser Department of Computer Science                                    */
  1474. X/*  The University of Sydney 2006                                            */
  1475. X/*  AUSTRALIA                                                                */
  1476. X/*                                                                           */
  1477. X/*  This program is free software; you can redistribute it and/or modify     */
  1478. X/*  it under the terms of the GNU General Public License as published by     */
  1479. X/*  the Free Software Foundation; either version 1, or (at your option)      */
  1480. X/*  any later version.                                                       */
  1481. X/*                                                                           */
  1482. X/*  This program is distributed in the hope that it will be useful,          */
  1483. X/*  but WITHOUT ANY WARRANTY; without even the implied warranty of           */
  1484. X/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            */
  1485. X/*  GNU General Public License for more details.                             */
  1486. X/*                                                                           */
  1487. X/*  You should have received a copy of the GNU General Public License        */
  1488. X/*  along with this program; if not, write to the Free Software              */
  1489. X/*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                */
  1490. X/*                                                                           */
  1491. X/*  FILE:         z11.c                                                      */
  1492. X/*  MODULE:       Style Service                                              */
  1493. X/*  EXTERNS:      EchoStyle(), SpaceChange(), BreakChange()                  */
  1494. X/*                                                                           */
  1495. X/*****************************************************************************/
  1496. X#include "externs"
  1497. X
  1498. X
  1499. X#if DEBUG_ON
  1500. X/*****************************************************************************/
  1501. X/*                                                                           */
  1502. X/*  FULL_CHAR *EchoStyle(style)                                              */
  1503. X/*                                                                           */
  1504. X/*  Returns a string showing the value of the style.                         */
  1505. X/*                                                                           */
  1506. X/*****************************************************************************/
  1507. X
  1508. XFULL_CHAR *EchoStyle(style)
  1509. XSTYLE *style;
  1510. X{ FULL_CHAR buff1[100], buff2[100], buff3[100], buff4[100];
  1511. X  static FULL_CHAR res[100];
  1512. X  static char *hyphwords[] = { "hyph_undef", "hyph_off", "hyph_on" };
  1513. X  static char *fillwords[] = { "fill_undef", "fill_off", "fill_on" };
  1514. X  static char *displaywords[] = { "undef", "adjust", "outdent", "left",
  1515. X                 "centre", "right", "do" };
  1516. X
  1517. X  StringCopy(res, AsciiToFull("["));
  1518. X  StringCat(res, EchoCatOp(VCAT,mark(line_gap(*style)),join(line_gap(*style))));
  1519. X  StringCat(res, EchoGap(&line_gap(*style)));
  1520. X  StringCat(res, AsciiToFull(", "));
  1521. X  StringCat(res, font(*style) == 0 ?
  1522. X           AsciiToFull("nofont") : FontFamilyAndFace(font(*style)));
  1523. X  StringCat(res, AsciiToFull(" ("));
  1524. X  StringCat(res, EchoGap(&space_gap(*style)));
  1525. X  StringCat(res, AsciiToFull("), "));
  1526. X  StringCat(res, AsciiToFull(hyph_style(*style) < 3 ?
  1527. X            hyphwords[hyph_style(*style)] : "?"));
  1528. X  StringCat(res, AsciiToFull(":"));
  1529. X  StringCat(res, AsciiToFull(fill_style(*style) < 3 ?
  1530. X            fillwords[fill_style(*style)] : "?"));
  1531. X  StringCat(res, AsciiToFull(":"));
  1532. X  StringCat(res, AsciiToFull(display_style(*style) < 7 ?
  1533. X            displaywords[display_style(*style)] : "?"));
  1534. X  StringCat(res, AsciiToFull("]"));
  1535. X  return res;
  1536. X} /* end EchoStyle */
  1537. X#endif
  1538. X
  1539. X
  1540. X/*@::SpaceChange()@***********************************************************/
  1541. X/*                                                                           */
  1542. X/*  SpaceChange(style, x)                                                    */
  1543. X/*                                                                           */
  1544. X/*  Change the current break style as indicated by object x.                 */
  1545. X/*                                                                           */
  1546. X/*****************************************************************************/
  1547. X
  1548. XSpaceChange(style, x)
  1549. XSTYLE *style;  OBJECT x;
  1550. X{ GAP res_gap;  unsigned gap_inc;
  1551. X  debug2(DSS, D, "SpaceChange(%s, %s)", EchoStyle(style), EchoObject(x));
  1552. X  if( !is_word(type(x)) )
  1553. X  { Error(WARN, &fpos(x), "invalid left parameter to %s", KW_SPACE);
  1554. X  }
  1555. X  else
  1556. X  { GetGap(x, style, &res_gap, &gap_inc);
  1557. X    if( gap_inc != GAP_ABS && units(res_gap) != units(space_gap(*style)) )
  1558. X    { Error(WARN, &fpos(x), "space %s incompatible with enclosing", string(x));
  1559. X    }
  1560. X    else
  1561. X    { units(space_gap(*style)) = units(res_gap);
  1562. X      mode(space_gap(*style))  = mode(res_gap);
  1563. X      width(space_gap(*style)) = gap_inc == GAP_ABS ? width(res_gap) :
  1564. X         gap_inc == GAP_INC ? width(space_gap(*style)) + width(res_gap) :
  1565. X         max(width(space_gap(*style)) - width(res_gap), 0);
  1566. X    }
  1567. X  }
  1568. X  debug1(DSS, D, "SpaceChange returning %s", EchoStyle(style));
  1569. X} /* end SpaceChange */
  1570. X
  1571. X
  1572. X/*@::BreakChange()@***********************************************************/
  1573. X/*                                                                           */
  1574. X/*  BreakChange(style, x)                                                    */
  1575. X/*                                                                           */
  1576. X/*  Change the current break style as indicated by object x.                 */
  1577. X/*                                                                           */
  1578. X/*****************************************************************************/
  1579. X
  1580. Xstatic changebreak(style, x)
  1581. XSTYLE *style;  OBJECT x;
  1582. X{ GAP res_gap;  unsigned gap_inc;
  1583. X  if( beginsbreakstyle(string(x)[0]) )
  1584. X  {
  1585. X    /* should be a new break style option */
  1586. X    if( StringEqual(string(x), STR_BREAK_HYPHEN) )
  1587. X    hyph_style(*style) = HYPH_ON;
  1588. X    else if( StringEqual(string(x), STR_BREAK_NOHYPHEN) )
  1589. X    hyph_style(*style) = HYPH_OFF;
  1590. X    else if( StringEqual(string(x), STR_BREAK_ADJUST) )
  1591. X    fill_style(*style) = FILL_ON, display_style(*style) = DISPLAY_ADJUST;
  1592. X    else if( StringEqual(string(x), STR_BREAK_OUTDENT) )
  1593. X    fill_style(*style) = FILL_ON, display_style(*style) = DISPLAY_OUTDENT;
  1594. X    else if( StringEqual(string(x), STR_BREAK_RAGGED) )
  1595. X    fill_style(*style) = FILL_ON, display_style(*style) = DISPLAY_LEFT;
  1596. X    else if( StringEqual(string(x), STR_BREAK_CRAGGED) )
  1597. X    fill_style(*style) = FILL_ON, display_style(*style) = DISPLAY_CENTRE;
  1598. X    else if( StringEqual(string(x), STR_BREAK_RRAGGED) )
  1599. X    fill_style(*style) = FILL_ON, display_style(*style) = DISPLAY_RIGHT;
  1600. X    else if( StringEqual(string(x), STR_BREAK_LINES) )
  1601. X    fill_style(*style) = FILL_OFF, display_style(*style) = DISPLAY_LEFT;
  1602. X    else if( StringEqual(string(x), STR_BREAK_CLINES) )
  1603. X    fill_style(*style) = FILL_OFF, display_style(*style) = DISPLAY_CENTRE;
  1604. X    else if( StringEqual(string(x), STR_BREAK_RLINES) )
  1605. X    fill_style(*style) = FILL_OFF, display_style(*style) = DISPLAY_RIGHT;
  1606. X    else Error(WARN, &fpos(x), "invalid %s option %s", KW_BREAK, string(x));
  1607. X  }
  1608. X  else /* should be a new inter-line gap */
  1609. X  { GetGap(x, style, &res_gap, &gap_inc);
  1610. X    if( gap_inc != GAP_ABS && units(res_gap) != units(line_gap(*style)) )
  1611. X      Error(WARN, &fpos(x),
  1612. X            "line spacing %s incompatible with enclosing", string(x));
  1613. X    else
  1614. X    { units(line_gap(*style)) = units(res_gap);
  1615. X      mode(line_gap(*style))  = mode(res_gap);
  1616. X      width(line_gap(*style)) = gap_inc == GAP_ABS ? width(res_gap) :
  1617. X    gap_inc == GAP_INC ? width(line_gap(*style)) + width(res_gap) :
  1618. X    max(width(line_gap(*style)) - width(res_gap), 0);
  1619. X    }
  1620. X  }
  1621. X} /* end changebreak */
  1622. X
  1623. XBreakChange(style, x)
  1624. XSTYLE *style;  OBJECT x;
  1625. X{ OBJECT link, y;
  1626. X  debug2(DSS, D, "BreakChange(%s, %s)", EchoStyle(style), EchoObject(x));
  1627. X  switch( type(x) )
  1628. X  {
  1629. X    case WORD:
  1630. X    case QWORD:    changebreak(style, x);
  1631. X        break;
  1632. X
  1633. X
  1634. X    case ACAT:    for( link = Down(x);  link != x;  link = NextDown(link) )
  1635. X        { Child(y, link);
  1636. X          if( type(y) == GAP_OBJ )  continue;
  1637. X          else if( is_word(type(y)) )  changebreak(style, y);
  1638. X          else Error(WARN, &fpos(x), "invalid left parameter of %s",
  1639. X             KW_BREAK);
  1640. X        }
  1641. X        break;
  1642. X
  1643. X
  1644. X    default:    Error(WARN, &fpos(x), "invalid left parameter of %s", KW_BREAK);
  1645. X        break;
  1646. X  }
  1647. X  debug1(DSS, D, "BreakChange returning %s", EchoStyle(style));
  1648. X} /* end BreakChange */
  1649. END_OF_FILE
  1650.   if test 8879 -ne `wc -c <'z11.c'`; then
  1651.     echo shar: \"'z11.c'\" unpacked with wrong size!
  1652.   fi
  1653.   # end of 'z11.c'
  1654. fi
  1655. if test -f 'z30.c' -a "${1}" != "-c" ; then 
  1656.   echo shar: Will not clobber existing file \"'z30.c'\"
  1657. else
  1658.   echo shar: Extracting \"'z30.c'\" \(8858 characters\)
  1659.   sed "s/^X//" >'z30.c' <<'END_OF_FILE'
  1660. X/*@z30.c:Symbol uses:InsertUses()@********************************************/
  1661. X/*                                                                           */
  1662. X/*  LOUT: A HIGH-LEVEL LANGUAGE FOR DOCUMENT FORMATTING (VERSION 2.05)       */
  1663. X/*  COPYRIGHT (C) 1993 Jeffrey H. Kingston                                   */
  1664. X/*                                                                           */
  1665. X/*  Jeffrey H. Kingston (jeff@cs.su.oz.au)                                   */
  1666. X/*  Basser Department of Computer Science                                    */
  1667. X/*  The University of Sydney 2006                                            */
  1668. X/*  AUSTRALIA                                                                */
  1669. X/*                                                                           */
  1670. X/*  This program is free software; you can redistribute it and/or modify     */
  1671. X/*  it under the terms of the GNU General Public License as published by     */
  1672. X/*  the Free Software Foundation; either version 1, or (at your option)      */
  1673. X/*  any later version.                                                       */
  1674. X/*                                                                           */
  1675. X/*  This program is distributed in the hope that it will be useful,          */
  1676. X/*  but WITHOUT ANY WARRANTY; without even the implied warranty of           */
  1677. X/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            */
  1678. X/*  GNU General Public License for more details.                             */
  1679. X/*                                                                           */
  1680. X/*  You should have received a copy of the GNU General Public License        */
  1681. X/*  along with this program; if not, write to the Free Software              */
  1682. X/*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                */
  1683. X/*                                                                           */
  1684. X/*  FILE:         z30.c                                                      */
  1685. X/*  MODULE:       Symbol Uses                                                */
  1686. X/*  EXTERNS:      InsertUses(), FlattenUses(), SearchUses(),                 */
  1687. X/*                FirstExternTarget(), NextExternTarget()                    */
  1688. X/*                                                                           */
  1689. X/*****************************************************************************/
  1690. X#include "externs"
  1691. X
  1692. X
  1693. X/*****************************************************************************/
  1694. X/*                                                                           */
  1695. X/*  InsertUses(x, y)                                                         */
  1696. X/*                                                                           */
  1697. X/*  Record the fact that symbol x uses symbol y, by linking them.            */
  1698. X/*  Increment count of the number of times y is used, if y is a parameter.   */
  1699. X/*                                                                           */
  1700. X/*****************************************************************************/
  1701. X
  1702. XInsertUses(x, y)
  1703. XOBJECT x, y;
  1704. X{ OBJECT tmp;
  1705. X  debug2(DSU, D, "InsertUses( %s, %s )", SymName(x), SymName(y));
  1706. X  if( type(x) == LOCAL && type(y) == LOCAL && !predefined(y) )
  1707. X  { tmp = GetMem(USES_SIZE, no_fpos);  item(tmp) = y;
  1708. X    if( base_uses(x) == nil )  next(tmp) = tmp;
  1709. X    else next(tmp) = next(base_uses(x)), next(base_uses(x)) = tmp;
  1710. X    base_uses(x) = tmp;
  1711. X  }
  1712. X  if( is_par(type(y)) )
  1713. X  { uses_count(y) += (enclosing(y) == x ? 1 : 2);
  1714. X    if( dirty(y) || uses_count(y) > 1 )  dirty(enclosing(y)) = TRUE;
  1715. X  }
  1716. X  else if( sym_body(y) == nil || dirty(y) )  dirty(x) = TRUE;
  1717. X  debug5(DSU, D, "InsertUses returning ( %s %s; %s %s, count = %d )",
  1718. X    SymName(x), (dirty(x) ? "dirty" : "clean"),
  1719. X    SymName(y), (dirty(y) ? "dirty" : "clean"), uses_count(y));
  1720. X} /* end InsertUses */
  1721. X
  1722. X
  1723. X/*@::GatherUses(), GatherAllUses(), FlattenUses()@****************************/
  1724. X/*                                                                           */
  1725. X/*  static GatherUses(x, sym)                                                */
  1726. X/*  static GatherAllUses(x)                                                  */
  1727. X/*                                                                           */
  1728. X/*  GatherUses adds all the unmarked descendants of x to the uses relation   */
  1729. X/*  of sym;  GatherAllUses applies gather_uses to all descendants of x.      */
  1730. X/*                                                                           */
  1731. X/*****************************************************************************/
  1732. X
  1733. Xstatic GatherUses(x, sym)
  1734. XOBJECT x, sym;
  1735. X{ OBJECT link, y, tmp;
  1736. X  if( base_uses(x) != nil )
  1737. X  { link = next(base_uses(x));
  1738. X    do
  1739. X    { y = item(link);
  1740. X      if( marker(y) != sym )
  1741. X      {    if( y != sym )
  1742. X    { marker(y) = sym;
  1743. X      tmp = GetMem(USES_SIZE, no_fpos);  item(tmp) = y;
  1744. X      if( uses(sym) == nil )  next(tmp) = tmp;
  1745. X      else next(tmp) = next(uses(sym)), next(uses(sym)) = tmp;
  1746. X      uses(sym) = tmp;
  1747. X      if( indefinite(y) )  indefinite(sym) = TRUE;
  1748. X      if( uses_extern_target(y) )  uses_extern_target(sym) = TRUE;
  1749. X      GatherUses(y, sym);
  1750. X    }
  1751. X    else recursive(sym) = TRUE;
  1752. X      }
  1753. X      link = next(link);
  1754. X    } while( link != next(base_uses(x)) );
  1755. X  }
  1756. X} /* end GatherUses */
  1757. X
  1758. X
  1759. Xstatic GatherAllUses(x)
  1760. XOBJECT x;
  1761. X{ OBJECT link, y;
  1762. X  for( link = Down(x);  link != x;  link = NextDown(link) )
  1763. X  { Child(y, link);
  1764. X    if( type(y) == LOCAL )  GatherUses(y, y);
  1765. X    GatherAllUses(y);
  1766. X  }
  1767. X} /* end GatherAllUses */
  1768. X
  1769. X
  1770. X/*****************************************************************************/
  1771. X/*                                                                           */
  1772. X/*  FlattenUses()                                                            */
  1773. X/*                                                                           */
  1774. X/*  Traverse the directed graph assembled by InsertUses, finding its         */
  1775. X/*  transitive closure and storing this explicitly in uses(x) for all x.     */
  1776. X/*                                                                           */
  1777. X/*****************************************************************************/
  1778. X
  1779. XFlattenUses()
  1780. X{ GatherAllUses(StartSym);
  1781. X} /* end FlattenUses */
  1782. X
  1783. X
  1784. X/*@::SearchUses(), FirstExternTarget(), NextExternTarget()@*******************/
  1785. X/*                                                                           */
  1786. X/*  BOOLEAN SearchUses(x, y)                                                 */
  1787. X/*                                                                           */
  1788. X/*  Discover whether symbol x uses symbol y by searching the uses list of x. */
  1789. X/*                                                                           */
  1790. X/*****************************************************************************/
  1791. X
  1792. XBOOLEAN SearchUses(x, y)
  1793. XOBJECT x, y;
  1794. X{ OBJECT p;
  1795. X  debug3(DSU, DD, "SearchUses(%s, %s) uses: %d", SymName(x),SymName(y),uses(x));
  1796. X  if( x == y )  return TRUE;
  1797. X  if( uses(x) != nil )
  1798. X  { p = next(uses(x));
  1799. X    do
  1800. X    { debug1(DSU, DDD, "  checking %s", SymName(item(p)));
  1801. X      if( item(p) == y )  return TRUE;
  1802. X      p = next(p);
  1803. X    } while( p != next(uses(x)) );
  1804. X  }
  1805. X  return FALSE;
  1806. X} /* end SearchUses */
  1807. X
  1808. X
  1809. X/*****************************************************************************/
  1810. X/*                                                                           */
  1811. X/*  OBJECT FirstExternTarget(sym, cont)                                      */
  1812. X/*  OBJECT NextExternTarget(sym, cont)                                       */
  1813. X/*                                                                           */
  1814. X/*  Together these two procedures return all symbols which are both used by  */
  1815. X/*  sym and a target for at least one external galley.  Return nil at end.   */
  1816. X/*                                                                           */
  1817. X/*****************************************************************************/
  1818. X
  1819. XOBJECT FirstExternTarget(sym, cont)
  1820. XOBJECT sym, *cont;
  1821. X{ OBJECT res;
  1822. X  debug1(DSU, D, "FirstExternTarget( %s )", SymName(sym));
  1823. X  res = nil;  *cont = nil;
  1824. X  if( is_extern_target(sym) )  res = sym;
  1825. X  else if( uses(sym) != nil )
  1826. X  { *cont = next(uses(sym));
  1827. X    do
  1828. X    { if( is_extern_target(item(*cont)) )
  1829. X      {    res = item(*cont);
  1830. X    break;
  1831. X      }
  1832. X      *cont = next(*cont);
  1833. X    } while( *cont != next(uses(sym)) );
  1834. X  }
  1835. X  debug1(DSU, D, "FirstExternTarget returning %s", SymName(res));
  1836. X  return res;
  1837. X} /* end FirstExternTarget */
  1838. X
  1839. XOBJECT NextExternTarget(sym, cont)
  1840. XOBJECT sym, *cont;
  1841. X{ OBJECT res;
  1842. X  debug1(DSU, D, "NextExternTarget( %s )", SymName(sym));
  1843. X  res = nil;
  1844. X  if( *cont != nil )
  1845. X  { *cont = next(*cont);
  1846. X    while( *cont != next(uses(sym)) )
  1847. X    { if( is_extern_target(item(*cont)) )
  1848. X      {    res = item(*cont);
  1849. X    break;
  1850. X      }
  1851. X      *cont = next(*cont);
  1852. X    }
  1853. X  }
  1854. X  debug1(DSU, D, "NextExternTarget returning %s", SymName(res));
  1855. X  return res;
  1856. X} /* end NextExternTarget */
  1857. END_OF_FILE
  1858.   if test 8858 -ne `wc -c <'z30.c'`; then
  1859.     echo shar: \"'z30.c'\" unpacked with wrong size!
  1860.   fi
  1861.   # end of 'z30.c'
  1862. fi
  1863. echo shar: End of archive 29 \(of 35\).
  1864. cp /dev/null ark29isdone
  1865. MISSING=""
  1866. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 ; do
  1867.     if test ! -f ark${I}isdone ; then
  1868.     MISSING="${MISSING} ${I}"
  1869.     fi
  1870. done
  1871. if test "${MISSING}" = "" ; then
  1872.     echo You have unpacked all 35 archives.
  1873.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1874. else
  1875.     echo You still must unpack the following archives:
  1876.     echo "        " ${MISSING}
  1877. fi
  1878. exit 0
  1879. exit 0 # Just in case...
  1880.