Google
 

Trailing-Edge - PDP-10 Archives - steco_19840320_1er_E35 - 10,5676/teco/macros/con200.tco
There is 1 other file named con200.tco in the archive. Click here to see a list.
!;TABLE OF CONTENTS GENERATOR %2:!
	[1 [2 [3 [L [S [M [T [P [N [F
	^A "?" for help^A
!ST!	0UC E.(C)$ I:ER$
	^A
File: ^A
	.U3
!NXCHR!	^TUT
	QT-^O10"E .-Q3"N -D' ONXCHR$'
	QT-^^?"E ^A
Type the filespec of the (MACRO) program for which you want the table
of contents.  Default ext. is .MAC.  End with <CR>.^A OST$'
	QT-^O177"E .-1,.T :-D ONXCHR$'
	QT-^^^U"E ^A`^U^A OST$'
	QT-^O15"N QTI$ ONXCHR$'
	^T $I^R$$ J :S.$"F Z-1J I.MAC$'
	E.(.) MC"F^ANot Found.^A OST$'
!ST2!	E.(C) HK I;Table of Contents for $ ^ANAME: ^A
	.U3
!NXC!	^TUT
	QT-^O10"E .-Q3"N -D' ONXC$'
	QT-^^?"E ^A
Type the name to be included in the "Table of Contents for <name>" head-
ing, which is included in the table (probably the program name).
end with <CR>.
^A
	    OST2$'
	QT-^O177"E.-1,.T:-D$ONXC$'
	QT-^^^U"E^A^U
^A
	         OST2$'
	QT-^O15"NQTI$ONXC$'
	^T$ .U1 (66-.)/2U2 BJ C Q2<i $> Q1+Q2J I
;
;
;`	`	`	   Section`	`	`	      Page
;
$
!FIRST!	-1UN ^AFIRST? ^A
	^TUT QT"V QT-^o40UT'
	QT-^O15"E ^T ^^NUT'
	QT-^^N"N QT-^^Y"N ^A
Type "Y" if you want to include the first SUBTTL in the table, "N" if
not (e.g. if it's the author's name).  No <CR>.
^A
			  OFIRST$
		       '
		 %N
	       '
	^A
[Wait]
^A
	1UP E.(.) EY
!RESTART!
	^E"E A ^N"EORESTART$''
!NEWPG!	0UF :SSUBTTL$"F ONXTPG$'
	QN"L %N ONEWPG$'
!AGAIN!	C
	1A-^O15"N
	  1A-^O12"N
	    1A-^O11"N
	      1A-^O40"N
			!;NOW COPY THE LINE!
			0,.K L .,ZK
			J:S -- $"S
				  <1A-^O40"N 0;' D>
				  5R
				  <1A-^O40"N 0;' D R>
				  5C
				  QM"G  HXF
				 	XL 4R .,ZK 13I$ 10I$
					ZUT GS
					Z-(2*QT)"E QTJ !;Truncate if too long!
						   I:B,$ QT\ IS$
						   (Z-.-36)"G (z-.-36)D'
						   ZJ I^R$$
						   QTJ .,ZXT
						   MT"S OSAME$'
						'
					HK GF J
					:S -- $"F ^AOOPS...^A'
				    '
				  0UM XL 4R K 13I$ 10I$
				  -XS HK I;$
				  0UT QN-8"G%T$QN-98"G%T$QN-998"G%T$QN-9998"G%T''''
				  4-QT<I $> %N\ I. $ GS E.(C) ZJ G.
!SAME!				  E.(.) HK I;$
				  0UT QN-9"G%T$QN-99"G%T$QN-999"G%T$QN-9999"G%T''''
				  9-QT<I $> QN\ I.$ %M\
				  0UT QM-9"G%T$QM-99"G%T$QM-999"G%T'''
				  3-QT<I $> OCONT$
				'
			0UM
			XL HK I;$
			0UT QN-8"G%T$QN-98"G%T$QN-998"G%T$QN-9998"G%T$''''
			4-QT<I $> %N\ I. $
!CONT!			GL -2D J :S`	$"S R K'
			ZJ
			Z-60"G 60J .,ZK '
			I $ Z/2*2-Z"N I.$'
			62-Z/2<I .$>
			0UT QP-9"G%T$QP-99"G%T$QP-999"G%T$''' !;Insert page #!
			3-QT<I $> QP\ 13I$ 10I$
			1UF J GC HXC	!;Concatenate to text already in C!
		     '
		   '
!;AT THIS POINT, WE EITHER PROCESSED LINE, OR FOUND TAB OR SPACE ABOVE!
	    QF"E OAGAIN$'
		 '
	       '
!NXTPG!	^N"E EY
!GETFF!	     ^E"E A ^N"EOGETFF$'' %P
	     ONEWPG$
	  '	!;Now we can process this page!
!;AT THIS POINT, WE ARE DONE.!
	1et ^A^G[Contents are in Q-reg C]^G
^A
	0et HK EF
	]F ]N ]P ]T ]M ]S ]2 ]1 ]L