C   12/03/84            MEMBER NAME  FFITYPE  (S)           FORTRAN
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C
C FFITYPE FINDS THE FFITYP OF ADC I RELATIVE TO ADC ONE
C (SOFTWARE ADDRESSES) - SEE CLSPS FOR EXPLANATION
C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
      FUNCTION FFITYP(IN,ONIN)
      INTEGER ONE,ONIN
C
      ONE=ONIN
      I = IN
C
C SUBTRACT 8 UNTILL 1<= X <=8
C
      DO 10 J=1,5
      IF(I.LE.8)GOTO 11
      I=I-8
  10   CONTINUE
  11       CONTINUE
C
C
C SUBTRACT 8 UNTILL 1<= X <=8
C
C
      DO 12 J=1,5
      IF(ONE.LE.8)GOTO 13
      ONE=ONE-8
 12   CONTINUE
 13   CONTINUE
C
C
C FIX FOR END BLOCKS
C
      IF((ONE.EQ.1).AND.(I.EQ.8))I=0
      IF((ONE.EQ.8).AND.(I.EQ.1))I=9
C
      FFITYP=(I-ONE)+2
C
C      WRITE(6,600) FFITYP,I,ONE
C 600  FORMAT(' FFITYP I ONE ',F3.2,2X,I2,2X,I3)
C
C
      ONIN = ONE
      IN = I
C
      RETURN
      END
