summaryrefslogtreecommitdiffstats
path: root/src/memberdef.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2001-02-04 18:02:44 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2001-02-04 18:02:44 (GMT)
commitf376c26e3dbe33a773a2f424df4b9c62c8c880ef (patch)
tree0079dfe633e79bae80c0743850c85fb68f276f60 /src/memberdef.cpp
parent1c75d01c701209261a5b6af831280957681e557f (diff)
downloadDoxygen-f376c26e3dbe33a773a2f424df4b9c62c8c880ef.zip
Doxygen-f376c26e3dbe33a773a2f424df4b9c62c8c880ef.tar.gz
Doxygen-f376c26e3dbe33a773a2f424df4b9c62c8c880ef.tar.bz2
Release-1.2.5
Diffstat (limited to 'src/memberdef.cpp')
-rw-r--r--src/memberdef.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 24f7e43..4489b7d 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -279,7 +279,8 @@ MemberDef::MemberDef(const char *df,int dl,
indDepth=0;
section=0;
explExt=FALSE;
- maxInitLines=defMaxInitLines;
+ maxInitLines=Config::maxInitLines;
+ userInitLines=-1;
docEnumValues=FALSE;
// copy function template arguments (if any)
if (tal)
@@ -793,7 +794,9 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
linkifyText(TextGeneratorOLImpl(ol),cname,name(),bitfields.simplifyWhiteSpace());
}
- else if (!init.isEmpty() && initLines==0 && maxInitLines>0) // add initializer
+ else if (!init.isEmpty() && initLines==0 && // one line initializer
+ ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
+ ) // add initializer
{
if (!isDefine())
{
@@ -1004,7 +1007,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startMemberDocName();
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef);
writeDefArgumentList(ol,cd,scopeName,this);
- if (!init.isEmpty() && initLines==0 && maxInitLines>0) // add initializer
+ if (!init.isEmpty() && initLines==0 && // one line initializer
+ ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
+ ) // add initializer
{
if (!isDefine())
{
@@ -1081,10 +1086,16 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.popGeneratorState();
/* write multi-line initializer (if any) */
- if (initLines>0 && initLines<maxInitLines)
+ if (initLines>0 && ((initLines<maxInitLines && userInitLines==-1) // implicitly enabled
+ || initLines<userInitLines // explicitly enabled
+ )
+ )
{
ol.startBold();
- parseText(ol,theTranslator->trInitialValue());
+ if (mtype==Define)
+ parseText(ol,theTranslator->trDefineValue());
+ else
+ parseText(ol,theTranslator->trInitialValue());
ol.endBold();
initParseCodeContext();
ol.startCodeFragment();