@@ -11,15 +11,11 @@ function gmt(cmd::String, args...)
1111 tok:: String , r:: String = strtok (cmd)
1212 if (r == " " ) # User gave 'module' separately from 'options'
1313 error (" Please use gmt(\" module_name options\" , args...) instead of gmt(\" module_name\" , \" options\" , args...)" )
14- # cmd::String *= " " * args[1]::String # Cat with the progname and so pretend input followed the classic construct
15- # args = args[2:end]
16- # n_argin -= 1
1714 end
1815 end
1916 # We may have trailing [] args in modules
2017 baka = n_argin
2118 while (n_argin > 0 && (args[n_argin] === nothing )) n_argin -= 1 end
22- # baka != n_argin && println("-----------------------------------------> $cmd has $(baka-n_argin) empty args.")
2319 baka != n_argin && (args = args[1 : n_argin])
2420 end
2521 _gmt (cmd, args... )
@@ -31,23 +27,8 @@ function _gmt(cmd::String, args...)
3127 (cmd == " destroy" ) && return gmt_restart ()
3228 ressurectGDAL () # Some GMT modules may have called GDALDestroyDriverManager()
3329 DidOneGmtCmd[] = true # Even if something errors here this keeps track that gmt() already called once
34-
35- # ----------- Minimal error checking ------------------------
3630 n_argin:: Int = length (args)
37- #=
38- if (n_argin > 0)
39- if (isa(args[1], String))
40- tok::String, r::String = strtok(cmd)
41- if (r == "") # User gave 'module' separately from 'options'
42- cmd::String *= " " * args[1]::String # Cat with the progname and so pretend input followed the classic construct
43- args = args[2:end]
44- n_argin -= 1
45- end
46- end
47- # We may have trailing [] args in modules
48- while (n_argin > 0 && (args[n_argin] === nothing)) n_argin -= 1 end
49- end
50- =#
31+
5132 # -----------------------------------------------------------
5233
5334 # 1. Get arguments, if any, and extract the GMT module name
0 commit comments