      subroutine gcmln(fnwin,fnpar,fnout,ier)
c 
c get filenames in command line
c a.tento v.1.0 4/02
c a.tento v.1.1 6/02
c a.tento v.1.2 10/02
c a.tento v.1.3 04/03
c
c
c REQUIRED routines:
c guw8, ckesfi
c
      character*200 fnwin, fnpar, fnout
      integer ier
c
      integer karg, nfile
      parameter ( nfile = 3 )
      character*200 files(nfile)
c
      integer ckesfi
c
c
      ier = 0
c
      call guw8(files,karg)
      if ( karg .ne. nfile ) goto 99 
c
      fnwin = files(1)
      fnpar = files(2)
      fnout = files(3)
c
      if ( ckesfi(fnwin) .ne. 0 ) then 
      write(*,*)' window file not found ! '
      write(*,200)fnwin
      ier = 1
      endif
c
      if ( ckesfi(fnpar) .ne. 0 ) then 
      write(*,*)' parameter file not found ! '
      write(*,200)fnpar
      ier = 1
      endif
c
88    continue
c      if ( ier .eq. 0    .and.    ckesfi(fnout) .eq.  0 ) then
c      write(*,*)' WARNING '
c      write(*,*)' output file already  exists: it will be overwritten ' 
c      write(*,200)fnout
c      ier = 2
c      endif
c
      return
c
99    ier = 1
      write(*,100)
      return
c
100   format(' HVPROC module v.1.0. may 2003 - SESAME project - WP03',/,
     #       ' use : hvproc window_file parameters_file output_file')
200   format(1x,a200)
      end
