summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp6
-rw-r--r--src/code.l127
-rw-r--r--src/diagram.cpp1
-rw-r--r--src/doxygen.cpp80
-rw-r--r--src/filedef.cpp5
-rw-r--r--src/groupdef.cpp1
-rw-r--r--src/latexgen.cpp8
-rw-r--r--src/memberdef.cpp27
-rw-r--r--src/membergroup.cpp12
-rw-r--r--src/namespacedef.cpp6
-rw-r--r--src/pre.l24
-rw-r--r--src/scanner.l7
-rw-r--r--src/translator_it.h76
-rw-r--r--src/translator_ru.h25
14 files changed, 299 insertions, 106 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 49846b6..227f18e 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -973,9 +973,13 @@ void ClassDef::writeDocumentation(OutputList &ol)
}
// repeat brief description
- if (!briefDescription().isEmpty())
+ if (!briefDescription().isEmpty() && Config::repeatBriefFlag)
{
ol+=briefOutput;
+ }
+ if (!briefDescription().isEmpty() && Config::repeatBriefFlag &&
+ !documentation().isEmpty())
+ {
ol.newParagraph();
}
// write documentation
diff --git a/src/code.l b/src/code.l
index 9323361..619eb2a 100644
--- a/src/code.l
+++ b/src/code.l
@@ -36,6 +36,9 @@
#define YY_NEVER_INTERACTIVE 1
+#define SCOPEBLOCK (void *)1
+#define INNERBLOCK (void *)2
+
/*! local class definition, used for classes that are defined
* inside code fragments.
*/
@@ -104,6 +107,8 @@ static QCString g_parmType;
static QCString g_parmName;
static bool g_inClass;
static QCString g_classScope;
+static QCString g_realScope;
+static QStack<void> g_scopeStack; // 1 if bracket starts a scope, 2 for internal blocks
static OutputList * g_code;
static CodeClassDef g_ccd;
static CodeVarDef g_cvd;
@@ -123,6 +128,60 @@ static ClassDef * g_classVar;
static QCString g_saveName;
static QCString g_saveType;
+/*! add class/namespace name s to the scope */
+static void pushScope(const char *s)
+{
+ if (g_classScope.isEmpty())
+ {
+ g_classScope = s;
+ }
+ else
+ {
+ g_classScope += "::";
+ g_classScope += s;
+ }
+ //printf("pushScope() result: `%s'\n",g_classScope.data());
+}
+
+/*! remove the top class/namespace name from the scope */
+static void popScope()
+{
+ if (!g_classScope.isEmpty())
+ {
+ int i=g_classScope.findRev("::");
+ if (i==-1) // last name, strip all
+ {
+ g_classScope.resize(0);
+ }
+ else // strip name
+ {
+ g_classScope = g_classScope.left(i);
+ }
+ }
+ else
+ {
+ //err("Error: Too many end of scopes found!\n");
+ }
+ //printf("popScope() result: `%s'\n",g_classScope.data());
+}
+
+static void setClassScope(const QCString &name)
+{
+ //printf("setClassScope(%s)\n",name.data());
+ QCString n=name;
+ n=n.simplifyWhiteSpace();
+ int ts=n.find('<'); // start of template
+ int te=n.findRev('>'); // end of template
+ //printf("ts=%d te=%d\n",ts,te);
+ if (ts!=-1 && te!=-1 && te>ts)
+ {
+ // remove template from scope
+ n=n.left(ts)+n.right(n.length()-te-1);
+ }
+ g_classScope = n;
+ //printf("--->New class scope `%s'\n",g_classScope.data());
+}
+
/*! start a new line of code, inserting a line number if g_sourceFileDef
* is TRUE. If a definition starts at the current line, then the line
* number is linked to the documentation of that definition.
@@ -144,6 +203,8 @@ static void startCodeLine()
QCString anchor;
g_insideBody = FALSE;
g_searchingForBody = TRUE;
+ g_realScope = d->name().copy();
+ //printf("Real scope: `%s'\n",g_realScope.data());
g_bodyCurlyCount = 0;
if (g_currentMemberDef) anchor=g_currentMemberDef->anchor();
g_code->startCodeAnchor(lineAnchor);
@@ -256,27 +317,6 @@ static void addParmType()
g_parmName.resize(0) ;
}
-static void setClassScope(const QCString &name)
-{
- //printf("setClassScope(%s)\n",name.data());
- QCString n=name;
- n=n.simplifyWhiteSpace();
- int ts=n.find('<'); // start of template
- int te=n.findRev('>'); // end of template
- //printf("ts=%d te=%d\n",ts,te);
- if (ts!=-1 && te!=-1 && te>ts)
- {
- // remove template from scope
- n=n.left(ts)+n.right(n.length()-te-1);
- }
- int index;
- if ((index=n.findRev("::"))!=-1)
- g_classScope=n.left(index);
- else
- g_classScope.resize(0);
- //printf("--->New class scope `%s'\n",g_classScope.data());
-}
-
static void addVariable()
{
g_cvd.name=g_name.copy().simplifyWhiteSpace();
@@ -698,6 +738,9 @@ static void startFontClass(const char *s)
g_currentFontClass=s;
}
+
+
+
/* -----------------------------------------------------------------
*/
#undef YY_INPUT
@@ -753,7 +796,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_code->codify(yytext);
BEGIN( ReadInclude );
}
-<Body>("class"|"struct"|"union")[ \t\n]+ {
+<Body>("class"|"struct"|"union"|"namespace")[ \t\n]+ {
startFontClass("keyword");
codifyLines(yytext);
endFontClass();
@@ -801,6 +844,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_code->codify(yytext);
}
<Body>"{" {
+ g_scopeStack.push(INNERBLOCK);
if (g_searchingForBody)
{
g_searchingForBody=FALSE;
@@ -813,11 +857,12 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_name.resize(0);
}
<Body>"}" {
+ if (g_scopeStack.pop()==SCOPEBLOCK) popScope();
g_code->codify(yytext);
g_inClass=FALSE;
if (--g_curlyCount<=0)
{
- g_classScope.resize(0);
+ //g_classScope.resize(0);
g_codeParmList.clear();
}
if (--g_bodyCurlyCount<=0)
@@ -855,12 +900,18 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
if (g_insideBody) g_bodyCurlyCount++;
if (!g_ccd.name.isEmpty())
{
- g_classScope=g_ccd.name.copy();
+ g_scopeStack.push(SCOPEBLOCK);
+ pushScope(g_ccd.name);
+ //g_classScope=g_ccd.name.copy();
CodeClassDef *cd=new CodeClassDef(g_ccd);
g_codeClassList.append(cd);
g_codeClassDict.insert(cd->name,cd);
//printf("g_codeClassList.count()=%d\n",g_codeClassList.count());
}
+ else
+ {
+ g_scopeStack.push((void *)2);
+ }
BEGIN( Body );
}
<Bases>"virtual"|"public"|"protected"|"private" {
@@ -951,13 +1002,6 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_code->codify(yytext);
g_name.resize(0);g_type.resize(0);
}
- /*
-<Body>([a-z_A-Z~][a-z_A-Z0-9]*)/([ \t]*) {
- generateClassLink(*g_code,yytext);
- addType();
- name+=yytext;
- }
- */
<Body>{TYPEKW}/{B}* {
startFontClass("keywordtype");
g_code->codify(yytext);
@@ -1159,7 +1203,15 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
<MemberCall2,FuncCall>")"({BN}"const"|"volatile")*{BN}*"{" {
addParameter();
g_parmType.resize(0);g_parmName.resize(0);
- if (g_name.find("::")!=-1) setClassScope(g_name);
+ if (g_name.find("::")!=-1)
+ {
+ g_scopeStack.push(SCOPEBLOCK);
+ setClassScope(g_realScope);
+ }
+ else
+ {
+ g_scopeStack.push(INNERBLOCK);
+ }
g_code->codify(")");
startFontClass("keyword");
yytext[yyleng-1]='\0';
@@ -1190,7 +1242,15 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_insideBody=TRUE;
}
if (g_insideBody) g_bodyCurlyCount++;
- if (g_name.find("::")!=-1) setClassScope(g_name);
+ if (g_name.find("::")!=-1)
+ {
+ g_scopeStack.push(SCOPEBLOCK);
+ setClassScope(g_realScope);
+ }
+ else
+ {
+ g_scopeStack.push(INNERBLOCK);
+ }
g_type.resize(0); g_name.resize(0);
BEGIN( Body );
}
@@ -1520,6 +1580,7 @@ void parseCode(OutputList &ol,const char *className,const QCString &s,
g_sharpCount = 0;
g_insideTemplate = FALSE;
g_classVar = 0;
+ g_scopeStack.clear();
g_classScope = className;
g_exampleBlock = exBlock;
g_exampleName = exName;
diff --git a/src/diagram.cpp b/src/diagram.cpp
index 517433a..f9d803c 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -1243,7 +1243,6 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
err("Error: Problems running epstopdf. Check your TeX installation!\n");
return;
}
- printf("done\n");
}
}
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 6c268cf..1469a90 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -137,10 +137,51 @@ void clearAll()
delete mainPage; mainPage=0;
}
-//bool unrelatedFunctionsUsed;
-
-//ClassDef unrelatedClass("nothing",ClassDef::Class);
- // dummy class for unrelated functions
+void statistics()
+{
+ fprintf(stderr,"--- inputNameDict stats ----\n");
+ inputNameDict->statistics();
+ fprintf(stderr,"--- includeNameDict stats ----\n");
+ includeNameDict->statistics();
+ fprintf(stderr,"--- exampleNameDict stats ----\n");
+ exampleNameDict->statistics();
+ fprintf(stderr,"--- imageNameDict stats ----\n");
+ imageNameDict->statistics();
+ fprintf(stderr,"--- classDict stats ----\n");
+ classDict.statistics();
+ fprintf(stderr,"--- namespaceDict stats ----\n");
+ namespaceDict.statistics();
+ fprintf(stderr,"--- memberNameDict stats ----\n");
+ memberNameDict.statistics();
+ fprintf(stderr,"--- functionNameDict stats ----\n");
+ functionNameDict.statistics();
+ fprintf(stderr,"--- sectionDict stats ----\n");
+ sectionDict.statistics();
+ fprintf(stderr,"--- excludeNameDict stats ----\n");
+ excludeNameDict.statistics();
+ fprintf(stderr,"--- aliasDict stats ----\n");
+ aliasDict.statistics();
+ fprintf(stderr,"--- typedefDict stats ----\n");
+ typedefDict.statistics();
+ fprintf(stderr,"--- namespaceAliasDict stats ----\n");
+ namespaceAliasDict.statistics();
+ fprintf(stderr,"--- groupDict stats ----\n");
+ groupDict.statistics();
+ fprintf(stderr,"--- formulaDict stats ----\n");
+ formulaDict.statistics();
+ fprintf(stderr,"--- formulaNameDict stats ----\n");
+ formulaNameDict.statistics();
+ fprintf(stderr,"--- tagDestinationDict stats ----\n");
+ tagDestinationDict.statistics();
+ fprintf(stderr,"--- compoundKeywordDict stats ----\n");
+ compoundKeywordDict.statistics();
+ fprintf(stderr,"--- expandAsDefinedDict stats ----\n");
+ expandAsDefinedDict.statistics();
+ fprintf(stderr,"--- memberHeaderDict stats ----\n");
+ memberHeaderDict.statistics();
+ fprintf(stderr,"--- memberDocDict stats ----\n");
+ memberDocDict.statistics();
+}
int annotatedClasses;
int hierarchyClasses;
@@ -813,6 +854,8 @@ static void buildNamespaceList(Entry *root)
// the empty string test is needed for extract all case
nd->setBriefDescription(root->brief);
nd->insertUsedFile(root->fileName);
+ nd->setBodySegment(root->bodyLine,root->endBodyLine);
+ nd->setBodyDef(fd);
// add class to the list
namespaceList.inSort(nd);
namespaceDict.insert(fullName,nd);
@@ -4190,6 +4233,7 @@ static void generateFileDocs()
static void addSourceReferences()
{
+ // add source references for class definitions
ClassListIterator cli(classList);
ClassDef *cd=0;
for (cli.toFirst();(cd=cli.current());++cli)
@@ -4200,6 +4244,19 @@ static void addSourceReferences()
fd->addSourceRef(cd->getStartBodyLine(),cd,0);
}
}
+ // add source references for namespace definitions
+ NamespaceListIterator nli(namespaceList);
+ NamespaceDef *nd=0;
+ for (nli.toFirst();(nd=nli.current());++nli)
+ {
+ FileDef *fd=nd->getBodyDef();
+ if (fd && nd->isLinkableInProject() && nd->getStartBodyLine()!=-1)
+ {
+ fd->addSourceRef(nd->getStartBodyLine(),nd,0);
+ }
+ }
+
+ // add source references for member names
MemberNameListIterator mnli(memberNameList);
MemberName *mn=0;
for (mnli.toFirst();(mn=mnli.current());++mnli)
@@ -4441,11 +4498,6 @@ static void findDefineDocumentation(Entry *root)
md->setMaxInitLines(root->initLines);
if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId);
addMemberToGroups(root,md);
- //FileDef *fd=md->getFileDef();
- //if (fd && root->mGrpId!=-1)
- //{
- // fd->addMemberToGroup(md,root->mGrpId);
- //}
}
md=mn->next();
}
@@ -4476,16 +4528,8 @@ static void findDefineDocumentation(Entry *root)
bool ambig;
md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig));
md->addSectionsToDefinition(root->anchors);
- //if (root->mGrpId!=-1 && md->getMemberGroup()==0)
- //{
- // md->setMemberGroup(memberGroupDict[root->mGrpId]);
- //}
if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId);
addMemberToGroups(root,md);
- //if (root->mGrpId!=-1)
- //{
- // fd->addMemberToGroup(md,root->mGrpId);
- //}
}
}
md=mn->next();
@@ -5979,6 +6023,8 @@ int main(int argc,char **argv)
if (Config::generateHtml) writeDoxFont(Config::htmlOutputDir);
if (Config::generateRTF) writeDoxFont(Config::rtfOutputDir);
+ //statistics();
+
// count the number of documented elements in the lists we have built.
// If the result is 0 we do not generate the lists and omit the
// corresponding links in the index.
diff --git a/src/filedef.cpp b/src/filedef.cpp
index c4fe0f1..580749d 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -318,11 +318,12 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
- if (!briefDescription().isEmpty())
+ if (!briefDescription().isEmpty() && Config::repeatBriefFlag)
{
ol+=briefOutput;
}
- if (!briefDescription().isEmpty() && !documentation().isEmpty())
+ if (!briefDescription().isEmpty() && Config::repeatBriefFlag &&
+ !documentation().isEmpty())
{
ol.newParagraph();
}
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 5476dc1..3217c13 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -478,6 +478,7 @@ void addGroupToGroups(Entry *root,GroupDef *subGroup)
}
}
+/*! Add a member to all groups it is contained in */
void addMemberToGroups(Entry *root,MemberDef *md)
{
QListIterator<QCString> sli(*root->groups);
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 0f87add..0e37603 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -407,11 +407,11 @@ void LatexGenerator::writeStyleSheetFile(QFile &f)
writeDefaultStyleSheetPart1(t);
t << "Generated at " << dateToString(TRUE);
if (Config::projectName.isEmpty()) t << " for " << Config::projectName << " ";
- t << "by doxygen written by Dimitri van Heesch \\copyright{} 1997-2000";
+ t << "by doxygen written by Dimitri van Heesch \\copyright~1997-2000";
writeDefaultStyleSheetPart2(t);
t << "Generated at " << dateToString(TRUE);
if (Config::projectName.isEmpty()) t << " for " << Config::projectName << " ";
- t << "by doxygen written by Dimitri van Heesch \\copyright{} 1997-2000";
+ t << "by doxygen written by Dimitri van Heesch \\copyright~1997-2000";
writeDefaultStyleSheetPart3(t);
}
@@ -778,14 +778,14 @@ void LatexGenerator::writeStyleInfo(int part)
break;
case 2:
{
- t << " Dimitri van Heesch \\copyright{} 1997-2000";
+ t << " Dimitri van Heesch \\copyright~1997-2000";
t << "}]{}\n";
writeDefaultStyleSheetPart2(t);
}
break;
case 4:
{
- t << " Dimitri van Heesch \\copyright{} 1997-2000";
+ t << " Dimitri van Heesch \\copyright~1997-2000";
writeDefaultStyleSheetPart3(t);
endPlainFile();
}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 662a8f3..5bf7e46 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -1538,21 +1538,24 @@ void MemberDef::generateXML(QTextStream &t,Definition *def)
else if (xmlType==enum_t) // enum
{
t << " <enumvaluelist>" << endl;
- MemberListIterator emli(*enumFields);
- MemberDef *emd;
- for (emli.toFirst();(emd=emli.current());++emli)
+ if (enumFields)
{
- t << " <enumvalue>" << endl;
- t << " <name>";
- writeXMLString(t,emd->name());
- t << "</name>" << endl;
- if (!emd->init.isEmpty())
+ MemberListIterator emli(*enumFields);
+ MemberDef *emd;
+ for (emli.toFirst();(emd=emli.current());++emli)
{
- t << " <initializer>";
- writeXMLString(t,emd->init);
- t << "</initializer>" << endl;
+ t << " <enumvalue>" << endl;
+ t << " <name>";
+ writeXMLString(t,emd->name());
+ t << "</name>" << endl;
+ if (!emd->init.isEmpty())
+ {
+ t << " <initializer>";
+ writeXMLString(t,emd->init);
+ t << "</initializer>" << endl;
+ }
+ t << " </enumvalue>" << endl;
}
- t << " </enumvalue>" << endl;
}
t << " </enumvaluelist>" << endl;
}
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index 223932c..f1bf6bb 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -25,6 +25,7 @@
#include "filedef.h"
#include "language.h"
#include "scanner.h"
+#include "groupdef.h"
//static QCString idToName(int id)
//{
@@ -58,8 +59,9 @@ void MemberGroup::insertMember(MemberDef *md)
// memberList->first() ? memberList->first()->getSectionList() : 0,
// memberList->count(),
// md->getSectionList());
+ MemberDef *firstMd = memberList->first();
if (inSameSection && memberList->count()>0 &&
- memberList->first()->getSectionList()!=md->getSectionList())
+ firstMd->getSectionList()!=md->getSectionList())
{
inSameSection=FALSE;
}
@@ -68,6 +70,14 @@ void MemberGroup::insertMember(MemberDef *md)
inDeclSection = md->getSectionList();
}
memberList->append(md);
+
+ // copy the group of the first member in the memberGroup
+ GroupDef *gd;
+ if (firstMd && (gd=firstMd->getGroupDef()))
+ {
+ md->setGroupDef(gd);
+ gd->insertMember(md);
+ }
}
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 8badc81..6377295 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -251,9 +251,13 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
ol.startTextBlock();
- if (!briefDescription().isEmpty())
+ if (!briefDescription().isEmpty() && Config::repeatBriefFlag)
{
ol+=briefOutput;
+ }
+ if (!briefDescription().isEmpty() && Config::repeatBriefFlag &&
+ !documentation().isEmpty())
+ {
ol.newParagraph();
}
if (!documentation().isEmpty())
diff --git a/src/pre.l b/src/pre.l
index e18c61e..823e6e7 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -278,16 +278,19 @@ static QCString stringize(const QCString &s)
*/
static void processConcatOperators(QCString &expr)
{
+ //printf("processConcatOperators: in=`%s'\n",expr.data());
QRegExp r("[ \\t\\n]*##[ \\t\\n]*");
int l,n,i=0;
if (expr.isEmpty()) return;
while ((n=r.match(expr,i,&l))!=-1)
{
+ //printf("Match: `%s'\n",expr.data()+i);
if (n+l+1<(int)expr.length() && expr.at(n+l)=='@' && expr.at(n+l+1)=='-')
{
// remove no-rescan marker after ID
l+=2;
}
+ //printf("found `%s'\n",expr.mid(n,l).data());
// remove the ## operator and the surrounding whitespace
expr=expr.left(n)+expr.right(expr.length()-n-l);
int k=n-1;
@@ -298,14 +301,15 @@ static void processConcatOperators(QCString &expr)
expr=expr.left(k-1)+expr.right(expr.length()-k-1);
n-=2;
}
- i=n+l;
+ i=n;
}
+ //printf("processConcatOperators: out=`%s'\n",expr.data());
}
/*! replaces the function macro \a def whose argument list starts at
* \a pos in expression \a expr.
* Notice that this routine may scan beyond the \a expr string if needed.
- * The characters from the input file will be read.
+ * In that case the characters will be read from the input file.
* The replacement string will be returned in \a result and the
* length of the (unexpanded) argument list is stored in \a len.
*/
@@ -338,7 +342,7 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
int argCount=0;
bool done=FALSE;
- // FASE 1: read the macro arguments
+ // PHASE 1: read the macro arguments
if (def->nargs==0)
{
while ((cc=getNextChar(expr,rest,j))!=EOF)
@@ -442,7 +446,7 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
}
}
- // FASE 2: apply the macro function
+ // PHASE 2: apply the macro function
if (argCount==def->nargs ||
(argCount>def->nargs && def->varArgs)) // matching parameters lists
{
@@ -486,7 +490,7 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
while (l<(int)d.length() && d.at(l)==' ') l++;
if (l<(int)d.length()-1 && d.at(l)=='#' && d.at(l+1)=='#') hash=TRUE;
}
- //printf("request key %s result %s\n",key.data(),args[key]->data());
+ //printf("request key %s result %s\n",key.data(),argTable[key]->data());
if (key.length()>1 && (subst=argTable[key]))
{
QCString substArg=*subst;
@@ -817,12 +821,12 @@ void addDefine()
//if ((d=defineDict[g_defName])==0) defineDict.insert(g_defName,newDefine());
}
-static void outputChar(char c)
+static inline void outputChar(char c)
{
if (g_includeStack.isEmpty() || g_curlyCount>0) g_outputBuf->addChar(c);
}
-static void outputArray(const char *a,int len)
+static inline void outputArray(const char *a,int len)
{
if (g_includeStack.isEmpty() || g_curlyCount>0) g_outputBuf->addArray(a,len);
}
@@ -1007,7 +1011,7 @@ BN [ \t\r\n]
<CopyLine>{ID}/{BN}*"(" {
Define *def=0;
//printf("Search for define %s\n",yytext);
- if (g_includeStack.isEmpty() &&
+ if ((g_includeStack.isEmpty() || g_curlyCount>0) &&
Config::macroExpansionFlag &&
/* (expandDefine=fileDefineCache->findDefine(g_yyFileName,yytext)) */
(def=g_fileDefineDict->find(yytext)) &&
@@ -1037,7 +1041,7 @@ BN [ \t\r\n]
<CopyLine>{ID} {
Define *def=0;
//printf("Search for define %s\n",yytext);
- if (g_includeStack.isEmpty() &&
+ if ((g_includeStack.isEmpty() || g_curlyCount>0) &&
Config::macroExpansionFlag &&
(def=g_fileDefineDict->find(yytext)) &&
def->nargs==-1 &&
@@ -1557,7 +1561,7 @@ BN [ \t\r\n]
outputChar('\n');
Define *def=0;
//printf("Define name=`%s' text=`%s' litTexti=`%s'\n",g_defName.data(),g_defText.data(),g_defLitText.data());
- if (g_includeStack.isEmpty())
+ if (g_includeStack.isEmpty() || g_curlyCount>0)
{
addDefine();
}
diff --git a/src/scanner.l b/src/scanner.l
index abf1b26..6bd6f2d 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -87,6 +87,7 @@ static int roundCount = 0 ;
static int curlyCount = 0 ;
static int squareCount = 0 ;
static int ifCount = 0 ;
+static int padCount = 0 ;
static int todoStartContext = 0;
static QCString todoString = 0;
static int testStartContext = 0;
@@ -1267,6 +1268,11 @@ TITLE [tT][iI][tT][lL][eE]
*pCopyCurlyString+=*yytext;
}
<FindMembers>":" {
+ if (current->type.isEmpty()) // bit pad field
+ {
+ addType(current);
+ current->name.sprintf("__pad%d__",padCount++);
+ }
BEGIN(BitFields);
current->bitfields+=":";
}
@@ -3485,6 +3491,7 @@ static void parseCompounds(Entry *rt)
//printf("-- %s ---------\n%s\n---------------\n",
// ce->name.data(),ce->program.data());
// init scanner state
+ padCount=0;
inputString = ce->program;
inputPosition = 0;
scanYYrestart( scanYYin ) ;
diff --git a/src/translator_it.h b/src/translator_it.h
index 71fe2bb..11ac002 100644
--- a/src/translator_it.h
+++ b/src/translator_it.h
@@ -5,13 +5,15 @@
* Initial Italian Translation by Ahmed Aldo Faisal
* Revised and completed by Alessandro Falappa (June 1999)
* Updates:
- * 2000/08: translated new items used since version 1.1.3, 1.1.4, 1.1.5 and 1.2.0
- * 2000/03: translated new items used since version 1.0 and 1.1.0
- * 1999/19: entirely rewritten the translation to correct small variations due
- * to feature additions and to conform to the layout of the latest
- * commented translator.h for the english language
- * 1999/09: corrected some small typos in the "new since 0.49-990425" section
- * added the "new since 0.49-990728" section
+ * 2000/11: modified slightly the translation in trLegendDocs() function,
+ * translated new items used since version 1.2.1 and 1.2.2
+ * 2000/08: translated new items used since version 1.1.3, 1.1.4, 1.1.5 and 1.2.0
+ * 2000/03: translated new items used since version 1.0 and 1.1.0
+ * 1999/19: entirely rewritten the translation to correct small variations due
+ * to feature additions and to conform to the layout of the latest
+ * commented translator.h for the english language
+ * 1999/09: corrected some small typos in the "new since 0.49-990425" section
+ * added the "new since 0.49-990728" section
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -91,7 +93,7 @@ class TranslatorItalian : public Translator
*/
QCString trGeneratedAutomatically(const char *s)
{
- QCString result="Generato automaticamente da Doxygen";
+ QCString result="Generato automaticamente da Doxygen";
if (s) result+=(QCString)" per "+s;
result+=" a partire dal codice sorgente.";
return result;
@@ -162,8 +164,8 @@ class TranslatorItalian : public Translator
/*! This is an introduction to the class hierarchy. */
QCString trClassHierarchyDescription()
{
- return "Questa lista di ereditarietà è ordinata "
- "approssimativamente, ma non completamente, in ordine alfabetico:";
+ return "Questa lista di ereditarietà è ordinata "
+ "approssimativamente, ma non completamente, in ordine alfabetico:";
}
/*! This is an introduction to the list with all files. */
@@ -171,7 +173,7 @@ class TranslatorItalian : public Translator
{
QCString result="Questa è una lista ";
if (!extractAll) result+="dei files documentati ";
- else result+="di tutti i files ";
+ else result+="di tutti i files ";
result+="con una loro breve descrizione:";
return result;
}
@@ -186,7 +188,7 @@ class TranslatorItalian : public Translator
{
QCString result="Questa è una lista ";
if (!extractAll) result+="dei membri documentati, ";
- else result+="di tutti i membri ";
+ else result+="di tutti i membri ";
result+="con collegamenti ";
if (extractAll) result+="alla documentazione della classe di ciascun membro:";
else result+="alla documentazione delle classi a cui appartengono:";
@@ -198,7 +200,7 @@ class TranslatorItalian : public Translator
{
QCString result="Questa è una lista ";
if (!extractAll) result+="dei membri dei files documentati, ";
- else result+="di tutti i membri dei files ";
+ else result+="di tutti i membri dei files ";
result+="con collegamenti ";
if (extractAll) result+="alla documentazione del file di ciascun membro:";
else result+="alla documentazione dei files a cui appartengono:";
@@ -476,7 +478,7 @@ class TranslatorItalian : public Translator
{
QCString result="Questa è la lista ";
if (!extractAll) result+="dei namespaces documentati, ";
- else result+="di tutti i namespaces ";
+ else result+="di tutti i namespaces ";
result+="con una loro breve descrizione:";
return result;
}
@@ -627,7 +629,7 @@ class TranslatorItalian : public Translator
{
QCString result="Questa è la lista ";
if (!extractAll) result+="dei membri dei namespaces documentati, ";
- else result+="di tutti i membri dei namespaces ";
+ else result+="di tutti i membri dei namespaces ";
result+="con collegamenti ";
if (extractAll)
result+="alla documentazione del namespace per ciascun membro:";
@@ -679,7 +681,7 @@ class TranslatorItalian : public Translator
}
result+=" è stata generata a partire ";
if (single) result+="dal seguente file:";
- else result+="dai seguenti files:";
+ else result+="dai seguenti files:";
return result;
}
@@ -906,21 +908,21 @@ class TranslatorItalian : public Translator
"Questa pagina spiega come interpretare i grafi generati da doxygen.<p>\n"
"Considerate l'esempio seguente:\n"
"\\code\n"
- "/*! Invisible class because of truncation */\n"
+ "/*! Classe invisibile per troncamento */\n"
"class Invisible { };\n\n"
- "/*! Truncated class, inheritance relation is hidden */\n"
+ "/*! Classe troncata, la relazione di ereditarietà e nascosta */\n"
"class Truncated : public Invisible { };\n\n"
- "/* Class not documented with doxygen comments */\n"
+ "/* Classe non documentata con i commenti speciali di doxygen*/\n"
"class Undocumented { };\n\n"
- "/*! Class that is inherited using public inheritance */\n"
+ "/*! Classe che utilizza una ereditarietà pubblica */\n"
"class PublicBase : public Truncated { };\n\n"
- "/*! Class that is inherited using protected inheritance */\n"
+ "/*! Classe che utilizza una ereditarietà protetta*/\n"
"class ProtectedBase { };\n\n"
- "/*! Class that is inherited using private inheritance */\n"
+ "/*! Classe che utilizza una ereditarietà privata*/\n"
"class PrivateBase { };\n\n"
- "/*! Class that is used by the Inherited class */\n"
+ "/*! Classe utilizzata dalla classe Inherited */\n"
"class Used { };\n\n"
- "/*! Super class that inherits a number of other classes */\n"
+ "/*! Classe che eredita da varie classi*/\n"
"class Inherited : public PublicBase,\n"
" protected ProtectedBase,\n"
" private PrivateBase,\n"
@@ -970,6 +972,32 @@ class TranslatorItalian : public Translator
{
return "Lista dei test";
}
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a section header for KDE-2 IDL methods */
+ virtual QCString trDCOPMethods()
+ {
+ return "Metodi DCOP";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a section header for IDL properties */
+ virtual QCString trProperties()
+ {
+ return "Proprietà";
+ }
+ /*! Used as a section header for IDL property documentation */
+ virtual QCString trPropertyDocumentation()
+ {
+ return "Documentazione delle Proprietà";
+ }
+
};
#endif
diff --git a/src/translator_ru.h b/src/translator_ru.h
index 495d96a..919faae 100644
--- a/src/translator_ru.h
+++ b/src/translator_ru.h
@@ -796,6 +796,31 @@ class TranslatorRussian : public Translator
{
return "óÐÉÓÏË ôÅÓÔÏ×";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a section header for KDE-2 IDL methods */
+ virtual QCString trDCOPMethods()
+ {
+ return "íÅÔÏÄÙ DCOP";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a section header for IDL properties */
+ virtual QCString trProperties()
+ {
+ return "ó×ÏÊÓÔ×Á";
+ }
+ /*! Used as a section header for IDL property documentation */
+ virtual QCString trPropertyDocumentation()
+ {
+ return "äÏËÕÍÅÎÔÁÃÉÑ ó×ÏÊÓÔ×";
+ }
+
};