summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.l13
-rw-r--r--src/dot.cpp107
-rw-r--r--src/dot.h8
-rw-r--r--src/doxygen.cpp39
-rw-r--r--src/htmldocvisitor.cpp27
-rw-r--r--src/scanner.l15
-rw-r--r--src/translator_adapter.h15
-rw-r--r--src/translator_cz.h17
-rw-r--r--src/translator_es.h2
-rw-r--r--src/translator_it.h14
-rw-r--r--src/translator_nl.h13
-rw-r--r--src/util.cpp73
-rw-r--r--src/xmlgen.cpp1
13 files changed, 234 insertions, 110 deletions
diff --git a/src/config.l b/src/config.l
index 59260ea..5b644a3 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1348,7 +1348,7 @@ void Config::create()
cb = addBool(
"CREATE_SUBDIRS",
"If the CREATE_SUBDIRS tag is set to YES, then doxygen will create \n"
- "2 levels of 10 sub-directories under the output directory of each output \n"
+ "4096 sub-directories (in 2 levels) under the output directory of each output \n"
"format and will distribute the generated files over these directories. \n"
"Enabling this option can be useful when feeding doxygen a huge amount of source \n"
"files, where putting all generated files in the same directory would otherwise \n"
@@ -1361,10 +1361,11 @@ void Config::create()
"documentation generated by doxygen is written. Doxygen will use this \n"
"information to generate all constant output in the proper language. \n"
"The default language is English, other supported languages are: \n"
- "Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, \n"
- "Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en \n"
- "(Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, \n"
- "Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.\n",
+ "Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, \n"
+ "Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, \n"
+ "Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, \n"
+ "Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, \n"
+ "Swedish, and Ukrainian.\n",
"English"
);
#ifdef LANG_BR
@@ -1513,7 +1514,7 @@ void Config::create()
"If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full \n"
"path before files name in the file list and in the header files. If set \n"
"to NO the shortest path that makes the file name unique will be used. \n",
- FALSE
+ TRUE
);
cl = addList(
"STRIP_FROM_PATH",
diff --git a/src/dot.cpp b/src/dot.cpp
index c9f54d0..7ebc1dd 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -193,6 +193,48 @@ static bool convertMapFile(QTextStream &t,const char *mapName,
return TRUE;
}
+static QArray<int> * s_newNumber = new QArray<int>();
+static int s_max_newNumber=0;
+
+inline int reNumberNode(int number, bool doReNumbering)
+{
+ if (!doReNumbering)
+ {
+ return number;
+ }
+ else
+ {
+ int s = s_newNumber->size();
+ if (number>=s)
+ {
+ int ns=0;
+ ns = s * 3 / 2 + 5; // new size
+ if (number>=ns) // number still doesn't fit
+ {
+ ns = number * 3 / 2 + 5;
+ }
+ s_newNumber->resize(ns);
+ for (int i=s;i<ns;i++) // clear new part of the array
+ {
+ s_newNumber->at(i)=0;
+ }
+ }
+ int i = s_newNumber->at(number);
+ if (i == 0) // not yet mapped
+ {
+ i = ++s_max_newNumber; // start from 1
+ s_newNumber->at(number) = i;
+ }
+ return i;
+ }
+}
+
+static void resetReNumbering()
+{
+ s_max_newNumber=0;
+ s_newNumber->resize(s_max_newNumber);
+}
+
static bool readBoundingBoxDot(const char *fileName,int *width,int *height)
{
QFile f(fileName);
@@ -497,14 +539,15 @@ static void writeBoxMemberList(QTextStream &t,char prot,MemberList &ml,ClassDef
void DotNode::writeBox(QTextStream &t,
GraphType gt,
GraphOutputFormat /*format*/,
- bool hasNonReachableChildren)
+ bool hasNonReachableChildren,
+ bool reNumber)
{
const char *labCol =
m_url.isEmpty() ? "grey75" : // non link
(
(hasNonReachableChildren) ? "red" : "black"
);
- t << " Node" << m_number << " [label=\"";
+ t << " Node" << reNumberNode(m_number,reNumber) << " [label=\"";
if (Config_getBool("UML_LOOK") && (gt==Inheritance || gt==Collaboration))
{
@@ -567,13 +610,14 @@ void DotNode::writeArrow(QTextStream &t,
DotNode *cn,
EdgeInfo *ei,
bool topDown,
- bool pointBack
+ bool pointBack,
+ bool reNumber
)
{
t << " Node";
- if (topDown) t << cn->number(); else t << m_number;
+ if (topDown) t << reNumberNode(cn->number(),reNumber); else t << reNumberNode(m_number,reNumber);
t << " -> Node";
- if (topDown) t << m_number; else t << cn->number();
+ if (topDown) t << reNumberNode(m_number,reNumber); else t << reNumberNode(cn->number(),reNumber);
t << " [";
if (pointBack) t << "dir=back,";
t << "color=\"" << edgeColorMap[ei->m_color]
@@ -603,7 +647,8 @@ void DotNode::write(QTextStream &t,
bool topDown,
bool toChildren,
int distance,
- bool backArrows
+ bool backArrows,
+ bool reNumber
)
{
//printf("DotNode::write(%d) name=%s this=%p written=%d\n",distance,m_label.data(),this,m_written);
@@ -620,7 +665,7 @@ void DotNode::write(QTextStream &t,
if (cn->m_distance>distance) hasNonReachableChildren=TRUE;
}
}
- writeBox(t,gt,format,hasNonReachableChildren);
+ writeBox(t,gt,format,hasNonReachableChildren,reNumber);
m_written=TRUE;
if (nl)
{
@@ -634,9 +679,9 @@ void DotNode::write(QTextStream &t,
if (cn->m_distance<=distance)
{
//printf("write arrow %s%s%s\n",label().data(),backArrows?"<-":"->",cn->label().data());
- writeArrow(t,gt,format,cn,dnli2.current(),topDown,backArrows);
+ writeArrow(t,gt,format,cn,dnli2.current(),topDown,backArrows,reNumber);
}
- cn->write(t,gt,format,topDown,toChildren,distance,backArrows);
+ cn->write(t,gt,format,topDown,toChildren,distance,backArrows,reNumber);
}
}
else // render parents
@@ -654,10 +699,11 @@ void DotNode::write(QTextStream &t,
pn,
pn->m_edgeInfo->at(pn->m_children->findRef(this)),
FALSE,
- backArrows
+ backArrows,
+ reNumber
);
}
- pn->write(t,gt,format,TRUE,FALSE,distance,backArrows);
+ pn->write(t,gt,format,TRUE,FALSE,distance,backArrows,reNumber);
}
}
}
@@ -946,9 +992,10 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
{
if (node->m_subgraphId==n->m_subgraphId)
{
- node->write(md5stream,DotNode::Hierarchy,BITMAP,FALSE,TRUE,1000,TRUE);
+ node->write(md5stream,DotNode::Hierarchy,BITMAP,FALSE,TRUE,1000,TRUE,TRUE);
}
}
+ resetReNumbering();
uchar md5_sig[16];
QCString sigStr(33);
MD5Buffer((const unsigned char *)buf.ascii(),buf.length(),md5_sig);
@@ -974,11 +1021,12 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
{
if (node->m_subgraphId==n->m_subgraphId)
{
- node->write(t,DotNode::Hierarchy,BITMAP,FALSE,TRUE,1000,TRUE);
+ node->write(t,DotNode::Hierarchy,BITMAP,FALSE,TRUE,1000,TRUE,TRUE);
}
}
writeGraphFooter(t);
f.close();
+ resetReNumbering();
QCString dotArgs(maxCmdLine);
dotArgs.sprintf("\"%s\" -T%s -o \"%s\" -Timap -o \"%s\"",
@@ -1407,7 +1455,8 @@ void writeDotGraph(DotNode *root,
bool lrRank,
bool renderParents,
int distance,
- bool backArrows
+ bool backArrows,
+ bool reNumber
)
{
// generate the graph description for dot
@@ -1423,7 +1472,7 @@ void writeDotGraph(DotNode *root,
t << " rankdir=LR;" << endl;
}
root->clearWriteFlag();
- root->write(t,gt,format,gt!=DotNode::CallGraph,TRUE,distance,backArrows);
+ root->write(t,gt,format,gt!=DotNode::CallGraph,TRUE,distance,backArrows,reNumber);
if (renderParents && root->m_parents)
{
//printf("rendering parents!\n");
@@ -1439,10 +1488,11 @@ void writeDotGraph(DotNode *root,
pn,
pn->m_edgeInfo->at(pn->m_children->findRef(root)),
FALSE,
- backArrows
+ backArrows,
+ reNumber
);
}
- pn->write(t,gt,format,TRUE,FALSE,distance,backArrows);
+ pn->write(t,gt,format,TRUE,FALSE,distance,backArrows,reNumber);
}
}
writeGraphFooter(t);
@@ -1462,6 +1512,8 @@ QCString computeMd5Signature(DotNode *root,
bool backArrows
)
{
+ bool reNumber=TRUE;
+
//printf("computeMd5Signature\n");
QString buf;
QTextStream md5stream(&buf,IO_WriteOnly);
@@ -1470,7 +1522,7 @@ QCString computeMd5Signature(DotNode *root,
md5stream << "rankdir=LR;" << endl;
}
root->clearWriteFlag();
- root->write(md5stream,gt,format,gt!=DotNode::CallGraph,TRUE,distance,backArrows);
+ root->write(md5stream,gt,format,gt!=DotNode::CallGraph,TRUE,distance,backArrows,reNumber);
if (renderParents && root->m_parents)
{
QListIterator<DotNode> dnli(*root->m_parents);
@@ -1485,16 +1537,21 @@ QCString computeMd5Signature(DotNode *root,
pn,
pn->m_edgeInfo->at(pn->m_children->findRef(root)),
FALSE,
- backArrows
+ backArrows,
+ reNumber
);
}
- pn->write(md5stream,gt,format,TRUE,FALSE,distance,backArrows);
+ pn->write(md5stream,gt,format,TRUE,FALSE,distance,backArrows,reNumber);
}
}
uchar md5_sig[16];
QCString sigStr(33);
MD5Buffer((const unsigned char *)buf.ascii(),buf.length(),md5_sig);
MD5SigToString(md5_sig,sigStr.data(),33);
+ if (reNumber)
+ {
+ resetReNumbering();
+ }
//printf("md5: %s | file: %s\n",sigStr,baseName.data());
return sigStr;
}
@@ -1510,6 +1567,7 @@ static bool findMaximalDotGraph(DotNode *root,
bool backArrows /*=TRUE*/
)
{
+ bool reNumber=TRUE;
int minDistance=1; // min distance that shows only direct children.
int curDistance; //=QMIN(2,maxDist); // current distance to try
int maxDistance=maxDist; // max distance that show whole graph
@@ -1526,7 +1584,7 @@ static bool findMaximalDotGraph(DotNode *root,
curDistance = (minDistance+maxDistance)/2;
writeDotGraph(root,gt,format,baseName,lrRank,renderParents,
- curDistance,backArrows);
+ curDistance,backArrows,reNumber);
QCString dotArgs(maxCmdLine);
// create annotated dot file
@@ -1576,8 +1634,13 @@ static bool findMaximalDotGraph(DotNode *root,
hasLRRank,
renderParents,
lastFit,
- backArrows
+ backArrows,
+ reNumber
);
+ if (reNumber)
+ {
+ resetReNumbering();
+ }
return TRUE;
}
diff --git a/src/dot.h b/src/dot.h
index 4571a68..c948ae4 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -65,7 +65,7 @@ class DotNode
void removeChild(DotNode *n);
void removeParent(DotNode *n);
void write(QTextStream &t,GraphType gt,GraphOutputFormat f,
- bool topDown,bool toChildren,int maxDistance,bool backArrows);
+ bool topDown,bool toChildren,int maxDistance,bool backArrows,bool reNumber);
int m_subgraphId;
void clearWriteFlag();
void writeXML(QTextStream &t,bool isClassGraph);
@@ -76,9 +76,9 @@ class DotNode
private:
void colorConnectedNodes(int curColor);
void writeBox(QTextStream &t,GraphType gt,GraphOutputFormat f,
- bool hasNonReachableChildren);
+ bool hasNonReachableChildren, bool reNumber=FALSE);
void writeArrow(QTextStream &t,GraphType gt,GraphOutputFormat f,DotNode *cn,
- EdgeInfo *ei,bool topDown, bool pointBack=TRUE);
+ EdgeInfo *ei,bool topDown, bool pointBack=TRUE, bool reNumber=FALSE);
const DotNode *findDocNode() const; // only works for acyclic graphs!
int m_number;
QCString m_label; //!< label text
@@ -102,7 +102,7 @@ class DotNode
DotNode *root, GraphType gt,
GraphOutputFormat f, const QCString &baseName,
bool lrRank, bool renderParents,
- int distance, bool backArrows
+ int distance, bool backArrows, bool reNumber
);
friend QCString computeMd5Signature(
DotNode *root, GraphType gt,
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 9449a10..15f10d9 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -810,9 +810,9 @@ static void addClassToContext(Entry *root)
}
}
- // if the class is not in a namespace then we insert
- // it in the file definition
- if (!found && fd && (root->section & Entry::COMPOUND_MASK))
+ // add the class to the file (we do this even if we have already inserted
+ // it into the namespace)
+ if (fd && (root->section & Entry::COMPOUND_MASK))
{
//printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n",
// cd->name().data(),
@@ -1677,14 +1677,13 @@ static MemberDef *addVariableToFile(
nd->insertMember(md);
md->setNamespace(nd);
}
- else
+
+ // add member to the file (we do this even if we have already inserted
+ // it into the namespace.
+ if (fd)
{
- // find file definition
- if (fd)
- {
- fd->insertMember(md);
- md->setFileDef(fd);
- }
+ fd->insertMember(md);
+ md->setFileDef(fd);
}
// add member definition to the list of globals
@@ -1739,6 +1738,8 @@ static bool isVarWithConstructor(Entry *root)
Definition *ctx = 0;
FileDef *fd = 0;
bool ambig;
+ int ti;
+
if (root->parent && root->parent->section&Entry::COMPOUND_MASK)
{ // inside a class
result=FALSE;
@@ -1760,6 +1761,10 @@ static bool isVarWithConstructor(Entry *root)
type = root->type;
if (type.left(6)=="const ") type=type.right(type.length()-6);
typeIsClass=getResolvedClass(ctx,fd,type)!=0;
+ if (!typeIsClass && (ti=type.find('<'))!=-1)
+ {
+ typeIsClass=getResolvedClass(ctx,fd,type.left(ti))!=0;
+ }
if (typeIsClass) // now we still have to check if the arguments are
// types or values. Since we do not have complete type info
// we need to rely on heuristics :-(
@@ -2453,9 +2458,11 @@ static void buildFunctionList(Entry *root)
nd->insertMember(md);
md->setNamespace(nd);
}
- else if (fd)
+
+ if (fd)
{
- // add member to the file
+ // add member to the file (we do this even if we have already
+ // inserted it into the namespace)
fd->insertMember(md);
md->setFileDef(fd);
}
@@ -5367,10 +5374,14 @@ static void findEnums(Entry *root)
nd->insertMember(md);
md->setNamespace(nd);
}
- else if (isGlobal)
+
+ // even if we have already added the enum to a namespace, we still
+ // also want to add it to other appropriate places such as file
+ // or class.
+ if (isGlobal)
{
md->setDefinition(name);
- if (fd==0 && root->tagInfo)
+ if (fd==0 && root->parent)
{
bool ambig;
QCString filePathName = root->parent->fileName;
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 189c102..dd1f6df 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -27,6 +27,9 @@
#include "message.h"
#include "config.h"
+#define PREFRAG_START "<div class=\"fragment\"><pre>"
+#define PREFRAG_END "</pre></div"
+
static QString htmlAttribsToString(const HtmlAttribList &attribs)
{
QString result;
@@ -189,14 +192,14 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
switch(s->type())
{
case DocVerbatim::Code: // fall though
- m_t << "<pre><div class=\"fragment\">";
+ m_t << PREFRAG_START;
parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile());
- m_t << "</div></pre>";
+ m_t << PREFRAG_END;
break;
case DocVerbatim::Verbatim:
- m_t << "<pre><div class=\"fragment\">";
+ m_t << PREFRAG_START;
filter(s->text());
- m_t << "</div></pre>";
+ m_t << PREFRAG_END;
break;
case DocVerbatim::HtmlOnly:
m_t << s->text();
@@ -246,17 +249,17 @@ void HtmlDocVisitor::visit(DocInclude *inc)
switch(inc->type())
{
case DocInclude::Include:
- m_t << "<pre><div class=\"fragment\">";
+ m_t << PREFRAG_START;
parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile());
- m_t << "</div></pre>";
+ m_t << PREFRAG_END;
break;
case DocInclude::IncWithLines:
{
- m_t << "<pre><div class=\"fragment\">";
+ m_t << PREFRAG_START;
QFileInfo cfi( inc->file() );
FileDef fd( cfi.dirPath(), cfi.fileName() );
parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile(), &fd);
- m_t << "</div></pre>";
+ m_t << PREFRAG_END;
}
break;
case DocInclude::DontInclude:
@@ -265,9 +268,9 @@ void HtmlDocVisitor::visit(DocInclude *inc)
m_t << inc->text();
break;
case DocInclude::VerbInclude:
- m_t << "<pre><div class=\"fragment\">";
+ m_t << PREFRAG_START;
filter(inc->text());
- m_t << "</div></pre>";
+ m_t << PREFRAG_END;
break;
}
}
@@ -278,7 +281,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
// op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst())
{
- if (!m_hide) m_t << "<pre><div class=\"fragment\">";
+ if (!m_hide) m_t << PREFRAG_START;
pushEnabled();
m_hide=TRUE;
}
@@ -292,7 +295,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
if (op->isLast())
{
popEnabled();
- if (!m_hide) m_t << "</div></pre>";
+ if (!m_hide) m_t << PREFRAG_END;
}
else
{
diff --git a/src/scanner.l b/src/scanner.l
index 08c116c..16bcd73 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -5500,12 +5500,23 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
<Doc>"*/" {
checkDocs();
- current->doc += "\n\n";
//printf("End of docs at line %d: %s\n",yyLineNr,current->doc.data());
- if (lastDocContext==SkipCurly && Config_getBool("HIDE_IN_BODY_DOCS"))
+ if (lastDocContext==SkipCurly)
{
+ if (!Config_getBool("HIDE_IN_BODY_DOCS"))
+ {
+ if (!previous->doc.isEmpty())
+ {
+ previous->doc+="<p>";
+ }
+ previous->doc += current->doc;
+ }
current->doc.resize(0);
}
+ else
+ {
+ current->doc += "\n\n";
+ }
if (current->section==Entry::GROUPDOC_SEC)
{
current_root->addSubEntry(current);
diff --git a/src/translator_adapter.h b/src/translator_adapter.h
index ed33d4a..bf30e2c 100644
--- a/src/translator_adapter.h
+++ b/src/translator_adapter.h
@@ -352,19 +352,4 @@ class TranslatorAdapter_1_2_2 : public TranslatorAdapter_1_2_4
{ return english.trPropertyDocumentation(); }
};
-/*! \brief Translator adapter class for release 1.2.1
- *
- * Translator adapter for dealing with translator changes since
- * release 1.2.1
- */
-class TranslatorAdapter_1_2_1 : public TranslatorAdapter_1_2_2
-{
- public:
- virtual QCString updateNeededMessage()
- { return createUpdateNeededMessage(idLanguage(),"release 1.2.1"); }
-
- virtual QCString trDCOPMethods()
- { return english.trDCOPMethods(); }
-};
-
#endif
diff --git a/src/translator_cz.h b/src/translator_cz.h
index 1280e5c..b7f8e7a 100644
--- a/src/translator_cz.h
+++ b/src/translator_cz.h
@@ -18,7 +18,7 @@
#ifndef TRANSLATOR_CZ_H
#define TRANSLATOR_CZ_H
-// $Id$
+//
//
// The first translation from English to Czech was started by
// Vlastimil Havran (1999--2000). The prototype version of Czech strings
@@ -129,6 +129,7 @@
// 2003/08/13 - Four new methods "since 1.3.3" implemented.
// 2004/02/26 - trLegendDocs() updated.
// 2004/02/27 - Text inside the trCallGraph() corrected.
+// 2004/06/16 - The new method "since 1.3.8" implemented.
// Todo
// ----
@@ -148,7 +149,7 @@
// Windows version. The version which does not call the function is
// probably slightly faster.
-class TranslatorCzech : public TranslatorAdapter_1_3_8
+class TranslatorCzech : public Translator
{
private:
/*! The decode() inline assumes the source written in the
@@ -1660,6 +1661,18 @@ class TranslatorCzech : public TranslatorAdapter_1_3_8
{
return decode("Nalezená slova:");
}
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ return decode("Zdrojový soubor ") + filename;
+ }
+
};
#endif // TRANSLATOR_CZ_H
diff --git a/src/translator_es.h b/src/translator_es.h
index 9aae1fa..06bb493 100644
--- a/src/translator_es.h
+++ b/src/translator_es.h
@@ -25,7 +25,7 @@
#ifndef TRANSLATOR_ES_H
#define TRANSLATOR_ES_H
-class TranslatorSpanish : public TranslatorAdapter_1_3_3
+class TranslatorSpanish : public TranslatorAdapter_1_3_8
{
public:
virtual QCString idLanguage()
diff --git a/src/translator_it.h b/src/translator_it.h
index 545e734..a94f54e 100644
--- a/src/translator_it.h
+++ b/src/translator_it.h
@@ -19,6 +19,7 @@
*
* Revision history
*
+ * 2004/06: translated new items used since version 1.3.8
* 2003/11: translated new items used since version 1.3.3
* 2003/06: translated new items used since version 1.3.1
* 2003/04: translated new items used since version 1.3
@@ -70,7 +71,7 @@
#ifndef TRANSLATOR_IT_H
#define TRANSLATOR_IT_H
-class TranslatorItalian : public TranslatorAdapter_1_3_8
+class TranslatorItalian : public Translator
{
public:
@@ -1504,6 +1505,17 @@ class TranslatorItalian : public TranslatorAdapter_1_3_8
return "Corrispondenze:";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ return " File sorgente " + filename ;
+ }
+
};
#endif
diff --git a/src/translator_nl.h b/src/translator_nl.h
index 68a5142..11d5ddc 100644
--- a/src/translator_nl.h
+++ b/src/translator_nl.h
@@ -18,7 +18,7 @@
#ifndef TRANSLATOR_NL_H
#define TRANSLATOR_NL_H
-class TranslatorDutch : public TranslatorAdapter_1_3_8
+class TranslatorDutch : public Translator
{
public:
QCString idLanguage()
@@ -1143,6 +1143,17 @@ class TranslatorDutch : public TranslatorAdapter_1_3_8
return "Gevonden:";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ return filename + " Bron Bestand";
+ }
+
};
diff --git a/src/util.cpp b/src/util.cpp
index 1f7bef8..9b89748 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -21,6 +21,8 @@
#include <windows.h>
#endif
+#include <md5.h>
+
#include "qtbc.h"
#include <qregexp.h>
#include <qfileinfo.h>
@@ -60,6 +62,19 @@ extern char **environ;
//------------------------------------------------------------------------
+// selects one of the name to sub-dir mapping algorithms that is used
+// to select a sub directory when CREATE_SUBDIRS is set to YES.
+
+#define ALGO_COUNT 1
+#define ALGO_CRC16 2
+#define ALGO_MD5 3
+
+//#define MAP_ALGO ALGO_COUNT
+//#define MAP_ALGO ALGO_CRC16
+#define MAP_ALGO ALGO_MD5
+
+//------------------------------------------------------------------------
+
struct LookupInfo
{
LookupInfo(ClassDef *cd=0,MemberDef *td=0,QCString ts="")
@@ -326,24 +341,6 @@ QCString replaceAnonymousScopes(const QCString &s)
// strip annonymous left hand side part of the scope
QCString stripAnonymousNamespaceScope(const QCString &s)
{
-#if 0
- int oi=0,i=0,p=0;
- p=s.find('@');
- if (p==-1) return s;
- while (s.at(p)=='@' && (i=s.find("::@",p))!=-1 &&
- Doxygen::namespaceDict[s.left(i)]!=0) { oi=i; p=i+2; }
- if (oi==0)
- {
- //printf("stripAnonymousNamespaceScope(`%s')=`%s'\n",s.data(),s.data());
- return s;
- }
- else
- {
- //printf("stripAnonymousNamespaceScope(`%s')=`%s'\n",s.data(),s.right(s.length()-oi-2).data());
- return s.right(s.length()-oi-2);
- }
-#endif
-
int i,p=0,l;
QCString newScope;
while ((i=getScopeFragment(s,p,&l))!=-1)
@@ -3639,6 +3636,11 @@ QCString convertNameToFile(const char *name,bool allowDots)
}
if (createSubdirs)
{
+ int l1Dir=0,l2Dir=0;
+
+#if MAP_ALGO==ALGO_COUNT
+ // old algorithm, has the problem that after regeneration the
+ // output can be located in a different dir.
if (Doxygen::htmlDirMap==0)
{
Doxygen::htmlDirMap=new QDict<int>(100003);
@@ -3646,20 +3648,31 @@ QCString convertNameToFile(const char *name,bool allowDots)
}
static int curDirNum=0;
int *dirNum = Doxygen::htmlDirMap->find(result);
- int l1Dir=0,l2Dir=0;
if (dirNum==0) // new name
{
Doxygen::htmlDirMap->insert(result,new int(curDirNum));
- l1Dir = (curDirNum)%10;
- l2Dir = ((curDirNum)/10)%10;
+ l1Dir = (curDirNum)&0xf; // bits 0-3
+ l2Dir = (curDirNum>>4)&0xff; // bits 4-11
curDirNum++;
}
else // existing name
{
- l1Dir = (*dirNum)%10;
- l2Dir = ((*dirNum)/10)%10;
- }
- result.prepend(QCString().sprintf("d%d/d%d/",l1Dir,l2Dir));
+ l1Dir = (*dirNum)&0xf; // bits 0-3
+ l2Dir = ((*dirNum)>>4)&0xff; // bits 4-11
+ }
+#elif MAP_ALGO==ALGO_CRC16
+ // second algorithm based on CRC-16 checksum
+ int dirNum = qChecksum(result,result.length());
+ l1Dir = dirNum&0xf;
+ l2Dir = (dirNum>>4)&0xff;
+#elif MAP_ALGO==ALGO_MD5
+ // third algorithm based on MD5 hash
+ uchar md5_sig[16];
+ MD5Buffer((const unsigned char *)result.data(),result.length(),md5_sig);
+ l1Dir = md5_sig[14]&0xf;
+ l2Dir = md5_sig[15];
+#endif
+ result.prepend(QCString().sprintf("d%x/d%02x/",l1Dir,l2Dir));
}
return result;
}
@@ -3690,14 +3703,14 @@ void createSubDirs(QDir &d)
{
if (Config_getBool("CREATE_SUBDIRS"))
{
- // create 100 subdirectories
+ // create 4096 subdirectories
int l1,l2;
- for (l1=0;l1<10;l1++)
+ for (l1=0;l1<16;l1++)
{
- d.mkdir(QString().sprintf("d%d",l1));
- for (l2=0;l2<10;l2++)
+ d.mkdir(QString().sprintf("d%x",l1));
+ for (l2=0;l2<256;l2++)
{
- d.mkdir(QString().sprintf("d%d/d%d",l1,l2));
+ d.mkdir(QString().sprintf("d%x/d%02x",l1,l2));
}
}
}
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index a1caf10..7ad162d 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1557,6 +1557,7 @@ void generateXML()
}
}
QDir xmlDir(outputDirectory);
+ createSubDirs(xmlDir);
QCString fileName=outputDirectory+"/index.xsd";
QFile f(fileName);
if (!f.open(IO_WriteOnly))