c###outlin.for
      SUBROUTINE OUTLIN
C--------------------------------
C
C     THIS ROUTINE CALLS SUBROUTINES OUTTOP AND OUTBOD TO OUTPUT LINES
C
      COMMON / FILES / LUI, LUO, LU2, LU5, LU6, LU15, LU16, LU20, LU25,
     A LU26, LU35
      COMMON / ION / IHRE, IHRO, IHRS, LUFP, METHOD, NOISE, NPSL
      COMMON / OUTPRT / LINBOT(26), LINBD(14), LINTOP(15), LINTP(14),
     A GRPTYP, JOUT, LINBYP, LINES, LINMAX, LINTYP, LPAGES, NLINE
      LINADD = LINBOT(26)
      ISAV=LUO
      IONCE=0
      IF(LINADD+LINES.lt.LINMAX) go to 105
      IF(METHOD.EQ.23.AND.LINBYP.LT.0)THEN
        DO 103 ILU=1,18
        IF(LINBOT(ILU).EQ.1)THEN
          LUO=70+ILU
          CALL OUTTOP
          IF(IONCE.EQ.0)IONCE=LINES
        ENDIF
  103   CONTINUE
        LUO=ISAV
        LINES=IONCE
      ELSE
        CALL OUTTOP
      ENDIF
  105 CALL OUTBOD
      RETURN
      END
C--------------------------------
