diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2003-11-03 18:04:43 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2003-11-03 18:04:43 (GMT) |
commit | a2a1e97fd2b0e3045482aa46978ac2d0ae1c6e11 (patch) | |
tree | 3d4fa775ba4ee12135f2ca20f59e2cb07f3efdf1 /src | |
parent | 4c9ea88d11a7a5b2293d2f3c63e06a32dd010850 (diff) | |
download | Doxygen-a2a1e97fd2b0e3045482aa46978ac2d0ae1c6e11.zip Doxygen-a2a1e97fd2b0e3045482aa46978ac2d0ae1c6e11.tar.gz Doxygen-a2a1e97fd2b0e3045482aa46978ac2d0ae1c6e11.tar.bz2 |
Release-1.3.4-20031103
Diffstat (limited to 'src')
-rw-r--r-- | src/compound.xsd | 6 | ||||
-rw-r--r-- | src/compound_xsd.h | 6 | ||||
-rw-r--r-- | src/config.l | 4 | ||||
-rw-r--r-- | src/docparser.cpp | 1 | ||||
-rw-r--r-- | src/dot.cpp | 426 | ||||
-rw-r--r-- | src/doxygen.cpp | 4 | ||||
-rw-r--r-- | src/ftvhelp.cpp | 3 | ||||
-rw-r--r-- | src/htmlgen.cpp | 3 | ||||
-rw-r--r-- | src/latexgen.cpp | 3 | ||||
-rw-r--r-- | src/memberdef.cpp | 2 | ||||
-rw-r--r-- | src/memberlist.cpp | 4 | ||||
-rw-r--r-- | src/pngenc.cpp | 3 | ||||
-rw-r--r-- | src/scanner.l | 27 | ||||
-rw-r--r-- | src/util.cpp | 25 | ||||
-rw-r--r-- | src/xmlgen.cpp | 5 |
15 files changed, 307 insertions, 215 deletions
diff --git a/src/compound.xsd b/src/compound.xsd index f445278..fa1ea92 100644 --- a/src/compound.xsd +++ b/src/compound.xsd @@ -93,6 +93,7 @@ <xsd:complexType name="memberdefType"> <xsd:sequence> + <xsd:element name="templateparamlist" type="templateparamlistType" minOccurs="0" /> <xsd:element name="type" type="linkedTextType" minOccurs="0" /> <xsd:element name="definition" minOccurs="0" /> <xsd:element name="argsstring" minOccurs="0" /> @@ -632,6 +633,11 @@ <xsd:enumeration value="protected-slot" /> <xsd:enumeration value="protected-static-func" /> <xsd:enumeration value="protected-static-attrib" /> + <xsd:enumeration value="package-type" /> + <xsd:enumeration value="package-func" /> + <xsd:enumeration value="package-attrib" /> + <xsd:enumeration value="package-static-func" /> + <xsd:enumeration value="package-static-attrib" /> <xsd:enumeration value="private-type" /> <xsd:enumeration value="private-func" /> <xsd:enumeration value="private-attrib" /> diff --git a/src/compound_xsd.h b/src/compound_xsd.h index 085e0a8..bef2c61 100644 --- a/src/compound_xsd.h +++ b/src/compound_xsd.h @@ -93,6 +93,7 @@ "\n" " <xsd:complexType name=\"memberdefType\">\n" " <xsd:sequence>\n" +" <xsd:element name=\"templateparamlist\" type=\"templateparamlistType\" minOccurs=\"0\" />\n" " <xsd:element name=\"type\" type=\"linkedTextType\" minOccurs=\"0\" />\n" " <xsd:element name=\"definition\" minOccurs=\"0\" />\n" " <xsd:element name=\"argsstring\" minOccurs=\"0\" />\n" @@ -632,6 +633,11 @@ " <xsd:enumeration value=\"protected-slot\" />\n" " <xsd:enumeration value=\"protected-static-func\" />\n" " <xsd:enumeration value=\"protected-static-attrib\" />\n" +" <xsd:enumeration value=\"package-type\" />\n" +" <xsd:enumeration value=\"package-func\" />\n" +" <xsd:enumeration value=\"package-attrib\" />\n" +" <xsd:enumeration value=\"package-static-func\" />\n" +" <xsd:enumeration value=\"package-static-attrib\" />\n" " <xsd:enumeration value=\"private-type\" />\n" " <xsd:enumeration value=\"private-func\" />\n" " <xsd:enumeration value=\"private-attrib\" />\n" diff --git a/src/config.l b/src/config.l index 739f5f1..594cbc2 100644 --- a/src/config.l +++ b/src/config.l @@ -1979,7 +1979,9 @@ void Config::create() "The HTML_STYLESHEET tag can be used to specify a user-defined cascading \n" "style sheet that is used by each HTML page. It can be used to \n" "fine-tune the look of the HTML output. If the tag is left blank doxygen \n" - "will generate a default style sheet \n" + "will generate a default style sheet. Note that doxygen will try to copy \n" + "the style sheet file to the HTML output directory, so don't put your own \n" + "stylesheet in the HTML output directory as well, or it will be erased! \n" ); cs->setWidgetType(ConfigString::File); cs->addDependency("GENERATE_HTML"); diff --git a/src/docparser.cpp b/src/docparser.cpp index c324dc0..1ee90f5 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -701,6 +701,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) QString name = linkToText(g_token->name,TRUE); if (resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member)) { + //printf("resolveRef %s = %p (linkable?=%d)\n",g_token->name.data(),member,member->isLinkable()); if (member) // member link { children.append(new diff --git a/src/dot.cpp b/src/dot.cpp index 1b506b1..efaf077 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -295,6 +295,36 @@ static void checkDotResult(const QCString &imgName) } } +/*! Checks if a file "baseName".md5 exists. If so the contents + * are compared with \a md5. If equal FALSE is returned. If the .md5 + * file does not exist or its contents are not equal to \a md5, + * a new .md5 is generated with the \a md5 string as contents. + */ +static bool checkAndUpdateMd5Signature(const QCString &baseName,const QCString &md5) +{ + QFile f(baseName+".md5"); + if (f.open(IO_ReadOnly)) + { + // read checksum + QCString md5stored(33); + int bytesRead=f.readBlock(md5stored.data(),32); + // compare checksum + if (bytesRead==32 && md5==md5stored) + { + // bail out if equal + return FALSE; + } + } + f.close(); + // create checksum file + if (f.open(IO_WriteOnly)) + { + f.writeBlock(md5.data(),32); + f.close(); + } + return TRUE; +} + //-------------------------------------------------------------------- class DotNodeList : public QList<DotNode> @@ -880,6 +910,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) QDir::setCurrent(d.absPath()); QDir thisDir; + // put each connected subgraph of the hierarchy in a row of the HTML output out << "<table border=0 cellspacing=10 cellpadding=0>" << endl; QListIterator<DotNode> dnli(*m_rootSubgraphs); @@ -891,52 +922,75 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); baseName.sprintf("inherit_graph_%d",count++); baseName = convertNameToFile(baseName); - QCString dotName=baseName+".dot"; QCString imgName=baseName+"."+ imgExt; QCString mapName=baseName+".map"; - - QFile f(dotName); - if (!f.open(IO_WriteOnly)) return; - QTextStream t(&f); - writeGraphHeader(t); - t << " rankdir=LR;" << endl; QListIterator<DotNode> dnli2(*m_rootNodes); DotNode *node; - for (;(node=dnli2.current());++dnli2) + + // compute md5 checksum of the graph were are about to generate + QString buf; + QTextStream md5stream(&buf,IO_WriteOnly); + for (dnli2.toFirst();(node=dnli2.current());++dnli2) { if (node->m_subgraphId==n->m_subgraphId) - node->write(t,DotNode::Hierarchy,BITMAP,FALSE,TRUE,1000,TRUE); + { + node->clearWriteFlag(); + node->write(md5stream,DotNode::Hierarchy,BITMAP,FALSE,TRUE,1000,TRUE); + } } - writeGraphFooter(t); - f.close(); + char md5_sig[16]; + QCString sigStr(33); + md5_buffer(buf.ascii(),buf.length(),md5_sig); + md5_sig_to_string(md5_sig,sigStr.data(),33); + if (checkAndUpdateMd5Signature(baseName,sigStr)) + { + // image was new or has changed + QCString dotName=baseName+".dot"; + QFile f(dotName); + if (!f.open(IO_WriteOnly)) return; + QTextStream t(&f); + writeGraphHeader(t); + t << " rankdir=LR;" << endl; + for (dnli2.toFirst();(node=dnli2.current());++dnli2) + { + if (node->m_subgraphId==n->m_subgraphId) + { + node->clearWriteFlag(); + node->write(t,DotNode::Hierarchy,BITMAP,FALSE,TRUE,1000,TRUE); + } + } + writeGraphFooter(t); + f.close(); - QCString dotArgs(maxCmdLine); - dotArgs.sprintf("-T%s \"%s\" -o \"%s\"", - imgExt.data(), dotName.data(),imgName.data()); - //printf("Running: dot -T%s %s -o %s\n",imgExt.data(),dotName.data(),imgName.data()); - if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - { - err("Problems running dot. Check your installation!\n"); - out << "</table>" << endl; - return; - } - checkDotResult(imgName); - dotArgs.sprintf("-Timap \"%s\" -o \"%s\"",dotName.data(),mapName.data()); - //printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data()); - if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - { - err("Problems running dot. Check your installation!\n"); - out << "</table>" << endl; - return; + QCString dotArgs(maxCmdLine); + dotArgs.sprintf("-T%s \"%s\" -o \"%s\"", + imgExt.data(), dotName.data(),imgName.data()); + //printf("Running: dot -T%s %s -o %s\n",imgExt.data(),dotName.data(),imgName.data()); + if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) + { + err("Problems running dot. Check your installation!\n"); + out << "</table>" << endl; + return; + } + checkDotResult(imgName); + dotArgs.sprintf("-Timap \"%s\" -o \"%s\"",dotName.data(),mapName.data()); + //printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data()); + if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) + { + err("Problems running dot. Check your installation!\n"); + out << "</table>" << endl; + return; + } + if (Config_getBool("DOT_CLEANUP")) thisDir.remove(dotName); } + // write image and map in a table row QCString mapLabel = convertNameToFile(n->m_label); out << "<tr><td><img src=\"" << imgName << "\" border=\"0\" alt=\"\" usemap=\"#" << mapLabel << "_map\">" << endl; out << "<map name=\"" << mapLabel << "_map\">" << endl; convertMapFile(out,mapName); out << "</map></td></tr>" << endl; - if (Config_getBool("DOT_CLEANUP")) thisDir.remove(dotName); - thisDir.remove(mapName); + //thisDir.remove(mapName); } out << "</table>" << endl; @@ -1432,36 +1486,6 @@ QCString computeMd5Signature(DotNode *root, return sigStr; } -/*! Checks if a file "baseName".md5 exists. If so the contents - * are compared with \a md5. If equal FALSE is returned. If the .md5 - * file does not exist or its contents are not equal to \a md5, - * a new .md5 is generated with the \a md5 string as contents. - */ -static bool checkAndUpdateMd5Signature(const QCString &baseName,const QCString &md5) -{ - QFile f(baseName+".md5"); - if (f.open(IO_ReadOnly)) - { - // read checksum - QCString md5stored(33); - int bytesRead=f.readBlock(md5stored.data(),32); - // compare checksum - if (bytesRead==32 && md5==md5stored) - { - // bail out if equal - return FALSE; - } - } - f.close(); - // create checksum file - if (f.open(IO_WriteOnly)) - { - f.writeBlock(md5.data(),32); - f.close(); - } - return TRUE; -} - static bool findMaximalDotGraph(DotNode *root, int maxDist, const QCString &baseName, @@ -1606,14 +1630,13 @@ QCString DotClassGraph::writeGraph(QTextStream &out, baseName = convertNameToFile(diskName()); + QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); if (findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance),baseName, thisDir,m_graphType,format,!isTBRank,m_graphType==DotNode::Inheritance)) { - if (format==BITMAP) // run dot to create a bitmap image { QCString dotArgs(maxCmdLine); - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString imgName = baseName+"."+imgExt; dotArgs.sprintf("-T%s \"%s.dot\" -o \"%s\"", imgExt.data(),baseName.data(),imgName.data()); @@ -1634,36 +1657,6 @@ QCString DotClassGraph::writeGraph(QTextStream &out, QDir::setCurrent(oldDir); return baseName; } - QCString mapLabel = convertNameToFile(m_startNode->m_label+"_"+mapName); - out << "<p><center><img src=\"" << baseName << "." - << imgExt << "\" border=\"0\" usemap=\"#" - << mapLabel << "\" alt=\""; - switch (m_graphType) - { - case DotNode::Collaboration: - out << "Collaboration graph"; - break; - //case Interface: - // out << "Interface dependency graph"; - // break; - case DotNode::Inheritance: - out << "Inheritance graph"; - break; - default: - ASSERT(0); - break; - } - out << "\"></center>" << endl; - QString tmpstr; - QTextOStream tmpout(&tmpstr); - convertMapFile(tmpout,baseName+".map"); - if (!tmpstr.isEmpty()) - { - out << "<map name=\"" << mapLabel << "\">" << endl; - out << tmpstr; - out << "</map>" << endl; - } - thisDir.remove(baseName+".map"); } } else if (format==EPS) // run dot to create a .eps image @@ -1676,13 +1669,6 @@ QCString DotClassGraph::writeGraph(QTextStream &out, QDir::setCurrent(oldDir); return baseName; } - int width,height; - if (!readBoundingBoxEPS(baseName+".eps",&width,&height)) - { - err("Error: Could not extract bounding box from .eps!\n"); - QDir::setCurrent(oldDir); - return baseName; - } if (Config_getBool("USE_PDFLATEX")) { QCString epstopdfArgs(maxCmdLine); @@ -1695,8 +1681,51 @@ QCString DotClassGraph::writeGraph(QTextStream &out, return baseName; } } - int maxWidth = 420; /* approx. page width in points */ + } + if (Config_getBool("DOT_CLEANUP")) thisDir.remove(baseName+".dot"); + } + + if (format==BITMAP) // run dot to create a bitmap image + { + QCString mapLabel = convertNameToFile(m_startNode->m_label+"_"+mapName); + out << "<p><center><img src=\"" << baseName << "." + << imgExt << "\" border=\"0\" usemap=\"#" + << mapLabel << "\" alt=\""; + switch (m_graphType) + { + case DotNode::Collaboration: + out << "Collaboration graph"; + break; + case DotNode::Inheritance: + out << "Inheritance graph"; + break; + default: + ASSERT(0); + break; + } + out << "\"></center>" << endl; + QString tmpstr; + QTextOStream tmpout(&tmpstr); + convertMapFile(tmpout,baseName+".map"); + if (!tmpstr.isEmpty()) + { + out << "<map name=\"" << mapLabel << "\">" << endl; + out << tmpstr; + out << "</map>" << endl; + } + //thisDir.remove(baseName+".map"); + } + else if (format==EPS) // run dot to create a .eps image + { + int width,height; + if (!readBoundingBoxEPS(baseName+".eps",&width,&height)) + { + err("Error: Could not extract bounding box from .eps!\n"); + QDir::setCurrent(oldDir); + return baseName; + } + int maxWidth = 420; /* approx. page width in points */ out << "\\begin{figure}[H]\n" "\\begin{center}\n" "\\leavevmode\n" @@ -1704,8 +1733,6 @@ QCString DotClassGraph::writeGraph(QTextStream &out, << "pt]{" << baseName << "}\n" "\\end{center}\n" "\\end{figure}\n"; - } - if (Config_getBool("DOT_CLEANUP")) thisDir.remove(baseName+".dot"); } QDir::setCurrent(oldDir); @@ -1850,6 +1877,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, baseName=convertNameToFile(baseName); QCString mapName=m_startNode->m_label.copy(); if (m_inverse) mapName+="dep"; + QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); if (findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance), baseName,thisDir,DotNode::Dependency,format, @@ -1860,7 +1888,6 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, { // run dot to create a bitmap image QCString dotArgs(maxCmdLine); - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString imgName=baseName+"."+imgExt; dotArgs.sprintf("-T%s \"%s.dot\" -o \"%s\"", imgExt.data(),baseName.data(),imgName.data()); @@ -1884,22 +1911,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, return baseName; } - out << "<p><center><img src=\"" << baseName << "." - << imgExt << "\" border=\"0\" usemap=\"#" - << mapName << "_map\" alt=\""; - if (m_inverse) out << "Included by dependency graph"; else out << "Include dependency graph"; - out << "\">"; - out << "</center>" << endl; - QString tmpstr; - QTextOStream tmpout(&tmpstr); - convertMapFile(tmpout,baseName+".map"); - if (!tmpstr.isEmpty()) - { - out << "<map name=\"" << mapName << "_map\">" << endl; - out << tmpstr; - out << "</map>" << endl; - } - thisDir.remove(baseName+".map"); + //thisDir.remove(baseName+".map"); } } else if (format==EPS) @@ -1914,13 +1926,6 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, QDir::setCurrent(oldDir); return baseName; } - int width,height; - if (!readBoundingBoxEPS(baseName+".eps",&width,&height)) - { - err("Error: Could not extract bounding box from .eps!\n"); - QDir::setCurrent(oldDir); - return baseName; - } if (Config_getBool("USE_PDFLATEX")) { QCString epstopdfArgs(maxCmdLine); @@ -1933,22 +1938,50 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, return baseName; } } - int maxWidth = 420; /* approx. page width in points */ - - out << "\\begin{figure}[H]\n" - "\\begin{center}\n" - "\\leavevmode\n" - //"\\setlength{\\epsfxsize}{" << QMIN(width/2,maxWidth) << "pt}\n" - //"\\epsfbox{" << baseName << ".eps}\n" - "\\includegraphics[width=" << QMIN(width/2,maxWidth) - << "pt]{" << baseName << "}\n" - "\\end{center}\n" - "\\end{figure}\n"; } if (Config_getBool("DOT_CLEANUP")) thisDir.remove(baseName+".dot"); } + if (format==BITMAP) + { + out << "<p><center><img src=\"" << baseName << "." + << imgExt << "\" border=\"0\" usemap=\"#" + << mapName << "_map\" alt=\""; + if (m_inverse) out << "Included by dependency graph"; else out << "Include dependency graph"; + out << "\">"; + out << "</center>" << endl; + QString tmpstr; + QTextOStream tmpout(&tmpstr); + convertMapFile(tmpout,baseName+".map"); + if (!tmpstr.isEmpty()) + { + out << "<map name=\"" << mapName << "_map\">" << endl; + out << tmpstr; + out << "</map>" << endl; + } + } + else if (format==EPS) + { + int width,height; + if (!readBoundingBoxEPS(baseName+".eps",&width,&height)) + { + err("Error: Could not extract bounding box from .eps!\n"); + QDir::setCurrent(oldDir); + return baseName; + } + + int maxWidth = 420; /* approx. page width in points */ + + out << "\\begin{figure}[H]\n" + "\\begin{center}\n" + "\\leavevmode\n" + "\\includegraphics[width=" << QMIN(width/2,maxWidth) + << "pt]{" << baseName << "}\n" + "\\end{center}\n" + "\\end{figure}\n"; + } + QDir::setCurrent(oldDir); return baseName; } @@ -2014,68 +2047,87 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, QCString baseName=m_diskName+"_cgraph"; //baseName=convertNameToFile(baseName); QCString mapName=baseName; + QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); - findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance), + if (findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance), baseName,thisDir,DotNode::CallGraph,format, - TRUE,FALSE,FALSE); - - if (format==BITMAP) + TRUE,FALSE,FALSE)) { - // run dot to create a bitmap image - QCString dotArgs(maxCmdLine); - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); - QCString imgName=baseName+"."+imgExt; - dotArgs.sprintf("-T%s \"%s.dot\" -o \"%s\"", - imgExt.data(),baseName.data(),imgName.data()); - if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) + if (format==BITMAP) { - err("Problems running dot. Check your installation!\n"); - QDir::setCurrent(oldDir); - return baseName; - } - checkDotResult(imgName); + // run dot to create a bitmap image + QCString dotArgs(maxCmdLine); + QCString imgName=baseName+"."+imgExt; + dotArgs.sprintf("-T%s \"%s.dot\" -o \"%s\"", + imgExt.data(),baseName.data(),imgName.data()); + if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) + { + err("Problems running dot. Check your installation!\n"); + QDir::setCurrent(oldDir); + return baseName; + } + checkDotResult(imgName); - if (generateImageMap) + if (generateImageMap) + { + // run dot again to create an image map + dotArgs.sprintf("-Timap \"%s.dot\" -o \"%s.map\"", + baseName.data(),baseName.data()); + if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) + { + err("Problems running dot. Check your installation!\n"); + QDir::setCurrent(oldDir); + return baseName; + } + } + } + else if (format==EPS) { - // run dot again to create an image map - dotArgs.sprintf("-Timap \"%s.dot\" -o \"%s.map\"", - baseName.data(),baseName.data()); + // run dot to create a .eps image + QCString dotArgs(maxCmdLine); + dotArgs.sprintf("-Tps \"%s.dot\" -o \"%s.eps\"", + baseName.data(),baseName.data()); if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) { err("Problems running dot. Check your installation!\n"); QDir::setCurrent(oldDir); return baseName; } - - out << "<p><center><img src=\"" << baseName << "." - << imgExt << "\" border=\"0\" usemap=\"#" - << mapName << "_map\" alt=\""; - out << "\">"; - out << "</center>" << endl; - QString tmpstr; - QTextOStream tmpout(&tmpstr); - convertMapFile(tmpout,baseName+".map"); - if (!tmpstr.isEmpty()) + if (Config_getBool("USE_PDFLATEX")) { - out << "<map name=\"" << mapName << "_map\">" << endl; - out << tmpstr; - out << "</map>" << endl; + QCString epstopdfArgs(maxCmdLine); + epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", + baseName.data(),baseName.data()); + if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0) + { + err("Error: Problems running epstopdf. Check your TeX installation!\n"); + QDir::setCurrent(oldDir); + return baseName; + } } - thisDir.remove(baseName+".map"); } } - else if (format==EPS) + + if (format==BITMAP) { - // run dot to create a .eps image - QCString dotArgs(maxCmdLine); - dotArgs.sprintf("-Tps \"%s.dot\" -o \"%s.eps\"", - baseName.data(),baseName.data()); - if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) + out << "<p><center><img src=\"" << baseName << "." + << imgExt << "\" border=\"0\" usemap=\"#" + << mapName << "_map\" alt=\""; + out << "\">"; + out << "</center>" << endl; + QString tmpstr; + QTextOStream tmpout(&tmpstr); + convertMapFile(tmpout,baseName+".map"); + if (!tmpstr.isEmpty()) { - err("Problems running dot. Check your installation!\n"); - QDir::setCurrent(oldDir); - return baseName; + out << "<map name=\"" << mapName << "_map\">" << endl; + out << tmpstr; + out << "</map>" << endl; } + //thisDir.remove(baseName+".map"); + } + else if (format==EPS) + { int width,height; if (!readBoundingBoxEPS(baseName+".eps",&width,&height)) { @@ -2083,18 +2135,6 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, QDir::setCurrent(oldDir); return baseName; } - if (Config_getBool("USE_PDFLATEX")) - { - QCString epstopdfArgs(maxCmdLine); - epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - baseName.data(),baseName.data()); - if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0) - { - err("Error: Problems running epstopdf. Check your TeX installation!\n"); - QDir::setCurrent(oldDir); - return baseName; - } - } int maxWidth = 420; /* approx. page width in points */ out << "\\begin{figure}[H]\n" diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 1165c51..8360acb 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -4037,7 +4037,7 @@ static void addMemberDocs(Entry *root, static ClassDef *findClassDefinition(FileDef *fd,NamespaceDef *nd, const char *scopeName) { - ClassDef *tcd = getClass(scopeName); + ClassDef *tcd = getResolvedClass(nd,fd,scopeName); if (tcd==0) // try using declaration { ClassSDict *cl = 0; @@ -4438,7 +4438,7 @@ static void findMember(Entry *root, } //printf("new scope=`%s'\n",scopeName.data()); - QCString tempScopeName=scopeName.copy(); + QCString tempScopeName=scopeName; ClassDef *cd=getClass(scopeName); if (cd) { diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index 939cbba..6704fb2 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -625,6 +625,9 @@ void FTVHelp::generateTreeView() else { QTextStream t(&f); +#if QT_VERSION >= 200 + t.setEncoding(QTextStream::Latin1); +#endif t << "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n"; t << " <head>\n"; t << " <meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=\"" diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 3a260a2..d247102 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1397,6 +1397,9 @@ void HtmlGenerator::writeSearchPage() if (f.open(IO_WriteOnly)) { QTextStream t(&f); +#if QT_VERSION >= 200 + t.setEncoding(QTextStream::Latin1); +#endif if (g_header.isEmpty()) { writeDefaultHeaderFile(t,"Search"); diff --git a/src/latexgen.cpp b/src/latexgen.cpp index e330e1e..273dd74 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -247,7 +247,8 @@ static void writeDefaultHeaderPart1(QTextStream &t) "\\usepackage{multicol}\n" "\\usepackage{float}\n" "\\usepackage{textcomp}\n" - "\\usepackage{alltt}\n"; + "\\usepackage{alltt}\n" + "\\usepackage{ae,aecompl,aeguill}\n"; if (Config_getBool("PDF_HYPERLINKS")) { t << "\\usepackage{times}" << endl; diff --git a/src/memberdef.cpp b/src/memberdef.cpp index f3f9156..3ce930d 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -522,7 +522,7 @@ QCString MemberDef::anchor() const bool MemberDef::isLinkableInProject() const { - //printf("MemberDef::isLinkableInProject()\n"); + //printf("MemberDef::isLinkableInProject(name=%s)\n",name().data()); if (m_templateMaster) { return m_templateMaster->isLinkableInProject(); diff --git a/src/memberlist.cpp b/src/memberlist.cpp index e943f17..e6da01e 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -243,7 +243,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, if (md->isDetailedSectionLinkable()) { ol.disableAllBut(OutputGenerator::Html); - ol.endEmphasis(); + //ol.endEmphasis(); ol.docify(" "); if (md->getGroupDef()!=0 && gd==0) // forward link to group { @@ -256,7 +256,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, } ol.parseText(theTranslator->trMore()); ol.endTextLink(); - ol.startEmphasis(); + //ol.startEmphasis(); ol.enableAll(); } ol.endMemberDescription(); diff --git a/src/pngenc.cpp b/src/pngenc.cpp index 5a52e2f..8578819 100644 --- a/src/pngenc.cpp +++ b/src/pngenc.cpp @@ -24,7 +24,8 @@ # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) #endif -#include <png.h> +#define ALL_STATIC +#include <../libpng/png.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/src/scanner.l b/src/scanner.l index d70ad39..98a568a 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -672,6 +672,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] %x EnumDocArg1 %x FuncPtr %x EndFuncPtr +%x FuncPtrInit %x FuncFunc %x FuncFuncEnd %x FuncFuncType @@ -2643,8 +2644,32 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] lastCPPContext = YY_START; BEGIN(SkipCPP); } -<FuncQual>"=" { // typically a initialized function pointer +<FuncQual>"=" { // typically an initialized function pointer current->args += *yytext; + BEGIN(FuncPtrInit); + } +<FuncPtrInit>[{;] { + unput(*yytext); + BEGIN(FuncQual); + } +<FuncPtrInit>\" { + current->args += *yytext; + pCopyQuotedString=¤t->args; + lastStringContext=FuncPtrInit; + BEGIN(CopyString); + } +<FuncPtrInit>{CHARLIT} { + current->args += yytext; + } +<FuncPtrInit>{ID} { + current->args += yytext; + } +<FuncPtrInit>. { + current->args += *yytext; + } +<FuncPtrInit>\n { + current->args += *yytext; + yyLineNr++; } <FuncQual>{ID} { // typically a K&R style C function if (checkForKnRstyleC()) diff --git a/src/util.cpp b/src/util.cpp index 4147bcd..4a0e1ab 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -17,7 +17,7 @@ #include <stdlib.h> #include <ctype.h> -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) #include <windows.h> #endif @@ -43,7 +43,7 @@ #include "reflist.h" #include "pagedef.h" -#ifndef _WIN32 +#if !defined(_WIN32) || defined(__CYGWIN__) #include <unistd.h> #include <stdlib.h> #include <sys/types.h> @@ -94,7 +94,7 @@ int iSystem(const char *command,const char *args,bool isBatchFile) { QTime time; time.start(); -#ifndef _WIN32 +#if !defined(_WIN32) || defined(__CYGWIN__) isBatchFile=isBatchFile; /*! taken from the system() manpage on my Linux box */ int pid,status=0; @@ -167,7 +167,7 @@ int iSystem(const char *command,const char *args,bool isBatchFile) } #endif // _OS_SOLARIS -#else +#else // Win32 specific if (isBatchFile) { QCString fullCmd = command; @@ -2697,6 +2697,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, } if (bmd) md=bmd; } + if (md && !md->isLinkable()) md=0; // ignore things we cannot link to if (md) // found a matching global member { fd=md->getFileDef(); @@ -2963,18 +2964,19 @@ bool generateRef(OutputDocInterface &od,const char *scName, if (resolveRef(scName,name,inSeeBlock,&compound,&md)) { - if (md) // link to member + if (md && md->isLinkable()) // link to member { od.writeObjectLink(md->getReference(), md->getOutputFileBase(), md->anchor(),linkText); // generate the page reference (for LaTeX) - if (md->isLinkableInProject()) + if (!md->isReference()) { writePageRef(od,md->getOutputFileBase(),md->anchor()); } + return TRUE; } - else // link to compound + else if (compound && compound->isLinkable()) // link to compound { if (rt==0 && compound->definitionType()==Definition::TypeGroup) { @@ -2991,14 +2993,11 @@ bool generateRef(OutputDocInterface &od,const char *scName, { writePageRef(od,compound->getOutputFileBase(),0); } + return TRUE; } - return TRUE; - } - else // no link possible - { - od.docify(linkText); - return FALSE; } + od.docify(linkText); + return FALSE; } bool resolveLink(/* in */ const char *scName, diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index ec3bc47..5c0c191 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1012,6 +1012,11 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) generateXMLSection(cd,ti,t,&cd->proSlots,"protected-slot"); generateXMLSection(cd,ti,t,&cd->proStaticMethods,"protected-static-func"); generateXMLSection(cd,ti,t,&cd->proStaticAttribs,"protected-static-attrib"); + generateXMLSection(cd,ti,t,&cd->pacTypes,"package-type"); + generateXMLSection(cd,ti,t,&cd->pacMethods,"package-func"); + generateXMLSection(cd,ti,t,&cd->pacAttribs,"package-attrib"); + generateXMLSection(cd,ti,t,&cd->pacStaticMethods,"package-static-func"); + generateXMLSection(cd,ti,t,&cd->pacStaticAttribs,"package-static-attrib"); generateXMLSection(cd,ti,t,&cd->priTypes,"private-type"); generateXMLSection(cd,ti,t,&cd->priMethods,"private-func"); generateXMLSection(cd,ti,t,&cd->priAttribs,"private-attrib"); |