Google
 

Trailing-Edge - PDP-10 Archives - steco_19840320_1er_E35 - 10,5676/teco/macros/tecdoc.tec
There is 1 other file named tecdoc.tec in the archive. Click here to see a list.
!This TECO macro is used to properly format the various		!
!documentation files produced by RUNOFF from TECO.RND.  It is	!
!called from TECDOC.MIC.					!

!Step 1.  Produce a table of contents for TECO.DOC		!

  ERteco.doc EY EY .,.Xc     !Open file, skip the first page, intialize Qc!
  <_----;-L S  R Xa .U1   !Search for underscores, grab previous line!
  J SPage  \Up               !Now go to the top and grab page number!
  ZJ .U2 I a 2R .-Q2U3 !Insert line in lower case at Z, get length!
  Q3-(Q3/2*2)"N I. %3'      !If length is odd, insert an extra period!
  66-Q3/2<I .>               !Insert dots...!
  I   Qp-10"L I ' Qp\       !Insert page number!
  Q2J <SAV; R 1A-32U4 D Q4I>    !Capitalize title!
  Q2J <FS And  and ;>       !Picky...!
  Q2J <FS A  a ;>           !...Picky!
  Q2J Gc Q2,ZXc Q2,ZK         !Append line to Qc!
  Q1J 2L>                     !Return to where we left off and continue!
Step 1 Complete.


!Step 2.  Insert table of contents into TECO.DOC, and remove control chars!

  EBteco.doc/inplace EY <^E"L 0;' A>  !Open file, get complete first page!
  STable of Contents 2L .,ZK Gc       !Find  spot, kill old and put in new!
  J <FN[,,<3>,,];>  !Remove control chars!
  EF                                   !Close file!
Step 2 Complete.


!Step 3.  Put into TECO.RND for good measure!

  EBteco.rnd/inplace EY NTable of Contents S.LIT L
  FD.END LIT GC I.END LIT 1000P EF
Step 3 Complete.


!Step 4.  Remove control characters from TECO.CRD!

  EBteco.crd/inplace                      !Open file!
  <FN[,,<3>,,];>  !Remove control chars!
  EF                                       !Close file!
Step 4 Complete.
TECDOC is done!