c   yesno  - logical function that returns true or false from a
c            yes/no question.  The question is in line, and is asked
c            at position (irow,icol) on the screen.
c            This area is cleared before asking the question.
c      offval <= 0 means place cursor at yes, otherwise no.
      logical function yesno(offval)
      include 'screen.inc'
      integer*2 offval,offset
      if (offval.le.0) then
         offset=0
      else
         offset=1
      endif
      call scroll(1,0,irow,1,irow+2,80,7,ierror)
      call putcur(irow,icol,ivpage,ierror)
      call wchars(ivpage,line,80,icolor,ibckgd,0,ierror)
      call putcur(irow+1,icol,ivpage,ierror)
      call wchars(ivpage,'- yes',5,icolor,ibckgd,0,ierror)
      call putcur(irow+2,icol,ivpage,ierror)
      call wchars(ivpage,'- no',4,icolor,ibckgd,0,ierror)
      call putcur(irow+1+offset,icol,ivpage,ierror)
 10   call inkey(line,keycde,nchar)
      if (keycde.eq.0) then
         continue
c        carriage return
      else if (keycde.eq.28) then
         call getcur(ivpage,irowt,icol,ierror)
         if (irowt.eq.irow+1) then
            yesno=.true.
         else
            yesno=.false.
         endif
         return
      else
         call getcur(ivpage,irowt,icol,ierror)
         if (irowt.eq.irow+1) then
            irowt=irowt+1
         else
            irowt=irowt-1
         endif
         call putcur(irowt,icol,ivpage,ierror)
      endif
      go to 10
      end
