You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3412 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Samuel Mimram
Version: 3.08.2
OS: linux
Submission from: 84.97.221.8 (84.97.221.8)
I think the section for the manpages generated by ocamldoc is wrong.
According to man 7 man, the .TH macro's second argument should be the section
number:
.TH title section date source manual
where "section" is the section number the man page should be placed in (e.g.,
7).
For example (in odoc_man.ml):
method generate_for_module m =
let date = Unix.time () in
let file = self#file_name m.m_name in
try
let chanout = self#open_out file in
let b = new_buf () in
bs b ".TH \"";
bs b Odoc_messages.modul;
bs b "\" ";
bs b (m.m_name^" ");
^^^^^^^^
It should be the section here, not the module name
[...]
The other generate_for_* functions are also affected.
I think that the most sensible thing to do would be to use
!Odoc_args.man_suffix. A quick patch follows.
Regards,
Samuel.
diff -ru ocaml-3.08.2.old/ocamldoc/odoc_man.ml
ocaml-3.08.2/ocamldoc/odoc_man.ml
--- ocaml-3.08.2.old/ocamldoc/odoc_man.ml 2004-12-28 17:44:43.000000000 +0100
+++ ocaml-3.08.2/ocamldoc/odoc_man.ml 2004-12-28 18:05:27.000000000 +0100
@@ -655,8 +655,8 @@
let chanout = self#open_out file in
let b = new_buf () in
bs b ".TH "";
bs b Odoc_messages.clas;
bs b ("" "^cl.cl_name^" ");
bs b cl.cl_name;
bs b ("" "^ !Odoc_args.man_suffix ^" ");
bs b ("""^(Odoc_misc.string_of_date ~hour: false date)^"" ");
bs b "OCamldoc ";
bs b ("""^(match !Args.title with Some t -> t | None -> "")^""\n");
@@ -714,8 +714,8 @@
try
let chanout = self#open_out file in
let b = new_buf () in
bs b (".TH ""^Odoc_messages.class_type^"" ");
bs b (ct.clt_name^" ");
bs b (".TH ""^ct.clt_name^"" ");
bs b (!Odoc_args.man_suffix^" ");
bs b ("\""^(Odoc_misc.string_of_date ~hour: false date)^"\" ");
bs b "OCamldoc ";
bs b ("\""^(match !Args.title with Some t -> t | None -> "")^"\"\n");
@@ -771,8 +771,8 @@
try
let chanout = self#open_out file in
let b = new_buf () in
bs b (".TH ""^Odoc_messages.module_type^"" ");
bs b (mt.mt_name^" ");
bs b (".TH ""^mt.mt_name^"" ");
bs b (!Odoc_args.man_suffix^" ");
bs b ("\""^(Odoc_misc.string_of_date ~hour: false date)^"\" ");
bs b "OCamldoc ";
bs b ("\""^(match !Args.title with Some t -> t | None -> "")^"\"\n");
@@ -850,9 +850,9 @@
let chanout = self#open_out file in
let b = new_buf () in
bs b ".TH "";
bs b Odoc_messages.modul;
bs b m.m_name;
bs b "" ";
bs b (m.m_name^" ");
bs b (!Odoc_args.man_suffix^" ");
bs b ("\""^(Odoc_misc.string_of_date ~hour: false date)^"\" ");
bs b "OCamldoc ";
bs b ("\""^(match !Args.title with Some t -> t | None -> "")^"\"\n");
@@ -979,7 +979,7 @@
let chanout = self#open_out file in
let b = new_buf () in
bs b (".TH ""^name^"" ");
bs b "man ";
bs b (!Odoc_args.man_suffix^" ");
bs b ("\""^(Odoc_misc.string_of_date ~hour: false date)^"\" ");
bs b "OCamldoc ";
bs b ("\""^(match !Args.title with Some t -> t | None -> "")^"\"\n");
The text was updated successfully, but these errors were encountered:
This is now fixed in the CVS by adding a -man-section option. -man-suffix is
used for filename suffixes
(default is 3o), -man-section is for section number inside files (default is
3).
Fixed by adding a -man-section option. -man-suffix is used for filename
suffixes
(default is 3o), -man-section is for section number inside files (default is 3).
Original bug ID: 3412
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Samuel Mimram
Version: 3.08.2
OS: linux
Submission from: 84.97.221.8 (84.97.221.8)
I think the section for the manpages generated by ocamldoc is wrong.
According to man 7 man, the .TH macro's second argument should be the section
number:
.TH title section date source manual
where "section" is the section number the man page should be placed in (e.g.,
7).
For example (in odoc_man.ml):
The other generate_for_* functions are also affected.
I think that the most sensible thing to do would be to use
!Odoc_args.man_suffix. A quick patch follows.
Regards,
Samuel.
diff -ru ocaml-3.08.2.old/ocamldoc/odoc_man.ml
ocaml-3.08.2/ocamldoc/odoc_man.ml
--- ocaml-3.08.2.old/ocamldoc/odoc_man.ml 2004-12-28 17:44:43.000000000 +0100
+++ ocaml-3.08.2/ocamldoc/odoc_man.ml 2004-12-28 18:05:27.000000000 +0100
@@ -655,8 +655,8 @@
let chanout = self#open_out file in
let b = new_buf () in
bs b ".TH "";
bs b ("""^(Odoc_misc.string_of_date ~hour: false date)^"" ");
bs b "OCamldoc ";
bs b ("""^(match !Args.title with Some t -> t | None -> "")^""\n");
@@ -714,8 +714,8 @@
try
let chanout = self#open_out file in
let b = new_buf () in
@@ -771,8 +771,8 @@
try
let chanout = self#open_out file in
let b = new_buf () in
@@ -850,9 +850,9 @@
let chanout = self#open_out file in
let b = new_buf () in
bs b ".TH "";
bs b "" ";
@@ -979,7 +979,7 @@
let chanout = self#open_out file in
let b = new_buf () in
bs b (".TH ""^name^"" ");
The text was updated successfully, but these errors were encountered: