aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-05-11 14:05:35 +0000
committerGravatar pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-05-11 14:05:35 +0000
commit2abc6e4c9b35570a44af9a246c88bb177d81373d (patch)
tree270af8c7eda9ff39546dd4e6c26665afcd90b8dd
parente75cd30ff9fc61ce3de31c88645d9bb85128841c (diff)
Coqide awful coqtop options parsing fixup
(back to the future) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15301 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--ide/coq.ml5
-rw-r--r--ide/coqide.ml3
2 files changed, 6 insertions, 2 deletions
diff --git a/ide/coq.ml b/ide/coq.ml
index db549b19a..bca972006 100644
--- a/ide/coq.ml
+++ b/ide/coq.ml
@@ -83,10 +83,11 @@ let rec filter_coq_opts args =
try
let oc,ic,ec = Unix.open_process_full cmd (Unix.environment ()) in
let filtered_args = read_all_lines oc in
+ let pbs_blabla = read_all_lines ec in
match Unix.close_process_full (oc,ic,ec) with
| Unix.WEXITED 0 -> true,filtered_args
- | Unix.WEXITED 2 -> false,filtered_args
- | _ -> asks_for_coqtop ()
+ | Unix.WEXITED 127 -> asks_for_coqtop ()
+ | _ -> false,filtered_args@pbs_blabla
with Sys_error _ -> asks_for_coqtop ()
exception Coqtop_output of string list
diff --git a/ide/coqide.ml b/ide/coqide.ml
index f6eabc062..de70b94c9 100644
--- a/ide/coqide.ml
+++ b/ide/coqide.ml
@@ -2401,6 +2401,9 @@ let read_coqide_args argv =
((Minilib.canonical_path_name (Filename.dirname file),
Project_file.read_project_file file) :: project_files) out args
| "-f" :: [] -> output_string stderr "Error: missing project file name"; exit 1
+ | "-coqtop" :: [] -> output_string stderr "Error: missing argument after -coqtop"; exit 1
+ | "-debug"::args -> Ideutils.debug := true;
+ filter_coqtop coqtop project_files ("-debug"::out) args
| arg::args -> filter_coqtop coqtop project_files (arg::out) args
| [] -> (coqtop,List.rev project_files,List.rev out)
in