aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorherbelin2009-08-14 14:02:23 +0000
committerherbelin2009-08-14 14:02:23 +0000
commit6af2902ddd8ea6d4171b882726e9bb4d2fc45748 (patch)
tree049d8e8c360f11bcd9ac9bc4a60f2c10f6e39adf /lib
parent79a25a71dd3519d8e7a6bd9f3a004c7c0da3a1b5 (diff)
Tried to make F1 documentation tool working in CoqIDE.
In trunk: New strategy for compiling and finding index_url.txt. After all, this file is not specific to CoqIDE but to the documentation. Hence, it seems better to install it close to the documentation. If the documentation is locally installed, it is easy to find the file index_url.txt but what to do if the documentation is remote? We would need a http getter. Does this mean we have to rely on wget or so? In the absence of answer to this question, it seems reasonable, first to assume the doc to be locally installed, second to have a local copy of index_url.txt ready in the installation directory of CoqIDE. Also added an "automatic" field in the CoqIDE url preference to prevent the user to have to update his preference file every time a new version of Coq is out and the link to the doc change. In 8.2: Added a minima the installation of index_urls.txt but the user will have to update its preferences because the links "http://coq.inria.fr/doc/Reference-Manual010.html#..." do not longer exist. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12278 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
-rw-r--r--lib/flags.ml9
-rw-r--r--lib/flags.mli4
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/flags.ml b/lib/flags.ml
index c0af148c70..dac88a4733 100644
--- a/lib/flags.ml
+++ b/lib/flags.ml
@@ -102,6 +102,15 @@ let browser_cmd_fmt =
with
Not_found -> Coq_config.browser
+let is_standard_doc_url url =
+ let wwwcompatprefix = "http://www.lix.polytechnique.fr/coq/" in
+ let wwwprefix = "http://coq.inria.fr/" in
+ let n = String.length wwwprefix in
+ let n' = String.length Coq_config.wwwrefman in
+ url = Coq_config.localwwwrefman ||
+ url = Coq_config.wwwrefman ||
+ url = wwwcompatprefix ^ String.sub Coq_config.wwwrefman n (n'-n)
+
(* Options for changing coqlib *)
let coqlib_spec = ref false
let coqlib = ref Coq_config.coqlib
diff --git a/lib/flags.mli b/lib/flags.mli
index fe1157d881..8bafa8b1f3 100644
--- a/lib/flags.mli
+++ b/lib/flags.mli
@@ -70,7 +70,9 @@ val boxed_definitions : unit -> bool
(* Returns string format for default browser to use from Coq or CoqIDE *)
val browser_cmd_fmt : string
-
+
+val is_standard_doc_url : string -> bool
+
(* Substitute %s in the first chain by the second chain *)
val subst_command_placeholder : string -> string -> string