1 .* ***********************************************************
2 .* * *
3 .* * *
4 .* * Copyright, C Honeywell Information Systems Inc., 1981 *
5 .* * *
6 .* * *
7 .* ***********************************************************
8 .* TO SURROUND ASCII EXAMPLES
9 .* ..example N table on with N extra indents in table format
10 .* ..example_off off
11 .*
12 .srv WHICH_INDENT
13 .*
14 .ur .go %InputFileName%
15 .rt
16 .* turn it on
17 .la example
18 .srv EXAMPLE_TABLE 0 ;.* reset table flag
19 .ur .srv EXAMPLE_INDENT %PAR_INDENT% ;.* example text at next level
20 .srv LN_INDENT 0 ;.* clear line number indent
21 .srv FILL_ON %FillMode% ;.* record fill mode setting
22 .ts %TableMode% = 0 ;.* need space if not in a table
23 .spt 1
24 .indctl on
25 .*
26 .if %ArgCount% > 0 ;.* any extra indents for
27 .then ;.* bullets and line numbers?
28 .ur .srv EXAMPLE_INDENT %EXAMPLE_INDENT% + %%%Arg1% * %PAR_INDENT%%%
29 .srv LN_INDENT %EXAMPLE_INDENT% - %PAR_INDENT%
30 .*
31 .if %ArgCount% > 1 ;.* table format given?
32 .then .ur .tan %Arg2% ;.* set the table format
33 .srv EXAMPLE_TABLE -1 ;.* set table flag
34 .bbc 1 ;.* set up column 1
35 .ur .inl %EXAMPLE_INDENT% ;.* set extra indentation
36 .fnt ascii9 ;.* example text in ascii
37 .fif ;.* turn fill off
38 .bbc 2 ;.* set up column 2
39 .ur .inl %HYPHEN_WIDTH% ;.* for the hyphen
40 .bbc 0 ;.* to record these parms
41 .endif
42 .endif
43 .*
44 .fnt ascii9 ;.* switch to ascii for box
45 .fif ;.* turn fill off
46 .bbk ;.* start the keep
47 .bba ;.* start the artwork
48 .ctd x ;.* change title delimiter
49 .bbe 1
50 x-^H|xx*^H|x ;.* box top
51 .ctd ;.* restore title delimiter
52 .spf
53 .ur .inl +%EXAMPLE_INDENT% ;.* set extra indentation
54 .indctl
55 .rt
56 .* turn example off
57 .la example_off
58 .*
59 .ts %EXAMPLE_TABLE% = 0
60 .go NOT_TABLE
61 .*
62 .bbc 1
63 .ur .inl %WHICH_INDENT% ;.* restore indentation
64 .bbc 0
65 .inl 0 ;.* restore indentation
66 .bbe 1
67 |-^H~||*^H~| ;.* box bottom
68 .bea ;.* end art
69 .bek ;.* end the keep
70 .fnt ;.* pop the font stack
71 .inl 0 ;.* back to page margin
72 .taf
73 .go EXAMPLE_END
74 .*
75 .la NOT_TABLE
76 .ur .inl -%EXAMPLE_INDENT% ;.* restore indentation
77 .bbe 1
78 |-^H~||*^H~| ;.* box bottom
79 .bea ;.* end art
80 .bek ;.* end the keep
81 .fnt ;.* pop the font stack
82 .*
83 .la EXAMPLE_END
84 .spb 1 ;.* finish up
85 .ts %FILL_ON%
86 .fin
87 .rt
88 t