Patch to Doxygen 1.3.7 for man file output
Chris Croughton <doxydev <at> keristor.co.uk>
2004-05-18 14:09:18 GMT
Hi all!
This patch corrects two bugs, both in man page output.
1) Using \verbatim (and other commands turning off 'filling' of lines)
caused the output to be left in that state for the rest of the file,
due to having a .nf directive but no following .fi directive.
2) If a function had only a brief description and no detailed
description (for instance using the JAVADOC_AUTOBRIEF and
REPEAT_BRIEF options) then following text, like the label
'Parameters', would get put on the same line. This was due to text
output not setting the 'paragraph' flag.
Test code:
------------------------------------------------------------------------------
/**
\file 1.cc
*/
/**
* This is the main program. No surprises there, then, but let's have some
* text to fill things out a bit. And another sentence for good luck.
* <at> param argc the argument count
* <at> param argv the argument pointer
*/
int main(int argc, char **argv)
{
return 0;
}
/**
* This has only a short description.
* <at> param arg the argument
*/
void fred(int arg)
{
}
/**
* A function to test verbatim output. Let's have a bit of long description
* first just to fill in the space...
\verbatim
Lines to output "as is"
with no filling
not even cream.
\endverbatim
* And now some text which needs to be filled with cream and
* other sugary stuff which is bad for your teeth. Not to mention
* your waistline if you worry about such things...
*/
void function_verb(void)
{
}
------------------------------------------------------------------------------
Output without patch (just the detailed descriptions):
------------------------------------------------------------------------------
int main (int argc, char ** argv)
This is the main program. No surprises there, then, but let's have some
text to fill things out a bit. And another sentence for good luck.
Parameters:
argc the argument count
argv the argument pointer
void fred (int arg)
This has only a short description. Parameters:
arg the argument
void function_verb (void)
A function to test verbatim output. Let's have a bit of long description
first just to fill in the space...
Lines to output "as is"
with no filling
not even cream.
And now some text which needs to be filled with cream and other sugary stuff which is
bad for your teeth. Not to mention your waistline if you worry about such things...
------------------------------------------------------------------------------
Output with patch (just the detailed descriptions):
------------------------------------------------------------------------------
int main (int argc, char ** argv)
This is the main program.
No surprises there, then, but let's have some text to fill things out a
bit. And another sentence for good luck.
Parameters:
argc the argument count
argv the argument pointer
void fred (int arg)
This has only a short description.
Parameters:
arg the argument
void function_verb (void)
A function to test verbatim output.
Let's have a bit of long description first just to fill in the space...
Lines to output "as is"
with no filling
not even cream.
And now some text which needs to be filled with cream and other sugary
stuff which is bad for your teeth. Not to mention your waistline if you
worry about such things...
------------------------------------------------------------------------------
Patch:
------------------------------------------------------------------------------
*** doxygen-1.3.7/src/mandocvisitor.cpp Tue Apr 13 18:13:43 2004
--- src/mandocvisitor.cpp Tue May 18 14:39:49 2004
***************
*** 167,172 ****
--- 167,173 ----
{
m_insidePre=FALSE;
if (!m_firstCol) m_t << endl;
+ m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
***************
*** 187,192 ****
--- 188,194 ----
m_t << ".nf" << endl;
parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile());
if (!m_firstCol) m_t << endl;
+ m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
***************
*** 196,201 ****
--- 198,204 ----
m_t << ".nf" << endl;
m_t << s->text();
if (!m_firstCol) m_t << endl;
+ m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
***************
*** 230,235 ****
--- 233,239 ----
FileDef fd( cfi.dirPath(), cfi.fileName() );
parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile(), &fd);
if (!m_firstCol) m_t << endl;
+ m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
***************
*** 240,245 ****
--- 244,250 ----
m_t << ".nf" << endl;
parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile());
if (!m_firstCol) m_t << endl;
+ m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
***************
*** 253,258 ****
--- 258,264 ----
m_t << ".nf" << endl;
m_t << inc->text();
if (!m_firstCol) m_t << endl;
+ m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
***************
*** 287,292 ****
--- 293,299 ----
if (!m_hide)
{
if (!m_firstCol) m_t << endl;
+ m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
***************
*** 548,553 ****
--- 555,561 ----
//{
// m_insidePre=FALSE;
// if (!m_firstCol) m_t << endl;
+ // m_t << ".fi" << endl;
// m_t << ".PP" << endl;
// m_firstCol=TRUE;
//}
*** doxygen-1.3.7/src/mangen.cpp Wed Mar 24 20:36:05 2004
--- src/mangen.cpp Tue May 18 14:33:34 2004
***************
*** 632,636 ****
--- 632,637 ----
n->accept(visitor);
delete visitor;
firstCol=FALSE;
+ paragraph = FALSE;
}
------------------------------------------------------------------------------
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click