*CMZ :          10/10/96  14.20.38  by  Girish D. Patel
*-- Author : Girish D. Patel
*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
      PROGRAM MAIN
      COMMON /INPUT/ C,AUTHOR,TYPE,DATE,AUTH,USED,NUSED,FUNC,NFUNC,
     &               NHTML,HTML,NKEEP,KEEP
      CHARACTER*80 C,AUTHOR,AUTH,HTML(100)
      CHARACTER*12 TYPE
      CHARACTER*8 DATE,KEEP(50)
      CHARACTER*6 USED(100),FUNC(100)
      CHARACTER*12 NAME(7,1000),ACTION
      CHARACTER*5 BFUNC5(8) /'MBANK','MDROP','MLINK','MPRNT',
     & 'NBANK','NDROP','NLINK','NPRNT'/
*      CHARACTER*4 BFUNC5(8) /'MBAN','MDRO','MLIN','MPRN',
*     & 'NBAN','NDRO','NLIN','NPRN'/
      CHARACTER*6 FFUNC6(14) /'FLOREN','FRDSYS','FPLT2D','FRDT2D',
     & 'FPARAB','FPPROB','FKCHPR','FKCHXY','FKHUNT','FKLOOK','FKDPHI',
     & 'FKPROB','FFKILL','FFRJCT'/
*      CHARACTER*4 FFUNC6(14) /'LORE','RDSY','PLT2','RDT2',
*     & 'PARA','PPRO','KCHP','KCHX','KHUN','KLOO','KDPH','KPRO',
*     & 'FKIL','FRJC'/
      CHARACTER*4 ICOM4
      CHARACTER*5 ICOM5
      CHARACTER*6 ICOM6
      CHARACTER*110 CARD
      CHARACTER*1 QUOTE /''''/

      LOGICAL FIRST,HTM,HTMD,SKIP
      WRITE(6,1000) ' This is a test write'

      HTM = .FALSE.
      HTMD = .FALSE.
      SKIP = .FALSE.

      NL=0
      NR=0
      NP=1
*      WRITE (6,9004) NP
      LONP=55
1     READ (10,9001,END=999) C
9001  FORMAT (A80)
      ACTION = '            '
      NL=NL+1
      IF (NL.GT.LONP) THEN
*      WRITE (6,9003) NP
9003  FORMAT (85X,'PAGE',I4)
        NP=NP+1
        NL=1
*      WRITE (6,9004) NP
9004  FORMAT ('1',84X,'PAGE',I4)
      ENDIF
*      WRITE(6,'(13X,3I5,2X,A72)') NL,NR,NP,C(1:72)

      IF(C(1:4).EQ.'*CMZ') THEN
        DATE = C(17:24)
        GO TO 1
      ENDIF
      IF(C(1:10).EQ.'*-- Author') THEN
        SKIP = .TRUE.
        AUTHOR=C
        J=13
2       IF (C(J:J).EQ.' '.and.J.LE.80) THEN
          J=J+1
          GO TO 2
        ENDIF
        JE=LENOCC(C)
        IF(C(JE:JE).GE.'0'.and.C(JE:JE).LE.'9') THEN
          JE=JE-8
          DATE = C(JE+1:JE+8)
        ENDIF
3       IF (C(JE:JE).EQ.' ') THEN
          JE=JE-1
          GO TO 3
        ENDIF
        AUTH = C(J:JE)
        GO TO 1
      ENDIF

      IF(C(1:6).EQ.'*HTMLP') THEN
        HTM = .TRUE.
        NHTML = 0
        IF(C(7:7).EQ.'*') HTMD = .TRUE.
      ENDIF

      IF(C(1:1).EQ.'*'.and.SKIP.and..NOT.HTM) GO TO 1

      IF(HTM) THEN
        IF(C(1:6).EQ.'*HTMLE') THEN
          HTM = .FALSE.
          SKIP = .FALSE.
          GO TO 1
        ENDIF
        NHTML = NHTML + 1
        IF(NHTML.GT.100) THEN
          WRITE(6,*) ' HTML array overflow, description too long '
          STOP
        ENDIF
        IF(C(1:6).EQ.'*HTMLP') THEN
          HTML(NHTML) =  '<b>SHORT SUMMARY of PURPOSE:</b> '
          GO TO 1
        ELSE IF(C(1:6).EQ.'*HTMLI') THEN
          HTML(NHTML) =
     &'<b>LIST and DESCRIPTION of INPUT VARIABLES/ARGUMENTS:</b> '
          GO TO 1
        ELSE IF(C(1:6).EQ.'*HTMLO') THEN
          HTML(NHTML) =
     &'<b>LIST and DESCRIPTION of OUTPUT VARIABLES/ARGUMENTS:</b> '
          GO TO 1
        ENDIF
        HTML(NHTML) = C(2:LENOCC(C))
        GO TO 1
      ENDIF

      CARD = C(1:72)

      IF(C(1:6).EQ.'*KEEP,') THEN

        KS = 7
        KK = 7
4       IF(C(KK:KK).NE.' '.AND.C(KK:KK).NE.'.') THEN
          KK = KK + 1
          GO TO 4
        ENDIF
        IF(KK.EQ.KS) THEN
          KS = KS + 1
          KK = KK + 1
          GO TO 4
        ENDIF
        NKEEP = NKEEP + 1
        IF(NKEEP.GT.50) THEN
          WRITE(6,*) ' KEEP array overflow, too many *KEEP '
          STOP
        ENDIF
        KEEP(NKEEP)  = C(KS:KK-1)

      ENDIF

      IF(C(1:1).EQ.'*' .OR. C(1:1).EQ.'C') THEN
        WRITE (1,1000) CARD
        WRITE (2,1000) CARD
        GO TO 1
      ENDIF

      FIRST = .TRUE.
      JC = 0
      DO 10 I=1,80
        IF (C(I:I).NE.' ') THEN
          IF (FIRST .AND. C(I:I+9).EQ.'SUBROUTINE') THEN
            TYPE='SUBROUTINE  '
            ACTION = 'ROUTINE     '
            J=I+10
            GO TO 20
          ELSE IF (FIRST .AND. C(I:I+7).EQ.'FUNCTION') THEN
            TYPE='FUNCTION    '
            ACTION = 'ROUTINE     '
            J=I+8
            GO TO 20
          ELSE IF (FIRST .AND. C(I:I+15).EQ.'INTEGER FUNCTION') THEN
            TYPE='FUNCTION    '
            ACTION = 'ROUTINE     '
            J=I+16
            GO TO 20
          ELSE IF (FIRST .AND. C(I:I+15).EQ.'LOGICAL FUNCTION') THEN
            TYPE='FUNCTION    '
            ACTION = 'ROUTINE     '
            J=I+16
            GO TO 20
          ELSE IF (FIRST .AND.
     &             C(I:I+24).EQ.'DOUBLE PRECISION FUNCTION') THEN
            TYPE='FUNCTION    '
            ACTION = 'ROUTINE     '
            J=I+25
            GO TO 20
          ELSE IF (FIRST .AND. C(I:I+6).EQ.'PROGRAM') THEN
            TYPE='PROGRAM     '
            ACTION = 'ROUTINE     '
            J=I+7
            GO TO 20
          ELSE IF (FIRST .AND. C(I:I+9).EQ.'BLOCK DATA') THEN
            TYPE='BLOCK DATA  '
            ACTION = 'ROUTINE     '
            J=I+10
            GO TO 20
          ELSE IF (FIRST .AND. C(I:I+4).EQ.'ENTRY' ) THEN
            TYPE='ENTRY       '
            ACTION = 'ROUTINE     '
            J=I+5
            GO TO 20
          ELSE IF (FIRST .AND. C(I-1:I+4).EQ.' CALL ') THEN
            TYPE='CALL        '
            ACTION = 'CALL        '
            JC=I
            J=I+4
            GO TO 20
          ELSE IF(FIRST) THEN
            FIRST = .FALSE.
          ELSE IF(.NOT.FIRST) THEN

            IF(C(I-1:I+4).EQ.' CALL ') THEN
              TYPE='CALL        '
              ACTION = 'CALL        '
              JC=I
              J=I+4
              GO TO 20
            ENDIF

            ICOM5 = C(I:I+4)
            IND = IHCOMP(ICOM5,BFUNC5,8)
            IF(IND.NE.0) THEN
              J=I+5
              GO TO 40
            ENDIF
            IF(C(I:I+5).EQ.'NAMIND') THEN
              J=I+6
              GO to 40
            ENDIF
            IF(C(I:I).EQ.'F') THEN
              ICOM6 = C(I:I+5)
              IND = IHCOMP(ICOM6,FFUNC6,14)
              IF(IND.NE.0 .AND. NAME(1,NR)(1:5).NE.C(I:I+4)) THEN
                CALL CALLIT(I,I+5,JC)
                GOTO 1
              ENDIF
            ENDIF
            IF(C(I:I+4).EQ.'FFCHG'
     &             .AND. NAME(1,NR)(1:5).NE.'FFCHG') THEN
              CALL CALLIT(I,I+4,JC)
              GOTO 1
            ENDIF
          ENDIF
        ENDIF
10    CONTINUE
      WRITE (2,1000) C(1:72)
      GO TO 1
20    IF (C(J:J).EQ.' '.and.J.LE.80) THEN
        J=J+1
        GO TO 20
      ENDIF
      J1=J
30    IF (C(J:J).NE.'('.AND.C(J:J).NE.' '.and.J.LE.80) THEN
        J=J+1
        GO TO 30
      ENDIF

      IF(ACTION.EQ.'ROUTINE') THEN
        NR=NR+1
        IF(NR.GT.1000) THEN
          WRITE(6,*) ' NAME array overlay, too many routines '
          STOP
        ENDIF
        NAME(1,NR)=C(J1:J-1)
        NAME(2,NR)=TYPE
        NAME(3,NR)=C(J1+4:J1+4)//C(J1+3:J1+3)//C(J1+2:J1+2)//
     &             C(J1+1:J1+1)
        NAME(4,NR)=AUTH(1:12)
        NAME(5,NR)=AUTH(13:24)
        NAME(6,NR)=DATE
        NAME(7,NR)='           '
        IF(HTMD) THEN
          NAME(7,NR)='*HTML filled'
          HTMD = .FALSE.
        ENDIF
        CALL START(J1,J-1)
        GO TO 1
      ENDIF

      IF(ACTION.EQ.'CALL' .and. C(J1:J1) .EQ.'F'
     &                    .and. C(J1:J-1).NE.'FPARM'
     &                    .and. C(J1:J-1).NE.'FWLOOK') THEN
        CALL CALLIT(J1,J-1,JC)
        GO TO 1
      ENDIF
      IF(ACTION.EQ.'CALL'  .and.( C(J1:J-1).EQ.'BKFMT'
     &                      .or.  C(J1:J-1).EQ.'BKFRW'
     &                      .or.  C(J1:J-1).EQ.'BKTOW'
     &                      .or.  C(J1:J-1).EQ.'BDROP'
     &                      .or.  C(J1:J-1).EQ.'UGTBNK') ) THEN
        GO TO 40
      ELSE IF(ACTION.EQ.'CALL') THEN
        CARD=C(1:JC-1)//'<b>'//C(JC:JC+3)//'</b>'//C(JC+4:72)
        WRITE (1,1000) CARD
        WRITE (2,1000) CARD
        GO TO 1
      ELSE
        WRITE (2,1000) C(1:72)
        GO TO 1
      ENDIF
40    IF (C(J:J).NE.QUOTE.and.J.LE.80) THEN
        J=J+1
        GO TO 40
      ENDIF
      IF(C(J+1:J+1).EQ.'F' .and. C(J+5:J+5).EQ.QUOTE) THEN
        CALL BANKIT(J+1,J+4,JC)
      ELSE IF(ACTION.EQ.'CALL') THEN
        CARD=C(1:JC-1)//'<b>'//C(JC:JC+3)//'</b>'//C(JC+4:72)
        WRITE (1,1000) CARD
        WRITE (2,1000) CARD
        GO TO 1
      ELSE
        WRITE (2,1000) C(1:72)
        GO TO 1
      ENDIF
      GO TO 1
999   CONTINUE
      NOLD = NR
      CALL SORTI(NAME,21,NR,7)
      OPEN(UNIT=3,FILE='INDEX.html',STATUS='NEW')
*
      WRITE(3,1000) '<html>'
      WRITE(3,1000) '<header>'
      WRITE(3,1000) '<TITLE>Index of Routines</TITLE>'
      WRITE(3,1000) '</header>'
      WRITE(3,1000) '<body>'
      WRITE(3,1000) '<pre>'
*
      DO I = 1 , NOLD
        CARD = NAME(2,I)//'<A HREF="'
     & //NAME(1,I)(1:LENOCC(NAME(1,I)))
     & //'.H.html">'//NAME(1,I)(1:LENOCC(NAME(1,I)))//'</A>'
       IF(LENOCC(CARD)+3.LT.54) THEN
         K = LENOCC(NAME(1,I)) + 43
         CARD(K+1:K+12) = NAME(4,I)
         CARD(K+13:K+24) = NAME(5,I)
         CARD(K+25:K+36) = NAME(6,I)
         CARD(K+40:K+51) = NAME(7,I)
       ELSE
         WRITE(6,*) ' *** ERROR *** ',LENOCC(CARD),CARD
       ENDIF
        WRITE(3,1000) CARD(1:LENOCC(CARD))
      ENDDO

      WRITE(3,1000) '</pre>'
      WRITE(3,1000) '</body>'
      WRITE(3,1000) '</html>'
1000  FORMAT(A)
      WRITE(6,*) ' Number of routines = ',NOLD
      CALL BANKIT(0,0,0)
      CLOSE(1)
      CLOSE(2)
      CLOSE(3)
      CLOSE(11)
      STOP
      END
*CMZ :          10/10/96  11.24.32  by  Unknown
*-- Author :
*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
      SUBROUTINE START(I,J)
      COMMON /INPUT/ C,AUTHOR,TYPE,DATE,AUTH,USED,NUSED,FUNC,NFUNC,
     &               NHTML,HTML,NKEEP,KEEP
      CHARACTER*80 C,AUTHOR,AUTH,HTML(100)
      CHARACTER*12 TYPE,OLDSUB
      CHARACTER*8 DATE,KEEP(50)
      CHARACTER*6 USED(100),FUNC(100)
      CHARACTER*15 FNAME
      CHARACTER*40 TITLE1,TITLE2,TIT12
      CHARACTER*110 CARD,CARD1,CARD2

      DATA NCALL /0/
*
      NCALL = NCALL + 1
      WRITE(6,*) ' START ',NCALL,' ',C(I:J)
      TITLE1 = '<TITLE>        COMMENTS</TITLE>'
      TIT12  = '<TITLE>        WRITEUP</TITLE>'
      TITLE2 = '<TITLE>                  </TITLE>'
      TITLE1(8:8+J-I) = C(I:J)
      TIT12(8:8+J-I)  = C(I:J)
      TITLE2(8:19) = TYPE
      TITLE2(19:25) = C(I:J)
      CARD1 = C(1:I-1)//'<A HREF="'//C(I:J)//'.F.html">'//C(I:J)//
     & '</A>'//C(J+1:LENOCC(C))
      CARD2 = C(1:I-1)//'<A HREF="'//C(I:J)//'.H.html">'//C(I:J)//
     & '</A>'//C(J+1:LENOCC(C))
*
      IF(NCALL.EQ.1) THEN
        NKEEP = 0
        NUSED = 0
        OLDSUB = C(I:J)
      ENDIF
      IF(NCALL.NE.1) THEN
        WRITE(1,1000) '</pre>'
        WRITE(1,1000) '</body>'
        WRITE(1,1000) '</html>'
	CLOSE(1)
        WRITE(2,1000) '</pre>'
        WRITE(2,1000) '</body>'
        WRITE(2,1000) '</html>'
        CLOSE(2)
        IF(NUSED.EQ.0) THEN
          WRITE(12,1000) 'None'
        ENDIF
        WRITE(12,1000) ' '
        WRITE(12,1000) '<b>FUNCTIONS USED :</b>'
        WRITE(12,1000) ' '
        IF(NFUNC.EQ.0) THEN
          WRITE(12,1000) 'None'
        ELSE
          WRITE(6,*) ' 	START ',OLDSUB(1:LENOCC(OLDSUB)),
     &       NFUNC,(FUNC(K),K=1,NFUNC)
          IF(NFUNC.EQ.1) THEN
            CARD = '<A HREF="'//FUNC(1)(1:LENOCC(FUNC))
     &      //'.H.html">'
     &      //FUNC(1)(1:LENOCC(FUNC))//'</A>'
            WRITE(12,1000) CARD
          ELSE IF(NFUNC.EQ.2) THEN
            CARD = '<A HREF="'//FUNC(1)(1:LENOCC(FUNC))
     &      //'.H.html">'
     &      //FUNC(1)(1:LENOCC(FUNC))//'</A>'
            CARD = CARD(1:LENOCC(CARD))//' , <A HREF="'
     &      //FUNC(2)(1:LENOCC(FUNC))//'.H.html">'
     &      //FUNC(2)(1:LENOCC(FUNC))//'</A>'
           WRITE(12,1000) CARD
          ELSE
          DO KK = 1 , NFUNC
            CARD = '<A HREF="'//FUNC(KK)(1:LENOCC(FUNC))
     &      //'.H.html">'
     &      //FUNC(KK)(1:LENOCC(FUNC))//'</A>'
            IF(KK.NE.NFUNC) CARD = CARD(1:LENOCC(CARD))//' , '
            WRITE(12,1000) CARD
          ENDDO
          ENDIF
          NFUNC = 0
        ENDIF

        WRITE(12,1000) ' '
        WRITE(12,1000) '<b>KEEP SEQUENCES USED :</b>'
        WRITE(12,1000) ' '
        IF(NKEEP.EQ.0) THEN
          WRITE(12,1000) 'None'
        ELSE
          WRITE(6,*) '  STARTK ',OLDSUB(1:LENOCC(OLDSUB)),
     &       NKEEP,(KEEP(K),K=1,NKEEP)
          CARD = ' '
          DO K = 1 , NKEEP
            CARD = CARD(1:LENOCC(CARD))//' '//KEEP(K)(1:8)
            IF(LENOCC(CARD).GT.60) THEN
              WRITE(12,1000) CARD
              CARD = ' '
            ENDIF
          ENDDO
          WRITE(12,1000) CARD
        ENDIF

        WRITE(12,1000) ' '
        WRITE(12,1000) '<hr>'
        WRITE(12,1000) ' '
        CARD = '<A HREF="'//OLDSUB(1:LENOCC(OLDSUB))
     &  //'.C.html">Comments</A> from '
     &  //OLDSUB(1:LENOCC(OLDSUB))
        WRITE(12,1000) CARD
        WRITE(12,1000) '</pre>'
        WRITE(12,1000) '</body>'
        WRITE(12,1000) '</html>'
        CLOSE(12)
        NKEEP = 0
        NUSED = 0
        OLDSUB = C(I:J)
      ENDIF
*
      FNAME(1:J-I+1)=C(I:J)
      FNAME(J-I+2:J-I+8)='.H.html'
      FNAME(J-I+9:15) = '       '
      OPEN(UNIT=12,FILE=FNAME,STATUS='NEW')
      FNAME(J-I+2:J-I+8)='.C.html'
      FNAME(J-I+9:15) = '       '
      OPEN(UNIT=1,FILE=FNAME,STATUS='NEW')
      FNAME(J-I+2:J-I+8)='.F.html'
      FNAME(J-I+9:15) = '       '
      OPEN(UNIT=2,FILE=FNAME,STATUS='NEW')
*
      WRITE(1,1000) '<html>'
      WRITE(1,1000) '<header>'
      WRITE(12,1000) TIT12(1:LENOCC(TITLE1))
      WRITE(12,1000) '</header>'
      WRITE(12,1000) '<body>'
      WRITE(12,1000) '<pre>'
      WRITE(12,1000) ' '
      CARD = '<b>'//TYPE//':</b> <A HREF="'//C(I:J)
     & //'.F.html">'//C(I:J)//'</A>'//C(J+1:LENOCC(C))
      WRITE(12,1000) CARD(1:LENOCC(CARD))
      WRITE(12,1000) ' '
      CARD = '<b>AUTHOR : </b>'//AUTH(1:LENOCC(AUTH))
      WRITE(12,1000) CARD(1:LENOCC(CARD))
      WRITE(12,1000) ' '
      CARD = '<b>DATE : </b>'//DATE
      WRITE(12,1000) CARD(1:LENOCC(CARD))
      WRITE(12,1000) ' '
      WRITE(12,1000) '<b>LANGUAGE :</b> FORTRAN'
      WRITE(12,1000) ' '
      IF(NHTML.EQ.0) THEN
        WRITE(12,1000) '<b>SHORT SUMMARY of PURPOSE:</b> '
        WRITE(12,1000) ' '
        WRITE(12,1000) ' '
        WRITE(12,1000) ' '
        WRITE(12,1000)
     & '<b>LIST and DESCRIPTION of INPUT VARIABLES/ARGUMENTS:</b> '
        WRITE(12,1000) ' '
        IF(C(J+1:J+1).EQ.'(') THEN
          WRITE(12,1000) C(J+1:LENOCC(C))
        ELSE
          WRITE(12,1000) ' '
        ENDIF
        WRITE(12,1000) ' '
        WRITE(12,1000)
     & '<b>LIST and DESCRIPTION of OUTPUT VARIABLES/ARGUMENTS:</b> '
        WRITE(12,1000) ' '
        IF(C(J+1:J+1).EQ.'(') THEN
          WRITE(12,1000) C(J+1:LENOCC(C))
        ELSE
          WRITE(12,1000) ' '
        ENDIF
      ELSE
        DO IHTML = 1 , NHTML
          WRITE(12,1000) HTML(IHTML)
        ENDDO
        NHTML = 0
      ENDIF
      WRITE(12,1000) ' '
      CARD = '<A NAME="tree"><b>CALLING TREE from '
     & //C(I:J)//' :</b></A>'
      WRITE(12,1000) CARD(1:LENOCC(CARD))
      WRITE(12,1000) ' '
*
      WRITE(1,1000) '<html>'
      WRITE(1,1000) '<header>'
      WRITE(1,1000) TITLE1(1:LENOCC(TITLE1))
      WRITE(1,1000) '</header>'
      WRITE(1,1000) '<body>'
      WRITE(1,1000) '<pre>'
      WRITE(1,1000) AUTHOR(1:LENOCC(AUTHOR))
      WRITE(1,1000) CARD1(1:LENOCC(CARD1))
*
      WRITE(2,1000) '<html>'
      WRITE(2,1000) '<header>'
      WRITE(2,1000) TITLE2(1:LENOCC(TITLE2))
      WRITE(2,1000) '</header>'
      WRITE(2,1000) '<body>'
      WRITE(2,1000) '<pre>'
      WRITE(2,1000) AUTHOR(1:LENOCC(AUTHOR))
      WRITE(2,1000) CARD2(1:LENOCC(CARD2))
*
      DATE = '        '
1000  FORMAT(A)
      RETURN
      END
*CMZ :          10/10/96  11.48.48  by  Girish D. Patel
*-- Author :
      SUBROUTINE CALLIT(I,J,JC)
      COMMON /INPUT/ C,AUTHOR,TYPE,DATE,AUTH,USED,NUSED,FUNC,NFUNC,
     &               NHTML,HTML,NKEEP,KEEP
      CHARACTER*80 C,AUTHOR,AUTH,HTML
      CHARACTER*12 TYPE
      CHARACTER*8 DATE,KEEP(50)
      CHARACTER*6 USED(100),FUNC(100)
      CHARACTER*6 ICOM
      CHARACTER*12 BLANK /'            '/
      CHARACTER*110 CARD1,CARD2,CARD12
      DATA NCALL /0/
*
      NCALL = NCALL + 1
      WRITE(6,*) ' CALLIT ',NCALL,' ',C(I:J)
      IF(JC.EQ.0) THEN
        CARD1 = C(1:I-1)
     &   //'<A HREF="'//C(I:J)//'.H.html">'//C(I:J)
     &   //'</A>'//C(J+1:LENOCC(C))
        CARD2 = C(1:I-1)
     &   //'<A HREF="'//C(I:J)//'.F.html">'//C(I:J)
     &   //'</A>'//C(J+1:LENOCC(C))
        ICOM = C(I:J)//BLANK
        IF(NFUNC.EQ.0) THEN
          NFUNC = 1
          FUNC(NFUNC) = ICOM
          IND = 1
        ELSE
          IND = IHCOMP(ICOM,FUNC,NFUNC)
        ENDIF
        WRITE(6,*) ' CALLIT FUNC',NFUNC,ICOM,FUNC(NFUNC),IND
        IF(IND.EQ.0) THEN
          NFUNC = NFUNC + 1
          IF(NHTML.GT.50) THEN
            WRITE(6,*) ' HTML array overflow, description too long '
            STOP
          ENDIF
          FUNC(NFUNC) = ICOM
        ENDIF

      ELSE
        CARD1 = C(1:JC-1)//'<b>'//C(JC:JC+3)//'</b>'//C(JC+4:I-1)
     &   //'<A HREF="'//C(I:J)//'.H.html">'//C(I:J)
     &   //'</A>'//C(J+1:LENOCC(C))
        CARD2 = C(1:JC-1)//'<b>'//C(JC:JC+3)//'</b>'//C(JC+4:I-1)
     &   //'<A HREF="'//C(I:J)//'.F.html">'//C(I:J)
     &   //'</A>'//C(J+1:LENOCC(C))
        ICOM = C(I:J)//BLANK
        IF(NUSED.EQ.0) THEN
          NUSED = 1
          USED(NUSED) = ICOM
          IND = 0
        ELSE
          IND = IHCOMP(ICOM,USED,NUSED)
        ENDIF
        WRITE(6,*) ' CALLIT USED ',NUSED,ICOM,USED(NUSED),IND
        IF(IND.EQ.0) THEN
          NUSED = NUSED + 1
          IF(NUSED.GT.100) THEN
            WRITE(6,*) ' USED array overflow, too many routines called '
            STOP
          ENDIF
          USED(NUSED) = ICOM
          CARD12='  <b>'//C(JC:JC+3)//'</b> '
     &     //'<A HREF="'//C(I:J)//'.H.html">'//C(I:J)
     &     //'</A>'//BLANK(1:11+I-J)
     &     //'<A HREF="'//C(I:J)//'.H.html#tree">== tree ==></A>'
          WRITE(12,1000) CARD12(1:LENOCC(CARD12))
        ENDIF
      ENDIF
*
      WRITE(1,1000) CARD1(1:LENOCC(CARD1))
      WRITE(2,1000) CARD2(1:LENOCC(CARD2))
*
1000  FORMAT(A)
      RETURN
      END
*CMZ :          10/10/96  11.24.32  by  Unknown
*-- Author :
      SUBROUTINE BANKIT(I,J,JC)
      COMMON /INPUT/ C,AUTHOR,TYPE,DATE,AUTH,USED,NUSED,FUNC,NFUNC,
     &               NHTML,HTML,NKEEP,KEEP
      CHARACTER*80 C,AUTHOR,AUTH,HTML
      CHARACTER*12 TYPE
      CHARACTER*8 DATE,KEEP(50)
      CHARACTER*6 USED(100),FUNC(100)
      CHARACTER*110 CARD
      CHARACTER*4 MBANKS(2,1000),ICOM

      DATA NCALL /0/
      DATA NBANKS /0/
*
      IF(I.eq.0 .and. J.eq.0) go to 999
      NCALL = NCALL + 1
      ICOM = C(I:J)
      IF(NBANKS.NE.0) THEN
        IND = IUCOMP(ICOM,MBANKS,NBANKS*2)
      ELSE
        IND = 0
      ENDIF
      IF(NCALL.EQ.1) THEN
        MBANKS(1,1) = ICOM
        MBANKS(2,1) = ICOM(4:4)//ICOM(3:3)//ICOM(2:2)//ICOM(1:1)
        NBANKS = 1
        WRITE(6,*) ' BANKIT ',ICOM,' ',NBANKS,' ',IND
      ELSE IF(IND.EQ.0) THEN
        NBANKS = NBANKS + 1
        MBANKS(1,NBANKS) = ICOM
        MBANKS(2,NBANKS) = ICOM(4:4)//ICOM(3:3)//ICOM(2:2)//ICOM(1:1)
        WRITE(6,*) ' BANKIT ',ICOM,' ',NBANKS,' ',IND
      ENDIF
      IF(JC.EQ.0) THEN
        CARD = C(1:I-1)//'<A HREF="'//C(I:J)//'.DDL.html">'//
     &   C(I:J)//'</A>'//C(J+1:LENOCC(C))
      ELSE
        CARD = C(1:JC-1)//'<b>'//C(JC:JC+3)//'</b>'//C(JC+4:I-1)
     &   //'<A HREF="'//C(I:J)//'.DDL.html">'
     &   //C(I:J)//'</A>'//C(J+1:LENOCC(C))
      ENDIF
*
      WRITE(1,1000) CARD(1:LENOCC(CARD))
      WRITE(2,1000) CARD(1:LENOCC(CARD))
      RETURN
*      ENTRY BANKIN
  999 CONTINUE
      OPEN(UNIT=11,FILE='INDEX.DDL.html',STATUS='NEW')
*
      WRITE(11,1000) '<html>'
      WRITE(11,1000) '<header>'
      WRITE(11,1000) '<TITLE>Index of Banks</TITLE>'
      WRITE(11,1000) '</header>'
      WRITE(11,1000) '<body>'
      WRITE(11,1000) '<pre>'
*
      NB = NBANKS
      CALL SORTI(MBANKS,2,NB,2)
      DO I = 1 , NBANKS
        CARD = '<A HREF="'//MBANKS(1,I)(1:LENOCC(MBANKS(1,I)))
     & //'.DDL.html">'//MBANKS(1,I)(1:LENOCC(MBANKS(1,I)))//
     & '</A>'
        WRITE(11,1000) CARD(1:LENOCC(CARD))
      ENDDO

      WRITE(11,1000) '</pre>'
      WRITE(11,1000) '</body>'
      WRITE(11,1000) '</html>'
      WRITE(6,*) ' Number of banks    = ',NBANKS
*
1000  FORMAT(A)
      RETURN
      END
*CMZ :          10/10/96  11.24.32  by  Unknown
*-- Author :
      FUNCTION IHCOMP(ICOM,JARR,NARR)
      CHARACTER*(*) ICOM,JARR(NARR)
      IHCOMP = 0
      DO I = 1 , NARR
        IF(ICOM.EQ.JARR(I)) THEN
          IHCOMP = I
          RETURN
        ENDIF
      ENDDO
      RETURN
      END
