!----( GETARGS : subroutine to get the list of command-line arguments )---- !---- in use of FORTRAN service routines 'iargc'/'getarg' ---- !---- This subroutine is called by the function opnpin_() [opnpin.c] ---- !---- to interface a FORTRAN main program with C language function ---- !---- opnpinc(argc, argv) [within lwkdir.c] for opnpin mechanism. ---- subroutine getargs(m, args, n) implicit none integer :: m, n character(*) :: args(m) integer :: iargc integer :: i if (m <= 0) then n = 0 else n = iargc() + 1 if (n > m) n = m do i=1,n call getarg(i-1, args(i)) enddo endif return end