      subroutine getlls
      include 'parmtr.inc'
      include 'screen.inc'
      real data
      common /measur/ data(maxobj,5)
      real linlen(maxlin),nobjct(maxlin),temp
      equivalence (data(1,1),linlen(1)),(data(1,2),nobjct(1))
      integer*2 nlines,icolt,istart
      logical yesno
      external yesno
      call cls
c
c   get number of lines to read in
c
      irow=5
      icol=10
 10   line='Number of individual transects or lines used is: '
      call scrlin
      call getbuf(line,nchar,10,iatt)
      nlines=0
      if (nchar.eq.0 .or. line.eq.' ') go to 11
      read(unit=line,fmt='(f10.0)',err=11) temp
      nlines=int(temp)
 11   if (nlines.lt.1 .or. nlines.gt.maxlin) then
         call scroll(1,0,irow,49,irow,80,7,ierror)
         irow=irow+1
         write(line,'(a,i3,a)') 'Number of lines must be  1 < nlines <',
     1      maxlin,'.  Re-enter.'
         call scrlin
         irow=irow-1
         go to 10
      endif
c
c   put heading at top of table to read in lines
c
      call cls
      icol=1
      irow=1
      write(line,'(a,5x,a,a,5x,a)') 'Line number',
     1    'Length in ',linunt,'Number of objects measured'
      call scrlin
      irow=2
      write(line,'(11a1,5x,24a1,5x,26a1)') ('-',i=1,61)
      call scrlin
c   loop to read in a line length and number of objects
      istart=1
      do 20 i=1,nlines
         iline=i
         irow=irow+1
c   enter line number in table
         call putcur(irow,5,ivpage,ierror)
         write(line,'(i3)') i
         call wchars(ivpage,line,3,icolor,ibckgd,0,ierror)
c   loop to read first line length, then number of objects
 23      do 22 icode=1,2
 21         if (icode.eq.1) then
               if (pntran) then
                  temp=0.5
                  go to 28
               else
                  write(line,'(a,a,a,i3,a)') 'Enter line length in ',
     1               linunt(1:nlinut),' for line number ',iline,': '
               endif
            else
               line='Enter number of objects measured: '
            endif
            icolt=index(line,':')+1
 29         call putcur(24,5,ivpage,ierror)
            call wchars(ivpage,line,icolt,icolor,ibckgd,0,ierror)
            call putcur(24,icolt+5,ivpage,ierror)
            call getbuf(line,nchar,10,iatt)
            temp=0.
            if (nchar.eq.0) go to 28
            read(line,'(f10.0)',err=28) temp
 28         if (temp.lt.0) then
               call putcur(25,5,ivpage,ierror)
               call wchars(ivpage,'Incorrect input, re-enter.',26,
     1            icolor,ibckgd,0,ierror)
               go to 29
            else
               call scroll(1,0,24,1,25,80,7,ierror)
               if (icode.eq.1) then
                  linlen(iline)=temp
                  write(line,'(g11.5)') temp
                  call putcur(irow,24,ivpage,ierror)
               else
                  nobjct(iline)=temp
                  write(line,'(i5,6x)') int(temp)
                  call putcur(irow,56,ivpage,ierror)
               endif
               call wchars(ivpage,line,11,icolor,ibckgd,0,ierror)
            endif
 22         continue
c
c   section to request changes in table when 20 entries are in place
c
         if (mod(i,20).eq.0 .or. i.eq.nlines) then
            call scroll(1,1,23,1,25,80,7,ierror)
            irow=23
            icol=5
            line=
     1      'Everything above OK, and ready to proceed to next page?'
            if (yesno(0)) then
               call scroll(1,0,3,1,25,80,7,ierror)
               irow=2
               istart=istart+20
               go to 20
            else
               call scroll(1,0,23,1,25,80,7,ierror)
               call putcur(23,5,ivpage,ierror)
               line='Which line above should be changed: '
               call wchars(ivpage,line,36,icolor,ibckgd,0,ierror)
 26            call getbuf(line,nchar,3,iatt)
               iline=0
               read(line,'(i3)',err=27) iline
 27            if (iline.ge.istart .and. iline.le.i) then
                  irow=mod(iline,20)+2
                  if (irow.eq.2) irow=22
                  go to 23
               else
                 call scroll(1,0,23,41,23,80,7,ierror)
                 call putcur(24,5,ivpage,ierror)
                 call wchars(ivpage,'Improper input. Re-enter.',25,
     1              icolor,ibckgd,0,ierror)
                 call putcur(23,41,ivpage,ierror)
                 go to 26
               endif
            endif
         endif
 20      continue
      write(unit=iout,fmt='(6(g11.5,:1h,),:t80,1h$)')
     1   (linlen(i),i=1,nlines)
      write(unit=iout,fmt='(10(i6,:1h,),:t80,1h$)')
     1   (int(nobjct(i)),i=1,nlines)
      return
      end
