aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-12-04 15:06:16 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-12-04 15:06:16 +0000
commited6115081b748fa969d680802cf8cff3f3eef330 (patch)
tree397115107ca245f677d2696b57ebe7204b9a5e6e /ide
parent29e2598a14016dc4b4373605b04418959362fc53 (diff)
Made new comm. model between coq and coqide support '-R foo ""'-style option.
This fixes bug #2442. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13683 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'ide')
-rw-r--r--ide/coq.ml10
-rw-r--r--ide/coqide.ml3
2 files changed, 7 insertions, 6 deletions
diff --git a/ide/coq.ml b/ide/coq.ml
index 0b2e9b13e..227f1fb7e 100644
--- a/ide/coq.ml
+++ b/ide/coq.ml
@@ -95,14 +95,14 @@ let coqtop_path () =
if Filename.check_suffix prog ".byte" then dir^"/coqtop.byte"
else dir^"/coqtop.opt"
-let filter_coq_opts argv =
- let argstr = String.concat " " argv in
+let filter_coq_opts args =
+ let argstr = String.concat " " (List.map Filename.quote args) in
let oc,ic,ec = Unix.open_process_full (coqtop_path () ^" -filteropts "^argstr) (Unix.environment ()) in
- let filtered_argv = read_all_lines oc in
+ let filtered_args = read_all_lines oc in
let message = read_all_lines ec in
match Unix.close_process_full (oc,ic,ec) with
- | Unix.WEXITED 0 -> true,filtered_argv
- | Unix.WEXITED 2 -> false,filtered_argv
+ | Unix.WEXITED 0 -> true,filtered_args
+ | Unix.WEXITED 2 -> false,filtered_args
| _ -> false,message
exception Coqtop_output of string list
diff --git a/ide/coqide.ml b/ide/coqide.ml
index 05f93863c..42680dffc 100644
--- a/ide/coqide.ml
+++ b/ide/coqide.ml
@@ -3096,7 +3096,8 @@ let process_argv argv =
let start () =
let argl = Array.to_list Sys.argv in
let files = process_argv argl in
- sup_args := String.concat " " (List.filter (fun x -> not (List.mem x files)) (List.tl argl));
+ let args = List.filter (fun x -> not (List.mem x files)) (List.tl argl) in
+ sup_args := String.concat " " (List.map Filename.quote args);
check_connection !sup_args;
ignore_break ();
GtkMain.Rc.add_default_file (lib_ide_file ".coqide-gtk2rc");