fix encoding bugs by replacing all non-ASCII characters
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12792 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
e81cd4ac29
commit
4ea3208584
|
@ -6,8 +6,8 @@ TODO:
|
|||
module type M = sig type u end
|
||||
module N : sig include M val f: u -> unit end
|
||||
Here, in html for example, f in displayed being of type Foo.u instead of Foo.M.u
|
||||
- latex: types variant polymorphes dépassent de la page quand ils sont trop longs
|
||||
- utilisation nouvelles infos de Xavier: "début de rec", etc.
|
||||
- latex: types variant polymorphes depassent de la page quand ils sont trop longs
|
||||
- utilisation nouvelles infos de Xavier: "debut de rec", etc.
|
||||
- xml generator
|
||||
|
||||
=====
|
||||
|
@ -61,12 +61,12 @@ Release 3.08.1:
|
|||
Release 3.08.0:
|
||||
- fix: method parameters names in signature are now retrieved correctly
|
||||
(fix of Odoc_value.parameter_list_from_arrows to handle Tpoly for methods)
|
||||
- ajout à la doc de Module_list et Index_list (utilisé dans le html seulement)
|
||||
- ajout à la doc: fichier de l'option -intro utilisé pour l'index en html
|
||||
- ajout a la doc de Module_list et Index_list (utilise dans le html seulement)
|
||||
- ajout a la doc: fichier de l'option -intro utilise pour l'index en html
|
||||
- fix: create a Module_with instead of a Module_alias when we encounter
|
||||
module A : Foo in a signature
|
||||
- latex: style latex pour indenter dans les module kind et les class kind
|
||||
- latex: il manque la génération des paramètres de classe
|
||||
- latex: il manque la generation des parametres de classe
|
||||
- parse des {!modules: } et {!indexlist}
|
||||
- gestion des Module_list et Index_list
|
||||
- no need to Dynlink.add_available_units any more
|
||||
|
|
|
@ -452,7 +452,7 @@ module Analyser =
|
|||
| l ->
|
||||
match l with
|
||||
[] ->
|
||||
(* cas impossible, on l'a filtré avant *)
|
||||
(* cas impossible, on l'a filtre avant *)
|
||||
assert false
|
||||
| (pattern_param, exp) :: second_ele :: q ->
|
||||
(* implicit pattern matching -> anonymous parameter *)
|
||||
|
@ -697,10 +697,10 @@ module Analyser =
|
|||
Typedtree.Tcl_ident (p,_,_) -> Name.from_path p
|
||||
| _ ->
|
||||
(* we try to get the name from the environment. *)
|
||||
(* A VOIR : dommage qu'on n'ait pas un Tclass_ident :-( même quand on a class tutu = toto *)
|
||||
(* A VOIR : dommage qu'on n'ait pas un Tclass_ident :-( meme quand on a class tutu = toto *)
|
||||
Name.from_longident lid.txt
|
||||
in
|
||||
(* On n'a pas ici les paramètres de type sous forme de Types.type_expr,
|
||||
(* On n'a pas ici les parametres de type sous forme de Types.type_expr,
|
||||
par contre on peut les trouver dans le class_type *)
|
||||
let params =
|
||||
match tt_class_exp.Typedtree.cl_type with
|
||||
|
@ -785,7 +785,7 @@ module Analyser =
|
|||
match tt_class_expr2.Typedtree.cl_desc with
|
||||
Typedtree.Tcl_ident (p,_,_) -> Name.from_path p (* A VOIR : obtenir le nom complet *)
|
||||
| _ ->
|
||||
(* A VOIR : dommage qu'on n'ait pas un Tclass_ident :-( même quand on a class tutu = toto *)
|
||||
(* A VOIR : dommage qu'on n'ait pas un Tclass_ident :-( meme quand on a class tutu = toto *)
|
||||
match p_class_expr2.Parsetree.pcl_desc with
|
||||
Parsetree.Pcl_constr (lid, _) ->
|
||||
(* we try to get the name from the environment. *)
|
||||
|
@ -978,7 +978,7 @@ module Analyser =
|
|||
| Element_type t ->
|
||||
(function
|
||||
Types.Sig_type (ident,_,_) ->
|
||||
(* A VOIR: il est possible que le détail du type soit caché *)
|
||||
(* A VOIR: il est possible que le detail du type soit cache *)
|
||||
let n1 = Name.simple t.ty_name
|
||||
and n2 = Ident.name ident in
|
||||
n1 = n2
|
||||
|
@ -1321,7 +1321,7 @@ module Analyser =
|
|||
let new_env = Odoc_env.add_module env new_module.m_name in
|
||||
let new_env2 =
|
||||
match new_module.m_type with
|
||||
(* A VOIR : cela peut-il être Tmty_ident ? dans ce cas, on aurait pas la signature *)
|
||||
(* A VOIR : cela peut-il etre Tmty_ident ? dans ce cas, on aurait pas la signature *)
|
||||
Types.Mty_signature s ->
|
||||
Odoc_env.add_signature new_env new_module.m_name
|
||||
~rel: (Name.simple new_module.m_name) s
|
||||
|
@ -1420,7 +1420,7 @@ module Analyser =
|
|||
let new_env = Odoc_env.add_module_type env mt.mt_name in
|
||||
let new_env2 =
|
||||
match tt_module_type.mty_type with
|
||||
(* A VOIR : cela peut-il être Tmty_ident ? dans ce cas, on n'aurait pas la signature *)
|
||||
(* A VOIR : cela peut-il etre Tmty_ident ? dans ce cas, on n'aurait pas la signature *)
|
||||
Types.Mty_signature s ->
|
||||
Odoc_env.add_signature new_env mt.mt_name ~rel: (Name.simple mt.mt_name) s
|
||||
| _ ->
|
||||
|
@ -1549,7 +1549,7 @@ module Analyser =
|
|||
im_info = comment_opt ;
|
||||
}
|
||||
in
|
||||
(0, env, [ Element_included_module im ]) (* A VOIR : étendre l'environnement ? avec quoi ? *)
|
||||
(0, env, [ Element_included_module im ]) (* A VOIR : etendre l'environnement ? avec quoi ? *)
|
||||
|
||||
(** Analysis of a [Parsetree.module_expr] and a name to return a [t_module].*)
|
||||
and analyse_module env current_module_name module_name comment_opt p_module_expr tt_module_expr =
|
||||
|
|
|
@ -115,7 +115,7 @@ let rec class_elements ?(trans=true) cl =
|
|||
| Class_constraint (c_kind, ct_kind) ->
|
||||
iter_kind c_kind
|
||||
(* A VOIR : utiliser le c_kind ou le ct_kind ?
|
||||
Pour l'instant, comme le ct_kind n'est pas analysé,
|
||||
Pour l'instant, comme le ct_kind n'est pas analyse,
|
||||
on cherche dans le c_kind
|
||||
class_type_elements ~trans: trans
|
||||
{ clt_name = "" ; clt_info = None ;
|
||||
|
|
|
@ -56,7 +56,7 @@ let rec add_signature env root ?rel signat =
|
|||
| Types.Sig_exception (ident, _) -> { env with env_exceptions = (rel_name ident, qualify ident) :: env.env_exceptions }
|
||||
| Types.Sig_module (ident, modtype, _) ->
|
||||
let env2 =
|
||||
match modtype with (* A VOIR : le cas où c'est un identificateur, dans ce cas on n'a pas de signature *)
|
||||
match modtype with (* A VOIR : le cas ou c'est un identificateur, dans ce cas on n'a pas de signature *)
|
||||
Types.Mty_signature s -> add_signature env (qualify ident) ~rel: (rel_name ident) s
|
||||
| _ -> env
|
||||
in
|
||||
|
@ -68,7 +68,7 @@ let rec add_signature env root ?rel signat =
|
|||
env
|
||||
| Types.Modtype_manifest modtype ->
|
||||
match modtype with
|
||||
(* A VOIR : le cas où c'est un identificateur, dans ce cas on n'a pas de signature *)
|
||||
(* A VOIR : le cas ou c'est un identificateur, dans ce cas on n'a pas de signature *)
|
||||
Types.Mty_signature s -> add_signature env (qualify ident) ~rel: (rel_name ident) s
|
||||
| _ -> env
|
||||
in
|
||||
|
|
|
@ -97,19 +97,19 @@ class text =
|
|||
"}", "\\\\}";
|
||||
"\\$", "\\\\$";
|
||||
"\\^", "{\\\\textasciicircum}";
|
||||
"à", "\\\\`a";
|
||||
"â", "\\\\^a";
|
||||
"é", "\\\\'e";
|
||||
"è", "\\\\`e";
|
||||
"ê", "\\\\^e";
|
||||
"ë", "\\\\\"e";
|
||||
"ç", "\\\\c{c}";
|
||||
"ô", "\\\\^o";
|
||||
"ö", "\\\\\"o";
|
||||
"î", "\\\\^i";
|
||||
"ï", "\\\\\"i";
|
||||
"ù", "\\\\`u";
|
||||
"û", "\\\\^u";
|
||||
"\xE0", "\\\\`a";
|
||||
"\xE2", "\\\\^a";
|
||||
"\xE9", "\\\\'e";
|
||||
"\xE8", "\\\\`e";
|
||||
"\xEA", "\\\\^e";
|
||||
"\xEB", "\\\\\"e";
|
||||
"\xE7", "\\\\c{c}";
|
||||
"\xF4", "\\\\^o";
|
||||
"\xF6", "\\\\\"o";
|
||||
"\xEE", "\\\\^i";
|
||||
"\xEF", "\\\\\"i";
|
||||
"\xF9", "\\\\`u";
|
||||
"\xFB", "\\\\^u";
|
||||
"%", "\\\\%";
|
||||
"_", "\\\\_";
|
||||
"~", "\\\\~{}";
|
||||
|
@ -703,7 +703,7 @@ class latex =
|
|||
self#latex_of_module_kind fmt father k2;
|
||||
self#latex_of_text fmt [Code ")"]
|
||||
| Module_with (k, s) ->
|
||||
(* TODO: à modifier quand Module_with sera plus détaillé *)
|
||||
(* TODO: a modifier quand Module_with sera plus detaille *)
|
||||
self#latex_of_module_type_kind fmt father k;
|
||||
self#latex_of_text fmt
|
||||
[ Code " ";
|
||||
|
@ -732,7 +732,7 @@ class latex =
|
|||
self#latex_of_text fmt [Latex "\\end{ocamldocobjectend}\n"]
|
||||
|
||||
| Class_apply capp ->
|
||||
(* TODO: afficher le type final à partir du typedtree *)
|
||||
(* TODO: afficher le type final a partir du typedtree *)
|
||||
self#latex_of_text fmt [Raw "class application not handled yet"]
|
||||
|
||||
| Class_constr cco ->
|
||||
|
|
|
@ -22,10 +22,10 @@ let line_number = ref 0
|
|||
|
||||
let string_buffer = Buffer.create 32
|
||||
|
||||
(** Fonction de remise à zéro de la chaine de caractères tampon *)
|
||||
(** Fonction de remise a zero de la chaine de caracteres tampon *)
|
||||
let reset_string_buffer () = Buffer.reset string_buffer
|
||||
|
||||
(** Fonction d'ajout d'un caractère dans la chaine de caractères tampon *)
|
||||
(** Fonction d'ajout d'un caractere dans la chaine de caracteres tampon *)
|
||||
let ajout_char_string = Buffer.add_char string_buffer
|
||||
|
||||
(** Add a string to the buffer. *)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
(** Merge of information from [.ml] and [.mli] for a module.*)
|
||||
|
||||
(** Merging \@before tags. *)
|
||||
(** Merging \@before tags. *)
|
||||
val merge_before_tags :
|
||||
(string * Odoc_types.text) list -> (string * Odoc_types.text) list
|
||||
|
||||
|
|
|
@ -334,7 +334,7 @@ let rec get_before_dot s =
|
|||
let len = String.length s in
|
||||
let n = String.index s '.' in
|
||||
if n + 1 >= len then
|
||||
(* le point est le dernier caractère *)
|
||||
(* le point est le dernier caractere *)
|
||||
(true, s, "")
|
||||
else
|
||||
match s.[n+1] with
|
||||
|
|
|
@ -82,7 +82,7 @@ let simpl_class_type t =
|
|||
match t with
|
||||
Types.Cty_constr (p,texp_list,ct) -> t
|
||||
| Types.Cty_signature cs ->
|
||||
(* on vire les vals et methods pour ne pas qu'elles soient imprimées
|
||||
(* on vire les vals et methods pour ne pas qu'elles soient imprimees
|
||||
quand on affichera le type *)
|
||||
let tnil = { Types.desc = Types.Tnil ; Types.level = 0; Types.id = 0 } in
|
||||
Types.Cty_signature { Types.cty_self = { cs.Types.cty_self with
|
||||
|
|
|
@ -56,7 +56,7 @@ class scanner =
|
|||
method scan_class_pre (c : Odoc_class.t_class) = true
|
||||
|
||||
(** This method scan the elements of the given class.
|
||||
A VOIR : scan des classes héritées.*)
|
||||
A VOIR : scan des classes heritees.*)
|
||||
method scan_class_elements c =
|
||||
List.iter
|
||||
(fun ele ->
|
||||
|
@ -82,7 +82,7 @@ class scanner =
|
|||
method scan_class_type_pre (ct : Odoc_class.t_class_type) = true
|
||||
|
||||
(** This method scan the elements of the given class type.
|
||||
A VOIR : scan des classes héritées.*)
|
||||
A VOIR : scan des classes heritees.*)
|
||||
method scan_class_type_elements ct =
|
||||
List.iter
|
||||
(fun ele ->
|
||||
|
|
|
@ -728,7 +728,7 @@ module Analyser =
|
|||
new_module.m_info <- merge_infos new_module.m_info info_after_opt ;
|
||||
let new_env = Odoc_env.add_module env new_module.m_name in
|
||||
let new_env2 =
|
||||
match new_module.m_type with (* A VOIR : cela peut-il être Tmty_ident ? dans ce cas, on aurait pas la signature *)
|
||||
match new_module.m_type with (* A VOIR : cela peut-il etre Tmty_ident ? dans ce cas, on aurait pas la signature *)
|
||||
Types.Mty_signature s -> Odoc_env.add_signature new_env new_module.m_name ~rel: (Name.simple new_module.m_name) s
|
||||
| _ -> new_env
|
||||
in
|
||||
|
@ -748,7 +748,7 @@ module Analyser =
|
|||
raise (Failure (Odoc_messages.module_not_found current_module_name name))
|
||||
in
|
||||
match sig_module_type with
|
||||
(* A VOIR : cela peut-il être Tmty_ident ? dans ce cas, on aurait pas la signature *)
|
||||
(* A VOIR : cela peut-il etre Tmty_ident ? dans ce cas, on aurait pas la signature *)
|
||||
Types.Mty_signature s ->
|
||||
Odoc_env.add_signature e complete_name ~rel: name s
|
||||
| _ ->
|
||||
|
@ -863,7 +863,7 @@ module Analyser =
|
|||
mt.mt_info <- merge_infos mt.mt_info info_after_opt ;
|
||||
let new_env = Odoc_env.add_module_type env mt.mt_name in
|
||||
let new_env2 =
|
||||
match sig_mtype with (* A VOIR : cela peut-il être Tmty_ident ? dans ce cas, on aurait pas la signature *)
|
||||
match sig_mtype with (* A VOIR : cela peut-il etre Tmty_ident ? dans ce cas, on aurait pas la signature *)
|
||||
Some (Types.Mty_signature s) -> Odoc_env.add_signature new_env mt.mt_name ~rel: (Name.simple mt.mt_name) s
|
||||
| _ -> new_env
|
||||
in
|
||||
|
@ -1223,7 +1223,7 @@ module Analyser =
|
|||
([], Class_structure (inher_l, ele))
|
||||
|
||||
| (Parsetree.Pcty_fun (parse_label, _, pclass_type), Types.Cty_fun (label, type_expr, class_type)) ->
|
||||
(* label = string. Dans les signatures, pas de nom de paramètres à l'intérieur des tuples *)
|
||||
(* label = string. Dans les signatures, pas de nom de parametres a l'interieur des tuples *)
|
||||
(* si label = "", pas de label. ici on a l'information pour savoir si on a un label explicite. *)
|
||||
if parse_label = label then
|
||||
(
|
||||
|
|
|
@ -149,23 +149,23 @@ struct
|
|||
] @
|
||||
(if !esc_8bits
|
||||
then [
|
||||
(Str.regexp "à", "@`a") ;
|
||||
(Str.regexp "â", "@^a") ;
|
||||
(Str.regexp "é", "@'e") ;
|
||||
(Str.regexp "è", "@`e") ;
|
||||
(Str.regexp "ê", "@^e") ;
|
||||
(Str.regexp "ë", "@\"e") ;
|
||||
(Str.regexp "ç", "@,{c}") ;
|
||||
(Str.regexp "ô", "@^o") ;
|
||||
(Str.regexp "ö", "@\"o") ;
|
||||
(Str.regexp "î", "@^i") ;
|
||||
(Str.regexp "ï", "@\"i") ;
|
||||
(Str.regexp "ù", "@`u") ;
|
||||
(Str.regexp "û", "@^u") ;
|
||||
(Str.regexp "æ", "@ae{}" ) ;
|
||||
(Str.regexp "Æ", "@AE{}" ) ;
|
||||
(Str.regexp "ß", "@ss{}" ) ;
|
||||
(Str.regexp "©", "@copyright{}" ) ;
|
||||
(Str.regexp "\xE0", "@`a") ;
|
||||
(Str.regexp "\xE2", "@^a") ;
|
||||
(Str.regexp "\xE9", "@'e") ;
|
||||
(Str.regexp "\xE8", "@`e") ;
|
||||
(Str.regexp "\xEA", "@^e") ;
|
||||
(Str.regexp "\xEB", "@\"e") ;
|
||||
(Str.regexp "\xF7", "@,{c}") ;
|
||||
(Str.regexp "\xF4", "@^o") ;
|
||||
(Str.regexp "\xF6", "@\"o") ;
|
||||
(Str.regexp "\xEE", "@^i") ;
|
||||
(Str.regexp "\xEF", "@\"i") ;
|
||||
(Str.regexp "\xF9", "@`u") ;
|
||||
(Str.regexp "\xFB", "@^u") ;
|
||||
(Str.regexp "\xE6", "@ae{}" ) ;
|
||||
(Str.regexp "\xC6", "@AE{}" ) ;
|
||||
(Str.regexp "\xDF", "@ss{}" ) ;
|
||||
(Str.regexp "\xA9", "@copyright{}" ) ;
|
||||
]
|
||||
else [])
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@ let char_number = ref 0
|
|||
|
||||
let string_buffer = Buffer.create 32
|
||||
|
||||
(** Fonction de remise à zéro de la chaine de caractères tampon *)
|
||||
(** Fonction de remise a zero de la chaine de caracteres tampon *)
|
||||
let reset_string_buffer () = Buffer.reset string_buffer
|
||||
|
||||
(** Fonction d'ajout d'un caractère dans la chaine de caractères tampon *)
|
||||
(** Fonction d'ajout d'un caractere dans la chaine de caracteres tampon *)
|
||||
let ajout_char_string = Buffer.add_char string_buffer
|
||||
|
||||
(** Add a string to the buffer. *)
|
||||
|
|
Loading…
Reference in New Issue