Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 subroutine plparseopts(mode)
00022 implicit none
00023 include 'sfstubs.h'
00024 integer mode
00025 integer maxargs, iargs, numargs, index, maxindex, iargc, islen
00026 parameter(maxindex = maxlen/4)
00027 parameter (maxargs=20)
00028 character*(maxlen) arg
00029 integer*4 iargsarr(maxindex, maxargs)
00030
00031
00032 numargs = iargc()
00033 if(numargs.lt.0) then
00034
00035 write(0,'(a)') 'plparseopts: negative number of arguments'
00036 return
00037 endif
00038 if(numargs+1.gt.maxargs) then
00039 write(0,'(a)') 'plparseopts: too many arguments'
00040 return
00041 endif
00042 do 10 iargs = 0, numargs
00043 call getarg(iargs, arg)
00044 call plstrf2c(arg(:islen(arg)), string1, maxlen)
00045 s1 = transfer( string1, s1 )
00046 do 5 index = 1, maxindex
00047 iargsarr(index, iargs+1) = s1(index)
00048 5 continue
00049 10 continue
00050 call plparseopts7(numargs+1, iargsarr, mode, maxindex*4)
00051 end subroutine plparseopts