PLplot  5.10.0
configurable.f90
Go to the documentation of this file.
00001 !      Copyright (C) 2004-2014 Alan W. Irwin
00002 !
00003 !      This file is part of PLplot.
00004 !
00005 !      PLplot is free software; you can redistribute it and/or modify
00006 !      it under the terms of the GNU Library General Public License as
00007 !      published by the Free Software Foundation; either version 2 of the
00008 !      License, or (at your option) any later version.
00009 !
00010 !      PLplot is distributed in the hope that it will be useful,
00011 !      but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 !      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 !      GNU Library General Public License for more details.
00014 !
00015 !      You should have received a copy of the GNU Library General Public
00016 !      License along with PLplot; if not, write to the Free Software
00017 !      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00018 
00019       subroutine plparseopts(mode)
00020       use plplot
00021       implicit none
00022       integer :: mode
00023       integer :: maxargs, iargs, numargs, index, maxindex
00024       parameter(maxindex = maxlen/4)
00025       parameter (maxargs=20)
00026       character (len=maxlen) :: arg
00027       integer, dimension(maxindex, maxargs) :: iargsarr
00028       numargs = command_argument_count()
00029       if(numargs.lt.0) then
00030 !       This actually happened historically on a badly linked Cygwin platform.
00031         write(0,'(a)') 'plparseopts: negative number of arguments'
00032         return
00033       endif
00034       if(numargs+1.gt.maxargs) then
00035         write(0,'(a)') 'plparseopts: too many arguments'
00036         return
00037       endif
00038       do 10 iargs = 0, numargs
00039         call get_command_argument(iargs, arg)
00040         call plstrf2c(trim(arg), string1)
00041         s1 = transfer( string1, s1 )
00042         do 5 index = 1, maxindex
00043           iargsarr(index, iargs+1) = s1(index)
00044     5     continue
00045    10   continue
00046       call plparseopts7(numargs+1, iargsarr, mode, maxindex*4)
00047       end subroutine plparseopts
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines