PLplot: configurable.f90 Source File

PLplot 5.10.0

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
configurable.f90
Go to the documentation of this file.
1 ! $Id: configurable.f90 12160 2012-01-27 22:29:16Z airwin $
2 !
3 ! Copyright (C) 2004 Alan W. Irwin
4 !
5 ! This file is part of PLplot.
6 !
7 ! PLplot is free software; you can redistribute it and/or modify
8 ! it under the terms of the GNU Library General Public License as
9 ! published by the Free Software Foundation; either version 2 of the
10 ! License, or (at your option) any later version.
11 !
12 ! PLplot is distributed in the hope that it will be useful,
13 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ! GNU Library General Public License for more details.
16 !
17 ! You should have received a copy of the GNU Library General Public
18 ! License along with PLplot; if not, write to the Free Software
19 ! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
21 subroutine plparseopts(mode)
22 use plplot
23 implicit none
24 integer :: mode
25 integer :: maxargs, iargs, numargs, index, maxindex
26 parameter(maxindex = maxlen/4)
27 parameter(maxargs=20)
28 character (len=maxlen) :: arg
29 integer, dimension(maxindex, maxargs) :: iargsarr
30 numargs = command_argument_count()
31 if(numargs.lt.0) then
32 ! This actually happened historically on a badly linked Cygwin platform.
33 write(0,'(a)') 'plparseopts: negative number of arguments'
34 return
35 endif
36 if(numargs+1.gt.maxargs) then
37 write(0,'(a)') 'plparseopts: too many arguments'
38 return
39 endif
40 do 10 iargs = 0, numargs
41 call get_command_argument(iargs, arg)
42 call plstrf2c(trim(arg), string1)
43 s1 = transfer( string1, s1 )
44 do 5 index = 1, maxindex
45 iargsarr(index, iargs+1) = s1(index)
46 5 continue
47 10 continue
48 call plparseopts7(numargs+1, iargsarr, mode, maxindex*4)
49 end subroutine plparseopts