diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2000-03-03 09:38:43 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2000-03-03 09:38:43 +0000 |
commit | 0ae32ea35176c9cb1b04600ef59f4d416c856e89 (patch) | |
tree | b314f92c40ea28311b2e69bd65f412a8b5778a75 /otherlibs/labltk/browser/shell.ml | |
parent | fa00b82689c7e4822566eff7e51a7771ccab41f8 (diff) |
add -modern and -w options
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2897 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk/browser/shell.ml')
-rw-r--r-- | otherlibs/labltk/browser/shell.ml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/otherlibs/labltk/browser/shell.ml b/otherlibs/labltk/browser/shell.ml index 88492cc9e..4f7dab265 100644 --- a/otherlibs/labltk/browser/shell.ml +++ b/otherlibs/labltk/browser/shell.ml @@ -250,6 +250,8 @@ let may_exec = let path_sep = if Sys.os_type = "Win32" then ";" else ":" +let warnings = ref "A" + let f :prog :title = let progargs = List.filter pred:((<>) "") (Str.split sep:~" " prog) in @@ -282,7 +284,12 @@ let f :prog :title = end in let load_path = List2.flat_map !Config.load_path fun:(fun dir -> ["-I"; dir]) in - let args = Array.of_list (progargs @ load_path) in + let modern = if !Clflags.classic then [] else ["-modern"] in + let warnings = + if List.mem item:"-w" progargs || !warnings = "A" then [] + else ["-w"; !warnings] + in + let args = Array.of_list (progargs @ modern @ warnings @ load_path) in let sh = new shell textw:tw :prog :env :args in let current_dir = ref (Unix.getcwd ()) in file_menu#add_command "Use..." command: |