Commit cb85dec3 authored by gerd's avatar gerd

release 1.2.3: ported to OCaml-4.00



git-svn-id: https://godirepo.camlcity.org/svn/lib-pxp/trunk@756 dbe99aee-44db-0310-b2b3-d33182c8eb97
parent 9d8af80b
......@@ -9,7 +9,7 @@ with_wlex_compat=1
with_ulex=1
with_pp=1
lexlist="utf8,iso88591,iso88592,iso88593,iso88594,iso88595,iso88596,iso88597,iso88598,iso88599,iso885910,iso885913,iso885914,iso885915,iso885916"
version="1.2.2"
version="1.2.3"
exec_suffix=""
help_lex="Enable/disable ocamllex-based lexical analyzer for the -lexlist encodings"
......
......@@ -184,6 +184,12 @@ same namespaces.</p></li>
<sect2>
<title>Recent Changes</title>
<ul>
<li>
<p><em>1.2.3:</em> Ported to OCaml-4.00 </p>
</li>
<li>
<p><em>1.2.2:</em> Fixing the interaction of catalog and file
resolution.</p>
......
<?xml encoding="ISO-8859-1"?>
<!-- ************************************************************ -->
<!-- EXTERNAL URLs -->
<!-- ************************************************************ -->
<!ENTITY url.ocaml
"http://caml.inria.fr/">
<!ENTITY url.ocaml.org
"http://www.ocaml.org/">
<!ENTITY url.ocaml.list
"http://caml.inria.fr/caml-list-eng.html">
<!ENTITY url.ocaml.download
"ftp://ftp.inria.fr/lang/caml-light/">
<!ENTITY url.ocaml.camlp4
"http://caml.inria.fr/camlp4/">
<!ENTITY url.ocaml.hump
"http://caml.inria.fr/humps/">
<!ENTITY url.ocaml.mottl
"http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html">
<!ENTITY url.ocaml.mottl.pcre
"http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html#toc11">
<!ENTITY url.ocaml.lindig
"http://www.gaertner.de/~lindig/software/">
<!--
<!ENTITY url.ocaml.lindig.ocmarkup
"http://www.cs.tu-bs.de/softech/people/lindig/software/ocmarkup.html">
-->
<!ENTITY url.ocaml.lindig.tony
"http://www.gaertner.de/~lindig/software/tony.html">
<!ENTITY url.ocaml.filliatre
"http://www.lri.fr/~filliatr/software.en.html">
<!ENTITY url.ocaml.filliatre.cgi
"http://www.lri.fr/~filliatr/ftp/ocaml/cgi/">
<!ENTITY url.ocaml.frisch
"http://www.eleves.ens.fr:8080/home/frisch/soft">
<!ENTITY url.ocaml.guesdon.ocamlodbc
"http://pauillac.inria.fr/~guesdon/Tools/ocamlodbc/ocamlodbc.html">
<!ENTITY url.xml-spec
"http://www.w3.org/TR/1998/REC-xml-19980210.html">
<!ENTITY url.xml.oasis
"http://www.oasis-open.org/cover/">
<!ENTITY url.xml.w3c
"http://www.w3c.org/XML/">
<!ENTITY url.jclark-xmltdata
"ftp://ftp.jclark.com/pub/xml/xmltest.zip">
<!ENTITY urlprefix.ietf.rfc
"http://www.ietf.org/rfc">
<!-- Ohne "/" am Ende! -->
<!ENTITY url.apache
"http://www.apache.org/">
<!ENTITY url.apache.cgi-howto
"http://httpd.apache.org/docs/howto/cgi.html">
<!ENTITY url.apache.suexec
"http://httpd.apache.org/docs/suexec.html">
<!ENTITY url.apache.jserv
"http://java.apache.org/">
<!ENTITY url.apache.jakarta
"http://jakarta.apache.org/">
<!ENTITY url.unixodbc
"http://www.unixodbc.org">
<!-- ************************************************************ -->
<!-- MY URLs -->
<!-- ************************************************************ -->
<!ENTITY url.linkdb
"http://links.camlcity.org">
<!ENTITY url.svn
"https://godirepo.camlcity.org/">
<!ENTITY url.mailman
"https://godirepo.camlcity.org/mailman">
<!ENTITY url.pipermail
"https://godirepo.camlcity.org/pipermail">
<!ENTITY mail.godi-list
"godi-list@ocaml-programming.de">
<!ENTITY url.godi-list-info
"&url.mailman;/listinfo/godi-list">
<!ENTITY url.godi-list-archives
"&url.pipermail;/godi-list">
<!-- ************************************************************ -->
<!-- HOMEPAGE URLs -->
<!-- ************************************************************ -->
<!-- GENERIC -->
<!ENTITY url.gps-ocaml-download
"http://download.camlcity.org/download">
<!ENTITY url.gps-ocaml-download-byte
"/download/bytecode">
<!ENTITY url.gps-old-download
"http://www.gerd-stolpmann.de/download">
<!ENTITY url.gps-prog
"/archive/programming">
<!-- SPECIFIC -->
<!ENTITY url.portal-img
"/files">
<!ENTITY release.javacaml
"1998">
<!ENTITY url.javacaml-download
"/archive/javacaml/download/">
<!ENTITY url.javacaml-project
"/archive/javacaml/">
<!ENTITY release.ocamldb
"0.2">
<!ENTITY url.ocamldb-download
"&url.gps-ocaml-download;/ocamldb.tgz">
<!ENTITY url.ocamldb-project
"&url.gps-ocaml-projects;/ocamldb/">
<!ENTITY release.findlib
"1.2.8">
<!ENTITY url.findlib-download
"&url.gps-ocaml-download;/findlib-&release.findlib;.tar.gz">
<!ENTITY url.findlib-project
"/projects/findlib.html">
<!ENTITY url.findlib-readme
"/projects/dl/findlib-&release.findlib;/doc/README">
<!ENTITY url.findlib-intro
"/projects/findlib.html">
<!ENTITY url.findlib-manual
"/projects/dl/findlib-&release.findlib;/doc/guide-html/index.html">
<!ENTITY url.findlib-quickstart
"/projects/dl/findlib-&release.findlib;/doc/QUICKSTART">
<!ENTITY release.findlib-browser
"0.2.2">
<!ENTITY url.findlib-browser-download
"&url.gps-ocaml-download;/findlib-browser-&release.findlib-browser;.tar.gz">
<!ENTITY url.findlib-browser-project
"/projects/findlib-browser.html">
<!ENTITY release.cryptgps
"0.2.1">
<!ENTITY url.cryptgps-download
"&url.gps-ocaml-download;/cryptgps-&release.cryptgps;.tar.gz">
<!ENTITY url.cryptgps-project
"/projects/cryptgps.html">
<!ENTITY release.db2man
"0.1">
<!ENTITY url.db2man-download
"&url.gps-ocaml-download;/db2man-&release.db2man;.tar.gz">
<!ENTITY url.db2man-project
"/projects/db2man.html">
<!ENTITY release.xstr
"0.2.1">
<!ENTITY url.xstr-download
"&url.gps-ocaml-download;/xstr-&release.xstr;.tar.gz">
<!ENTITY url.xstr-project
"/projects/xstr.html">
<!ENTITY release.xstrp4
"1.7">
<!ENTITY url.xstrp4-download
"&url.gps-ocaml-download;/xstrp4-&release.xstrp4;.tar.gz">
<!ENTITY url.xstrp4-project
"/projects/xstrp4.html">
<!ENTITY url.markup-tamara
"http://www.ocaml-programming.de/markup/">
<!ENTITY release.pxp
"1.1.6">
<!ENTITY release.pxp-dev
"1.2.0test2">
<!ENTITY url.pxp-download
"&url.gps-ocaml-download;/pxp-&release.pxp;.tar.gz">
<!ENTITY url.pxp-download-dev
"&url.gps-ocaml-download;/pxp-&release.pxp-dev;.tar.gz">
<!ENTITY url.pxp-project
"/projects/pxp.html">
<!ENTITY url.pxp-project-dev
"/projects/pxp.html">
<!ENTITY url.pxp-intro
"/projects/pxp.html">
<!ENTITY url.pxp-manual
"/projects/dl/pxp-1.1.6/doc/manual/html/index.html">
<!ENTITY url.pxp-relnotes
"/projects/dl/pxp-1.1.6/doc/RELEASE-NOTES">
<!ENTITY url.pxp-list
"http://www.orcaware.com/mailman/listinfo/ocaml-pxp-users">
<!ENTITY release.ocamlnet
"2.2.9">
<!ENTITY url.ocamlnet-download
"&url.gps-ocaml-download;/ocamlnet-&release.ocamlnet;.tar.gz">
<!ENTITY url.ocamlnet-home
"/projects/ocamlnet.html">
<!ENTITY url.ocamlnet-project
"/projects/ocamlnet.html">
<!ENTITY url.ocamlnet-intro
"/projects/ocamlnet.html">
<!ENTITY url.ocamlnet-manual
"/projects/dl/ocamlnet-2.2.9/doc/html-main/index.html">
<!ENTITY url.ocamlnet-refmanual
"&url.ocamlnet-manual;">
<!ENTITY url.netstring-project
"&url.ocamlnet-project;">
<!ENTITY release.wtimer
"1.0">
<!ENTITY url.wtimer-download
"&url.gps-ocaml-download;/wtimer-&release.wtimer;.tar.gz">
<!ENTITY url.wtimer-project
"/projects/wtimer.html">
<!ENTITY url.wdialog-project
"/projects/wdialog.html">
<!ENTITY url.wdialog-intro
"/projects/wdialog.html">
<!ENTITY url.godi-home
"/godi">
<!ENTITY release.godi
"20061228">
<!ENTITY url.godi-download
"&url.gps-ocaml-download;/godi-bootstrap-&release.godi;.tar.gz">
<!ENTITY url.godi-intro
"/godi">
<!ENTITY url.godi-build
"http://www.ocaml-programming.de/godi-build/">
<!ENTITY url.dev-server
"https://gps.dynxs.de/">
<!ENTITY release.godi-tools
"1.5.3">
<!ENTITY url.godi-tools-download
"&url.gps-ocaml-download;/godi-tools-&release.godi-tools;.tar.gz">
<!-- Smaller things (patches etc.) -->
<!ENTITY url.str-patch-download
"&url.gps-ocaml-download;/str-2.04.patch">
<!ENTITY url.linkdb-download
"&url.gps-ocaml-download;/linkdb-2001-07-10.tar.gz">
<!-- ************************************************************ -->
<!-- MAIL URLs -->
<!-- ************************************************************ -->
<!ENTITY person.gps '<a href="mailto:&person.gps.mail;">Gerd Stolpmann</a>'>
<!ENTITY person.gps.mail
"gerd@gerd-stolpmann.de">
<?xml version="1.0" encoding="ISO-8859-1"?>
<!ENTITY % readme:html:previous '&nbsp;'>
<!ENTITY % readme:html:up '&nbsp;'>
<!ENTITY % readme:html:next '&nbsp;'>
<!ENTITY % bar
'<table bgcolor="lightgrey" width="100&#37;"
cellspacing="0" border="0" cellpadding="10">
<tr><td align="left">%readme:html:previous;</td>
<td align="center">%readme:html:up;</td>
<td align="right">%readme:html:next;</td>
</tr></table>'>
<!ENTITY % readme:html:header
"%bar;<hr>">
<!ENTITY % readme:html:trailer
"<hr>%bar;">
<!ENTITY % readme:html:textcolor "black">
\ No newline at end of file
......@@ -378,4 +378,6 @@ f tools/src/lexpp/ucs2_to_utf8.ml
d tools/src/odoc
f tools/src/odoc/Makefile
f tools/src/odoc/chtml.ml
f tools/src/odoc/chtml_ocaml3.ml
f tools/src/odoc/chtml_ocaml4.ml
......@@ -2,6 +2,7 @@ TOP_DIR = ../..
include $(TOP_DIR)/Makefile.rules
PACKAGES = netstring
OCAMLC_OPTIONS = -I +compiler-libs
OBJ = pxp_lexing.cmo \
pxp_core_types.cmo pxp_lexer_types.cmo \
......
......@@ -4,10 +4,19 @@ include $(TOP_DIR)/Makefile.rules
SRC = chtml.ml
OBJ = $(SRC:.ml=.cmo)
OCAMLC_OPTIONS += -I +ocamldoc
CLEAN_LIST += chtml.ml
.PHONY: all
all: chtml.cmo
chtml.ml:
case `ocamlc -version` in \
3.*) cp chtml_ocaml3.ml chtml.ml ;; \
4.*) cp chtml_ocaml4.ml chtml.ml ;; \
*) echo "Unknown Ocaml version"; exit 1 ;; \
esac
.PHONY: clean
clean:
rm -f $(CLEAN_LIST)
......
......@@ -154,11 +154,16 @@ prerr_endline "picture found";
method html_of_custom_text b s t =
match s with
| "{picture" -> self#html_of_picture b t
| "{directinclude" -> self#html_of_direct_include b t
| "{fixpxpcoretypes" -> self#html_of_fix_pxp_core_types b t
| "{knowntype" -> self#add_known_type t
| "{knownclass" -> self#add_known_class t
| "{picture"
| "picture" -> self#html_of_picture b t
| "{directinclude"
| "directinclude" -> self#html_of_direct_include b t
| "{fixpxpcoretypes"
| "fixpxpcoretypes" -> self#html_of_fix_pxp_core_types b t
| "{knowntype"
| "knowntype" -> self#add_known_type t
| "{knownclass"
| "knownclass" -> self#add_known_class t
| _ -> ()
end
......
(* Our custom HTML generator *)
(* Define
{picture file.png Caption Text}
so images can be easily included into ocamldoc documentation
Define
{directinclude <true>|<false>}
changing the bahviour of "include Module". If direct include is enabled,
the included stuff is directly shown.
Define
{fixpxpcoretypes <true>|<false>}
If enabled, this mode changes all clickable references
- of Pxp_core_types.I.<id> into Pxp_types.<id>, and
- of Pxp_core_types.S.<id> into Pxp_types.<id>
Define
{knowntype identifier}
{knownclass identifier}
to enter additional names into the tables of type and class names
for which links are generated
*)
open Printf
open Odoc_info
open Module
module StringSet = Odoc_html.StringSet
let word_re = Str.regexp "[ \t\r\n]+"
let split_args t =
match t with
| [] -> []
| [Odoc_info.Raw arg] -> Str.split word_re arg
| _ ->
failwith "Argument too complicated"
module Generator (G : Odoc_html.Html_generator) = struct
class html =
object(self)
inherit G.html as super
method private html_of_picture b t =
let (file, caption) =
match split_args t with
| [] ->
failwith "{picture ...} needs at least one argument"
| w ->
( match w with
| file :: args ->
(file, String.concat " " args)
| [] ->
failwith "{picture ...} needs a simple word as first argument"
) in
bprintf b
"<div class=\"picture\">\
<div class=\"picture-caption\">%s</div>\
<img src=\"%s\">\
</div>"
(self#escape caption)
file
val mutable enable_direct_include = false
method private html_of_direct_include b t =
match split_args t with
| ["true"] ->
enable_direct_include <- true
| ["false"] ->
enable_direct_include <- false
| _ ->
failwith "{directinclude ...} needs one bool argument"
method html_of_included_module b im = (* overridden! *)
super # html_of_included_module b im;
if enable_direct_include then (
match im.im_module with
| None -> () (* case module is unknown *)
| Some (Mod m) ->
bprintf b "<div class=\"included-module\">\n";
List.iter
(self#html_of_module_element b (Name.father m.m_name))
(Module.module_elements m);
bprintf b "</div>\n"
| Some (Modtype mt) ->
bprintf b "<div class=\"included-module-type\">\n";
List.iter
(self#html_of_module_element b (Name.father mt.mt_name))
(Module.module_type_elements mt);
bprintf b "</div>\n"
)
val mutable enable_fix_pxp_core_types = false
method private html_of_fix_pxp_core_types b t =
match split_args t with
| ["true"] ->
enable_fix_pxp_core_types <- true
| ["false"] ->
enable_fix_pxp_core_types <- false
| _ ->
failwith "{fixpxpcoretypes ...} needs one bool argument"
val pxp_core_types_re = Str.regexp "Pxp_core_types\\.[SI]\\."
method create_fully_qualified_idents_links m_name s =
let s' =
if enable_fix_pxp_core_types then (
Str.global_replace pxp_core_types_re "Pxp_types." s
)
else
s in
super # create_fully_qualified_idents_links m_name s'
method html_of_Ref b name ref_opt =
let name' =
if enable_fix_pxp_core_types then (
(* prerr_endline ("Ref: " ^ name); *)
Str.global_replace pxp_core_types_re "Pxp_types." name
)
else
name in
super # html_of_Ref b name' ref_opt
method html_of_custom_text b s t =
let add_known_type t =
List.iter
(fun s ->
known_types_names <- StringSet.add s known_types_names
)
(split_args t) in
let add_known_class t =
List.iter
(fun s ->
known_classes_names <- StringSet.add s known_classes_names
)
(split_args t) in
match s with
| "picture" -> self#html_of_picture b t
| "directinclude" -> self#html_of_direct_include b t
| "fixpxpcoretypes" -> self#html_of_fix_pxp_core_types b t
| "knowntype" -> add_known_type t
| "knownclass" -> add_known_class t
| _ -> ()
end
end
let _ =
Odoc_args.extend_html_generator (module Generator : Odoc_gen.Html_functor)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment