Skip to content

Commit

Permalink
Bug 652276 - Typedefs in manpages has too few linebreak possiblilities
Browse files Browse the repository at this point in the history
  • Loading branch information
ellert committed Aug 31, 2014
1 parent 7a0f5e6 commit 4bbcf71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/doxygen.cpp
Expand Up @@ -2833,14 +2833,14 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
else if (root->type.find(')',i)!=-1) // function ptr, not variable like "int (*bla)[10]" else if (root->type.find(')',i)!=-1) // function ptr, not variable like "int (*bla)[10]"
{ {
root->type=root->type.left(root->type.length()-1); root->type=root->type.left(root->type.length()-1);
root->args.prepend(")"); root->args.prepend(") ");
//printf("root->type=%s root->args=%s\n",root->type.data(),root->args.data()); //printf("root->type=%s root->args=%s\n",root->type.data(),root->args.data());
} }
} }
else if (root->type.find("typedef ")!=-1 && root->type.right(2)=="()") // typedef void (func)(int) else if (root->type.find("typedef ")!=-1 && root->type.right(2)=="()") // typedef void (func)(int)
{ {
root->type=root->type.left(root->type.length()-1); root->type=root->type.left(root->type.length()-1);
root->args.prepend(")"); root->args.prepend(") ");
} }
} }


Expand Down
4 changes: 3 additions & 1 deletion src/memberdef.cpp
Expand Up @@ -1669,13 +1669,15 @@ void MemberDef::writeDeclaration(OutputList &ol,
// *** write arguments // *** write arguments
if (argsString() && !isObjCMethod()) if (argsString() && !isObjCMethod())
{ {
if (!isDefine()) ol.writeString(" "); if (!isDefine() && !isTypedef()) ol.writeString(" ");
linkifyText(TextGeneratorOLImpl(ol), // out linkifyText(TextGeneratorOLImpl(ol), // out
d, // scope d, // scope
getBodyDef(), // fileScope getBodyDef(), // fileScope
this, // self this, // self
isDefine() ? isDefine() ?
(const char*)substitute(argsString(),",",", ") : (const char*)substitute(argsString(),",",", ") :
isTypedef() ?
(const char*)substitute(argsString(),")(",") (") :
argsString(), // text argsString(), // text
m_impl->annMemb, // autoBreak m_impl->annMemb, // autoBreak
TRUE, // external TRUE, // external
Expand Down

0 comments on commit 4bbcf71

Please sign in to comment.