Alex Burger wrote:

About 45 of the man pages have what appears to be invalid titles. For example, netsnmp_leaf.3 has:

.TH "leaf_handlers: process individual leaf objects" 3 "2 Sep 2004" "net-snmp" \" -*- nroff -*-

It looks like the man page above was generated by doxygen.

The doxygen line in all_helpers.c is:

/** @defgroup leaf leaf_handlers: process individual leaf objects

According to the doxygen docs, the first parameter to @defgroup is the 'group', and the second is the 'title' so 'leaf' is the group name and 'leaf_handlers: process individual leaf objects' is the title. Doxygen is using this 'title' for the man page title, which to me seems wrong. I think the title should be the same as the group name which would be the same as the filename.

I changed doxygen's mangen.cpp file from:

void ManGenerator::endTitleHead(const char *,const char *name)
{
  t << ".TH \"" << name << "\" " << getExtension() << " \""

to:

void ManGenerator::endTitleHead(const char *filename,const char *name)
{
  t << ".TH \"" << filename << "\" " << getExtension() << " \""

and the result is:

.TH "group__leaf" 3 "16 Oct 2004" "Version 5.2.pre1" "net-snmp" \" -*- nroff -*-

It's close, but not perfect. It should probably say just 'leaf' as that would match the manpage filename.

My question is:

a) Is there a bug or limitation in how doxygen decides on what to use as the 'title' in man pages? or
b) Are we not defining something that we should be in the Net-SNMP source code? or
c) Is it normal for man page titles to contain multi word lines?


Based on other man pages I have looked at, I think the answer to c) is no.

Alex


A 'man netsnmp_leaf' on Linux gives:

******
$ man netsnmp_leaf
leaf_handlers: process indivileaf_handlers:cprocess individual leaf objects(3)


NAME
<snip>
******

After changing it to:

.TH NETSNMP_LEAF 3 "2 Sep 2004" "" "Net-SNMP"

I now get the following which is correct:

******
NETSNMP_LEAF(3)                    Net-SNMP NETSNMP_LEAF(3)

NAME
<snip>
******

It looks like when they were generated the description in the NAME section was uses as the title. I would like to apply the attached patch, but I would like to know how the those man files were created, and if there is any reason for me not to patch them. If they were generated and will be re-generated in the future, then there's no point patching them.. None of the files I am patching were created by doxygen from what I can tell as there is no footer saying it was created with doxygen, unless it was an older version?

Alex



------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to