      subroutine cfill (string, c)

c  character fill - fill 'string' with 'c'

      character*(*) string, c
      character*5 chival
      character*79 temp

      lenc = len(c)
      if (lenc .eq. 1) then
        do i = 1, len(string)
          string(i:i) = c
        end do
      else
        call logit ('*cfill* '//chival(lenc))
        lent = 0
        call append ('Cfill: called with bad parameters ', temp, lent)
        call append (c, temp, lent)
        call abort (temp)
      end if
      return
      end
