diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2009-10-04 20:20:24 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2009-10-04 20:20:24 (GMT) |
commit | a62d9f8f1c2c97d454ff33bc1a4911d1362d9766 (patch) | |
tree | 36e6fdf77248708eaee0f1180b2ea526d1323c18 /src | |
parent | 0c8b6ca69f951ce8c94902764cf036d6a79e5102 (diff) | |
download | Doxygen-a62d9f8f1c2c97d454ff33bc1a4911d1362d9766.zip Doxygen-a62d9f8f1c2c97d454ff33bc1a4911d1362d9766.tar.gz Doxygen-a62d9f8f1c2c97d454ff33bc1a4911d1362d9766.tar.bz2 |
Release-1.6.1-20091004
Diffstat (limited to 'src')
-rw-r--r-- | src/bufstr.h | 4 | ||||
-rw-r--r-- | src/classdef.cpp | 4 | ||||
-rw-r--r-- | src/config.l | 20 | ||||
-rw-r--r-- | src/config.xml | 7 | ||||
-rw-r--r-- | src/configoptions.cpp | 9 | ||||
-rw-r--r-- | src/definition.cpp | 5 | ||||
-rw-r--r-- | src/dirdef.cpp | 5 | ||||
-rw-r--r-- | src/dot.cpp | 519 | ||||
-rw-r--r-- | src/dot.h | 4 | ||||
-rw-r--r-- | src/doxygen.cpp | 186 | ||||
-rw-r--r-- | src/filedef.cpp | 4 | ||||
-rw-r--r-- | src/formula.cpp | 6 | ||||
-rw-r--r-- | src/groupdef.cpp | 4 | ||||
-rw-r--r-- | src/htmlgen.cpp | 2 | ||||
-rw-r--r-- | src/latexgen.cpp | 53 | ||||
-rw-r--r-- | src/libdoxycfg.t | 3 | ||||
-rw-r--r-- | src/memberdef.cpp | 20 | ||||
-rw-r--r-- | src/membergroup.cpp | 8 | ||||
-rw-r--r-- | src/namespacedef.cpp | 4 | ||||
-rw-r--r-- | src/pagedef.cpp | 5 | ||||
-rw-r--r-- | src/pre.h | 3 | ||||
-rw-r--r-- | src/pre.l | 90 | ||||
-rw-r--r-- | src/scanner.l | 9 | ||||
-rw-r--r-- | src/translator_cz.h | 5 | ||||
-rw-r--r-- | src/translator_fr.h | 47 | ||||
-rw-r--r-- | src/translator_pl.h | 449 | ||||
-rw-r--r-- | src/util.cpp | 184 | ||||
-rw-r--r-- | src/util.h | 7 | ||||
-rw-r--r-- | src/vhdldocgen.cpp | 62 | ||||
-rw-r--r-- | src/vhdldocgen.h | 2 |
30 files changed, 937 insertions, 793 deletions
diff --git a/src/bufstr.h b/src/bufstr.h index 80da421..4ce1dae 100644 --- a/src/bufstr.h +++ b/src/bufstr.h @@ -69,6 +69,10 @@ class BufStr } m_buf = (char *)realloc(m_buf,m_size); } + int size() const + { + return m_size; + } char *data() const { return m_buf; diff --git a/src/classdef.cpp b/src/classdef.cpp index 55cc4f2..73bb09c 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -3089,10 +3089,12 @@ void ClassDef::addListReferences() { LockingPtr< QList<ListItemInfo> > xrefItems = xrefListItems(); addRefItem(xrefItems.pointer(), + qualifiedName(), fortranOpt?theTranslator->trType(TRUE,TRUE): theTranslator->trClass(TRUE,TRUE), getOutputFileBase(), - displayName() + displayName(), + 0 ); } if (m_impl->memberGroupSDict) diff --git a/src/config.l b/src/config.l index e433669..df07204 100644 --- a/src/config.l +++ b/src/config.l @@ -1395,26 +1395,6 @@ void Config::check() config_err("Warning: Specifying QCH_FILE requires QHG_LOCATION to be set.\n"); } - if (Config_getBool("HAVE_DOT")) - { - QCString curFontPath = Config_getString("DOT_FONTPATH"); - if (curFontPath.isEmpty()) - { - portable_getenv("DOTFONTPATH"); - QCString newFontPath = "."; - if (!curFontPath.isEmpty()) - { - newFontPath+=portable_pathListSeparator(); - newFontPath+=curFontPath; - } - portable_setenv("DOTFONTPATH",newFontPath); - } - else - { - portable_setenv("DOTFONTPATH",curFontPath); - } - } - if (Config_getBool("OPTIMIZE_OUTPUT_JAVA") && Config_getBool("INLINE_INFO")) { // don't show inline info for Java output, since Java has no inline diff --git a/src/config.xml b/src/config.xml index a2cb0af..8395f54 100644 --- a/src/config.xml +++ b/src/config.xml @@ -139,7 +139,7 @@ the path. The tag can be used to show relative paths in the file list. If left blank the directory from which doxygen is run is used as the path to strip. ' depends='FULL_PATH_NAMES'> - <value name='/Users/dimitri/doxygen/mail/1.5.7/doxywizard/'/> + <value name=''/> </option> <option type='list' id='STRIP_FROM_INC_PATH' format='string' docs=' The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of @@ -536,7 +536,7 @@ documented source files. You may enter file names like "myfile.cpp" or directories like "/usr/src/myproject". Separate the files or directories with spaces. '> - <value name='/Users/dimitri/doxygen/mail/1.5.7/doxywizard'/> + <value name=''/> </option> <option type='string' id='INPUT_ENCODING' format='string' docs=' This tag can be used to specify the character encoding of the source files @@ -933,6 +933,9 @@ put in front of it. If left blank `latex' will be used as the default path. <option type='string' id='LATEX_CMD_NAME' format='file' docs=' The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name. +Note that when enabling USE_PDFLATEX this option is only used for +generating bitmaps for formulas in the HTML output, but not in the +Makefile that is written to the output directory. ' defval='latex' depends='GENERATE_LATEX'/> <option type='string' id='MAKEINDEX_CMD_NAME' format='file' docs=' The MAKEINDEX_CMD_NAME tag can be used to specify the command name to diff --git a/src/configoptions.cpp b/src/configoptions.cpp index 2aad2bc..d96a48a 100644 --- a/src/configoptions.cpp +++ b/src/configoptions.cpp @@ -192,7 +192,7 @@ void addConfigOptions(Config *cfg) "If left blank the directory from which doxygen is run is used as the\n" "path to strip." ); - cl->addValue("/Users/dimitri/doxygen/mail/1.5.7/doxywizard/"); + cl->addValue(""); cl->addDependency("FULL_PATH_NAMES"); //---- cl = cfg->addList( @@ -767,7 +767,7 @@ void addConfigOptions(Config *cfg) "directories like \"/usr/src/myproject\". Separate the files or directories\n" "with spaces." ); - cl->addValue("/Users/dimitri/doxygen/mail/1.5.7/doxywizard"); + cl->addValue(""); cl->setWidgetType(ConfigList::FileAndDir); //---- cs = cfg->addString( @@ -1372,7 +1372,10 @@ void addConfigOptions(Config *cfg) cs = cfg->addString( "LATEX_CMD_NAME", "The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be\n" - "invoked. If left blank `latex' will be used as the default command name." + "invoked. If left blank `latex' will be used as the default command name.\n" + "Note that when enabling USE_PDFLATEX this option is only used for\n" + "generating bitmaps for formulas in the HTML output, but not in the\n" + "Makefile that is written to the output directory." ); cs->setDefaultValue("latex"); cs->setWidgetType(ConfigString::File); diff --git a/src/definition.cpp b/src/definition.cpp index 36c1f69..32e7d64 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -198,9 +198,10 @@ static bool matchExcludedSymbols(const char *name) void Definition::addToMap(const char *name,Definition *d) { + static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); QCString symbolName = name; int index=computeQualifiedIndex(symbolName); - if (index!=-1) symbolName=symbolName.mid(index+2); + if (!vhdlOpt && index!=-1) symbolName=symbolName.mid(index+2); if (!symbolName.isEmpty()) { //printf("******* adding symbol `%s' (%p)\n",symbolName.data(),d); @@ -1240,7 +1241,7 @@ void Definition::writePathFragment(OutputList &ol) const else { ol.writeString(" "); - ol.writeString("»"); + ol.writeString("»"); ol.writeString(" "); } } diff --git a/src/dirdef.cpp b/src/dirdef.cpp index 56f713c..1ca01b5 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -720,9 +720,11 @@ void DirRelation::writeDocumentation(OutputList &ol) ol.writeString("<table class=\"dirtab\">"); ol.writeString("<tr class=\"dirtab\">"); + // TODO: translate me! "File in %s" ol.writeString("<th class=\"dirtab\">File in "); m_src->writePathFragment(ol); ol.writeString("</th>"); + // TODO: translate me! "Includes file in %s" ol.writeString("<th class=\"dirtab\">Includes file in "); m_dst->dir()->writePathFragment(ol); ol.writeString("</th>"); @@ -844,7 +846,7 @@ void computeDirDependencies() #endif } - +#if 0 void writeDirDependencyGraph(const char *dirName) { QString path; @@ -889,6 +891,7 @@ void writeDirDependencyGraph(const char *dirName) } htmlPage.close(); } +#endif void generateDirDocs(OutputList &ol) { diff --git a/src/dot.cpp b/src/dot.cpp index 5014f93..8b30ad4 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -118,9 +118,9 @@ static void writeGraphFooter(QTextStream &t) * \param mapName the name of the map file. * \param relPath the relative path to the root of the output directory * (used in case CREATE_SUBDIRS is enabled). - * \param urlOnly if FALSE the url field in the map contains an external - * references followed by a $ and then the URL. - * \param context the context (file, class, or namespace) in which the + * \param urlOnly if FALSE the url field in the map contains an external + * references followed by a $ and then the URL. + * \param context the context (file, class, or namespace) in which the * map file was found * \returns TRUE if succesful. */ @@ -261,6 +261,35 @@ static void resetReNumbering() s_newNumber.resize(s_max_newNumber); } +static QCString g_dotFontPath; + +static void setDotFontPath(const char *path) +{ + ASSERT(g_dotFontPath.isEmpty()); + g_dotFontPath = portable_getenv("DOTFONTPATH"); + QCString newFontPath = Config_getString("DOT_FONTPATH"); + if (!newFontPath.isEmpty() && path) + { + newFontPath.prepend(path+portable_pathListSeparator()); + } + else if (newFontPath.isEmpty() && path) + { + newFontPath=path; + } + else + { + portable_unsetenv("DOTFONTPATH"); + return; + } + portable_setenv("DOTFONTPATH",newFontPath); +} + +static void unsetDotFontPath() +{ + portable_setenv("DOTFONTPATH",g_dotFontPath); + g_dotFontPath=""; +} + static bool readBoundingBoxEPS(const char *fileName,int *width,int *height) { QCString bb("%%PageBoundingBox:"); @@ -375,6 +404,12 @@ void DotRunner::addJob(const char *format,const char *output) m_jobs.append(new QCString(args)); } +void DotRunner::addPostProcessing(const char *cmd,const char *args) +{ + m_postCmd = cmd; + m_postArgs = args; +} + bool DotRunner::run() { int exitCode=0; @@ -406,6 +441,11 @@ bool DotRunner::run() } } } + if (!m_postCmd.isEmpty() && portable_system(m_postCmd,m_postArgs)!=0) + { + err("Error: Problems running '%s' as a post-processing step for dot output\n",m_postCmd.data()); + return FALSE; + } return TRUE; error: err("Problems running dot: exit code=%d, command='%s', arguments='%s'\n", @@ -1052,14 +1092,15 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) const QDir d(path); // store the original directory - if (!d.exists()) - { + if (!d.exists()) + { err("Error: Output dir %s does not exist!\n",path); exit(1); } - QCString oldDir = convertToQCString(QDir::currentDirPath()); + setDotFontPath(d.absPath()); + //QCString oldDir = convertToQCString(QDir::currentDirPath()); // go to the html output directory (i.e. path) - QDir::setCurrent(d.absPath()); - QDir thisDir; + //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; @@ -1073,8 +1114,11 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) const QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); baseName.sprintf("inherit_graph_%d",count++); baseName = convertNameToFile(baseName); - QCString imgName=baseName+"."+ imgExt; - QCString mapName=baseName+".map"; + QCString imgName = baseName+"."+ imgExt; + QCString mapName = baseName+".map"; + QCString absImgName = QCString(d.absPath().data())+"/"+imgName; + QCString absMapName = QCString(d.absPath().data())+"/"+mapName; + QCString absBaseName = QCString(d.absPath().data())+"/"+baseName; QListIterator<DotNode> dnli2(*m_rootNodes); DotNode *node; @@ -1104,11 +1148,11 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) const QCString sigStr(33); MD5Buffer((const unsigned char *)theGraph.ascii(),theGraph.length(),md5_sig); MD5SigToString(md5_sig,sigStr.data(),33); - if (checkAndUpdateMd5Signature(baseName,sigStr) || - !QFileInfo(mapName).exists()) - { + if (checkAndUpdateMd5Signature(absBaseName,sigStr) || + !QFileInfo(absMapName).exists()) + { // image was new or has changed - QCString dotName=baseName+".dot"; + QCString dotName=absBaseName+".dot"; QFile f(dotName); if (!f.open(IO_WriteOnly)) return; QTextStream t(&f); @@ -1118,30 +1162,30 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) const resetReNumbering(); DotRunner dotRun(dotName); - dotRun.addJob(imgExt,imgName); - dotRun.addJob(MAP_CMD,mapName); + dotRun.addJob(imgExt,absImgName); + dotRun.addJob(MAP_CMD,absMapName); if (!dotRun.run()) { out << "</table>" << endl; + unsetDotFontPath(); return; } - - checkDotResult(imgName); - if (Config_getBool("DOT_CLEANUP")) thisDir.remove(dotName); + checkDotResult(absImgName); + if (Config_getBool("DOT_CLEANUP")) d.remove(dotName); } - Doxygen::indexList.addImageFile(imgName); + Doxygen::indexList.addImageFile(absImgName); // write image and map in a table row QCString mapLabel = escapeCharsInString(n->m_label,FALSE); - out << "<tr><td><img src=\"" << imgName << "\" border=\"0\" alt=\"\" usemap=\"#" - << mapLabel << "_map\"/>" << endl; + out << "<tr><td><img src=\"" << imgName << "\" border=\"0\" alt=\"\" usemap=\"#" + << mapLabel << "_map\"/>" << endl; out << "<map name=\"" << mapLabel << "_map\" id=\"" << mapLabel << "\">" << endl; - convertMapFile(out,mapName,""); + convertMapFile(out,absMapName,""); out << "</map></td></tr>" << endl; //thisDir.remove(mapName); } out << "</table>" << endl; - QDir::setCurrent(oldDir); + unsetDotFontPath(); } void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd,bool hideSuper) @@ -1776,7 +1820,6 @@ QCString computeMd5Signature(DotNode *root, static bool updateDotGraph(DotNode *root, DotNode::GraphType gt, - //QDir &thisDir, const QCString &baseName, GraphOutputFormat format, bool lrRank, @@ -1833,14 +1876,11 @@ QCString DotClassGraph::writeGraph(QTextStream &out, { QDir d(path); // store the original directory - if (!d.exists()) - { + if (!d.exists()) + { err("Error: Output dir %s does not exist!\n",path); exit(1); } - QCString oldDir = convertToQCString(QDir::currentDirPath()); - // go to the html output directory (i.e. path) - QDir::setCurrent(d.absPath()); - QDir thisDir; + setDotFontPath(d.absPath()); QCString baseName; QCString mapName; @@ -1860,14 +1900,15 @@ QCString DotClassGraph::writeGraph(QTextStream &out, break; } baseName = convertNameToFile(diskName()); + QCString absBaseName = QCString(d.absPath().data())+"/"+baseName; QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); if (updateDotGraph(m_startNode, m_graphType, - baseName, + absBaseName, format, - m_lrRank, //!isTBRank, + m_lrRank, m_graphType==DotNode::Inheritance, TRUE ) @@ -1876,44 +1917,38 @@ QCString DotClassGraph::writeGraph(QTextStream &out, if (format==BITMAP) // run dot to create a bitmap image { QCString dotArgs(maxCmdLine); - QCString imgName = baseName+"."+imgExt; + QCString absImgName = absBaseName+"."+imgExt; - DotRunner dotRun(baseName+".dot"); - dotRun.addJob(imgExt,imgName); - if (generateImageMap) dotRun.addJob(MAP_CMD,baseName+".map"); + DotRunner dotRun(absBaseName+".dot"); + dotRun.addJob(imgExt,absImgName); + if (generateImageMap) dotRun.addJob(MAP_CMD,absBaseName+".map"); if (!dotRun.run()) { - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } - - checkDotResult(imgName); + checkDotResult(absImgName); } else if (format==EPS) // run dot to create a .eps image { - DotRunner dotRun(baseName+".dot"); - dotRun.addJob("ps",baseName+".eps"); - if (!dotRun.run()) - { - QDir::setCurrent(oldDir); - return baseName; - } - + DotRunner dotRun(absBaseName+".dot"); + dotRun.addJob("ps",absBaseName+".eps"); + if (Config_getBool("USE_PDFLATEX")) { QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - baseName.data(),baseName.data()); - if (portable_system("epstopdf",epstopdfArgs)!=0) - { - err("Error: Problems running epstopdf. Check your TeX installation!\n"); - QDir::setCurrent(oldDir); - return baseName; - } + absBaseName.data(),absBaseName.data()); + dotRun.addPostProcessing("epstopdf",epstopdfArgs); } + if (!dotRun.run()) + { + unsetDotFontPath(); + return baseName; + } } - if (Config_getBool("DOT_CLEANUP")) thisDir.remove(baseName+".dot"); + if (Config_getBool("DOT_CLEANUP")) d.remove(baseName+".dot"); } Doxygen::indexList.addImageFile(baseName+"."+imgExt); @@ -1940,22 +1975,21 @@ QCString DotClassGraph::writeGraph(QTextStream &out, QString tmpstr; QTextOStream tmpout(&tmpstr); tmpout.setEncoding(tmpout.UnicodeUTF8); - convertMapFile(tmpout,baseName+".map",relPath); + convertMapFile(tmpout,absBaseName+".map",relPath); if (!tmpstr.isEmpty()) { out << "<map name=\"" << mapLabel << "\" id=\"" << mapLabel << "\">" << endl; out << tmpstr; out << "</map>" << endl; } - //thisDir.remove(baseName+".map"); } else if (format==EPS) // produce tex to include the .eps image { int width=420,height=600; - if (!readBoundingBoxEPS(baseName+".eps",&width,&height)) + if (!readBoundingBoxEPS(absBaseName+".eps",&width,&height)) { err("Error: Could not extract bounding box from .eps!\n"); - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } //printf("Got EPS size %d,%d\n",width,height); @@ -1981,8 +2015,8 @@ QCString DotClassGraph::writeGraph(QTextStream &out, "\\end{center}\n" "\\end{figure}\n"; } + unsetDotFontPath(); - QDir::setCurrent(oldDir); return baseName; } @@ -2181,14 +2215,11 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, { QDir d(path); // store the original directory - if (!d.exists()) - { + if (!d.exists()) + { err("Error: Output dir %s does not exist!\n",path); exit(1); } - QCString oldDir = convertToQCString(QDir::currentDirPath()); - // go to the html output directory (i.e. path) - QDir::setCurrent(d.absPath()); - QDir thisDir; + setDotFontPath(d.absPath()); QCString baseName=m_diskName; if (m_inverse) baseName+="_dep"; @@ -2198,9 +2229,12 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, if (m_inverse) mapName+="dep"; QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString absBaseName = QCString(d.absPath())+"/"+baseName; + QCString absMapName = QCString(d.absPath())+"/"+mapName; + if (updateDotGraph(m_startNode, DotNode::Dependency, - baseName, + absBaseName, format, FALSE, // lrRank FALSE, // renderParents @@ -2212,38 +2246,33 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, { // run dot to create a bitmap image QCString dotArgs(maxCmdLine); - QCString imgName=baseName+"."+imgExt; - DotRunner dotRun(baseName+".dot"); - dotRun.addJob(imgExt,imgName); - if (generateImageMap) dotRun.addJob(MAP_CMD,baseName+".map"); + QCString absImgName=absBaseName+"."+imgExt; + DotRunner dotRun(absBaseName+".dot"); + dotRun.addJob(imgExt,absImgName); + if (generateImageMap) dotRun.addJob(MAP_CMD,absBaseName+".map"); if (!dotRun.run()) { - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } - checkDotResult(imgName); + checkDotResult(absImgName); } else if (format==EPS) { // run dot to create a .eps image - DotRunner dotRun(baseName+".dot"); - dotRun.addJob("ps",baseName+".eps"); - if (!dotRun.run()) - { - QDir::setCurrent(oldDir); - return baseName; - } + DotRunner dotRun(absBaseName+".dot"); + dotRun.addJob("ps",absBaseName+".eps"); if (Config_getBool("USE_PDFLATEX")) { QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - baseName.data(),baseName.data()); - if (portable_system("epstopdf",epstopdfArgs)!=0) - { - err("Error: Problems running epstopdf. Check your TeX installation!\n"); - QDir::setCurrent(oldDir); - return baseName; - } + absBaseName.data(),absBaseName.data()); + dotRun.addPostProcessing("epstopdf",epstopdfArgs); + } + if (!dotRun.run()) + { + unsetDotFontPath(); + return baseName; } } } @@ -2258,26 +2287,25 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, QString tmpstr; QTextOStream tmpout(&tmpstr); tmpout.setEncoding(tmpout.UnicodeUTF8); - convertMapFile(tmpout,baseName+".map",relPath); + convertMapFile(tmpout,absBaseName+".map",relPath); if (!tmpstr.isEmpty()) { out << "<map name=\"" << mapName << "_map\" id=\"" << mapName << "\">" << endl; out << tmpstr; out << "</map>" << endl; } - //thisDir.remove(baseName+".map"); } else if (format==EPS) { int width,height; - if (!readBoundingBoxEPS(baseName+".eps",&width,&height)) + if (!readBoundingBoxEPS(absBaseName+".eps",&width,&height)) { err("Error: Could not extract bounding box from .eps!\n"); - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } int maxWidth = 420; /* approx. page width in points */ - + out << "\\nopagebreak\n" "\\begin{figure}[H]\n" "\\begin{center}\n" @@ -2288,9 +2316,9 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, "\\end{figure}\n"; } - if (Config_getBool("DOT_CLEANUP")) thisDir.remove(baseName+".dot"); + if (Config_getBool("DOT_CLEANUP")) d.remove(baseName+".dot"); - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } @@ -2478,22 +2506,21 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, { QDir d(path); // store the original directory - if (!d.exists()) - { + if (!d.exists()) + { err("Error: Output dir %s does not exist!\n",path); exit(1); } - QCString oldDir = convertToQCString(QDir::currentDirPath()); - // go to the html output directory (i.e. path) - QDir::setCurrent(d.absPath()); - QDir thisDir; + setDotFontPath(d.absPath()); QCString baseName = m_diskName + (m_inverse ? "_icgraph" : "_cgraph"); QCString mapName=baseName; QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString absBaseName = QCString(d.absPath())+"/"+baseName; + if (updateDotGraph(m_startNode, DotNode::CallGraph, - baseName, + absBaseName, format, TRUE, // lrRank FALSE, // renderParents @@ -2505,38 +2532,33 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, { // run dot to create a bitmap image QCString dotArgs(maxCmdLine); - QCString imgName=baseName+"."+imgExt; - DotRunner dotRun(baseName+".dot"); - dotRun.addJob(imgExt,imgName); - if (generateImageMap) dotRun.addJob(MAP_CMD,baseName+".map"); + QCString absImgName=absBaseName+"."+imgExt; + DotRunner dotRun(absBaseName+".dot"); + dotRun.addJob(imgExt,absImgName); + if (generateImageMap) dotRun.addJob(MAP_CMD,absBaseName+".map"); if (!dotRun.run()) { - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } - checkDotResult(imgName); + checkDotResult(absImgName); } else if (format==EPS) { // run dot to create a .eps image - DotRunner dotRun(baseName+".dot"); - dotRun.addJob("ps",baseName+".eps"); - if (!dotRun.run()) - { - QDir::setCurrent(oldDir); - return baseName; - } + DotRunner dotRun(absBaseName+".dot"); + dotRun.addJob("ps",absBaseName+".eps"); if (Config_getBool("USE_PDFLATEX")) { QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - baseName.data(),baseName.data()); - if (portable_system("epstopdf",epstopdfArgs)!=0) - { - err("Error: Problems running epstopdf. Check your TeX installation!\n"); - QDir::setCurrent(oldDir); - return baseName; - } + absBaseName.data(),absBaseName.data()); + dotRun.addPostProcessing("epstopdf",epstopdfArgs); + } + if (!dotRun.run()) + { + unsetDotFontPath(); + return baseName; } } } @@ -2552,26 +2574,25 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, QString tmpstr; QTextOStream tmpout(&tmpstr); tmpout.setEncoding(tmpout.UnicodeUTF8); - convertMapFile(tmpout,baseName+".map",relPath); + convertMapFile(tmpout,absBaseName+".map",relPath); if (!tmpstr.isEmpty()) { out << "<map name=\"" << mapName << "_map\" id=\"" << mapName << "\">" << endl; out << tmpstr; out << "</map>" << endl; } - //thisDir.remove(baseName+".map"); } else if (format==EPS) { int width,height; - if (!readBoundingBoxEPS(baseName+".eps",&width,&height)) + if (!readBoundingBoxEPS(absBaseName+".eps",&width,&height)) { err("Error: Could not extract bounding box from .eps!\n"); - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } int maxWidth = 420; /* approx. page width in points */ - + out << "\\nopagebreak\n" "\\begin{figure}[H]\n" "\\begin{center}\n" @@ -2582,9 +2603,9 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, "\\end{figure}\n"; } - if (Config_getBool("DOT_CLEANUP")) thisDir.remove(baseName+".dot"); + if (Config_getBool("DOT_CLEANUP")) d.remove(baseName+".dot"); - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } @@ -2618,22 +2639,21 @@ QCString DotDirDeps::writeGraph(QTextStream &out, { QDir d(path); // store the original directory - if (!d.exists()) - { + if (!d.exists()) + { err("Error: Output dir %s does not exist!\n",path); exit(1); } - QCString oldDir = convertToQCString(QDir::currentDirPath()); - // go to the html output directory (i.e. path) - QDir::setCurrent(d.absPath()); - QDir thisDir; + setDotFontPath(d.absPath()); QCString baseName=m_dir->getOutputFileBase()+"_dep"; QCString mapName=escapeCharsInString(baseName,FALSE); QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); - // todo: create check, update md5 checksum + QCString absBaseName = QCString(d.absPath())+"/"+baseName; + + // TODO: create check, update md5 checksum { - QFile f(baseName+".dot"); + QFile f(absBaseName+".dot"); if (!f.open(IO_WriteOnly)) { err("Cannot create file %s.dot for writing!\n",baseName.data()); @@ -2642,43 +2662,38 @@ QCString DotDirDeps::writeGraph(QTextStream &out, t.setEncoding(t.UnicodeUTF8); m_dir->writeDepGraph(t); f.close(); - + if (format==BITMAP) { // run dot to create a bitmap image QCString dotArgs(maxCmdLine); - QCString imgName=baseName+"."+imgExt; - DotRunner dotRun(baseName+".dot"); - dotRun.addJob(imgExt,imgName); - if (generateImageMap) dotRun.addJob(MAP_CMD,baseName+".map"); + QCString absImgName=absBaseName+"."+imgExt; + DotRunner dotRun(absBaseName+".dot"); + dotRun.addJob(imgExt,absImgName); + if (generateImageMap) dotRun.addJob(MAP_CMD,absBaseName+".map"); if (!dotRun.run()) { - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } - checkDotResult(imgName); + checkDotResult(absImgName); } else if (format==EPS) { // run dot to create a .eps image - DotRunner dotRun(baseName+".dot"); - dotRun.addJob("ps",baseName+".eps"); - if (!dotRun.run()) - { - QDir::setCurrent(oldDir); - return baseName; - } + DotRunner dotRun(absBaseName+".dot"); + dotRun.addJob("ps",absBaseName+".eps"); if (Config_getBool("USE_PDFLATEX")) { QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - baseName.data(),baseName.data()); - if (portable_system("epstopdf",epstopdfArgs)!=0) - { - err("Error: Problems running epstopdf. Check your TeX installation!\n"); - QDir::setCurrent(oldDir); - return baseName; - } + absBaseName.data(),absBaseName.data()); + dotRun.addPostProcessing("epstopdf",epstopdfArgs); + } + if (!dotRun.run()) + { + unsetDotFontPath(); + return baseName; } } } @@ -2695,7 +2710,7 @@ QCString DotDirDeps::writeGraph(QTextStream &out, QString tmpstr; QTextOStream tmpout(&tmpstr); tmpout.setEncoding(tmpout.UnicodeUTF8); - convertMapFile(tmpout,baseName+".map",relPath,TRUE); + convertMapFile(tmpout,absBaseName+".map",relPath,TRUE); if (!tmpstr.isEmpty()) { out << "<map name=\"" << mapName << "_map\" id=\"" << mapName << "\">" << endl; @@ -2711,14 +2726,14 @@ QCString DotDirDeps::writeGraph(QTextStream &out, else if (format==EPS) { int width,height; - if (!readBoundingBoxEPS(baseName+".eps",&width,&height)) + if (!readBoundingBoxEPS(absBaseName+".eps",&width,&height)) { err("Error: Could not extract bounding box from .eps!\n"); - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } int maxWidth = 420; /* approx. page width in points */ - + out << "\\nopagebreak\n" "\\begin{figure}[H]\n" "\\begin{center}\n" @@ -2729,9 +2744,9 @@ QCString DotDirDeps::writeGraph(QTextStream &out, "\\end{figure}\n"; } - if (Config_getBool("DOT_CLEANUP")) thisDir.remove(baseName+".dot"); + if (Config_getBool("DOT_CLEANUP")) d.remove(baseName+".dot"); - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } @@ -2775,89 +2790,68 @@ void generateGraphLegend(const char *path) QDir d(path); // store the original directory - if (!d.exists()) - { + if (!d.exists()) + { err("Error: Output dir %s does not exist!\n",path); exit(1); } - QCString oldDir = convertToQCString(QDir::currentDirPath()); - // go to the html output directory (i.e. path) - QDir::setCurrent(d.absPath()); + setDotFontPath(d.absPath()); // run dot to generate the a bitmap image from the graph QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString imgName = "graph_legend."+imgExt; + QCString absImgName = QCString(d.absPath())+"/"+ imgName; - DotRunner dotRun("graph_legend.dot"); - dotRun.addJob(imgExt,imgName); + DotRunner dotRun(d.absPath()+"/graph_legend.dot"); + dotRun.addJob(imgExt,absImgName); if (!dotRun.run()) { - QDir::setCurrent(oldDir); - return; + unsetDotFontPath(); + return; } - checkDotResult(imgName); + checkDotResult(absImgName); Doxygen::indexList.addImageFile(imgName); - QDir::setCurrent(oldDir); + unsetDotFontPath(); } - + void writeDotGraphFromFile(const char *inFile,const char *outDir, const char *outFile,GraphOutputFormat format) { - QCString absOutFile = outDir; - absOutFile+=portable_pathSeparator(); - absOutFile+=outFile; - - // chdir to the output dir, so dot can find the font file. - QCString oldDir = convertToQCString(QDir::currentDirPath()); - // go to the html output directory (i.e. path) - QDir::setCurrent(outDir); - //printf("Going to dir %s\n",QDir::currentDirPath().data()); - - QCString env = portable_getenv("DOTFONTPATH"); - if (env==".") // this path was set by doxygen, so dot can find the FreeSans.ttf font, - // for user defined graphs we use the default search path built into dot, - // unless the user has set the DOTFONTPATH as well. + QDir d(outDir); + if (!d.exists()) { - // temporarily remove the DOTFONTPATH environment variable - // so dot will use the built-in search path. - portable_unsetenv("DOTFONTPATH"); + err("Error: Output dir %s does not exist!\n",outDir); exit(1); } - + setDotFontPath(0); + QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString imgName = (QCString)outFile+"."+imgExt; + QCString absImgName = QCString(d.absPath())+"/"+imgName; + QCString absOutFile = QCString(d.absPath())+"/"+outFile; DotRunner dotRun(inFile); - if (format==BITMAP) - dotRun.addJob(imgExt,imgName); + if (format==BITMAP) + dotRun.addJob(imgExt,absImgName); else // format==EPS - dotRun.addJob("ps",QCString(outFile)+".eps"); - if (!dotRun.run()) - { - QDir::setCurrent(oldDir); - goto error; - } - // Added by Nils Strom + dotRun.addJob("ps",absOutFile+".eps"); + if ( (format==EPS) && (Config_getBool("USE_PDFLATEX")) ) { QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - outFile,outFile); - if (portable_system("epstopdf",epstopdfArgs)!=0) - { - err("Error: Problems running epstopdf. Check your TeX installation!\n"); - } + absOutFile.data(),absOutFile.data()); + dotRun.addPostProcessing("epstopdf",epstopdfArgs); } - if (format==BITMAP) checkDotResult(imgName); - Doxygen::indexList.addImageFile(imgName); - - if (env==".") + if (!dotRun.run()) { - // restore the DOTFONTPATH variable again - portable_setenv("DOTFONTPATH",env); + unsetDotFontPath(); + return; } -error: - QDir::setCurrent(oldDir); + if (format==BITMAP) checkDotResult(absImgName); + Doxygen::indexList.addImageFile(imgName); + + unsetDotFontPath(); } @@ -2874,28 +2868,30 @@ QString getDotImageMapFromFile(const QString& inFile, const QString& outDir, { QString outFile = inFile + ".map"; - // chdir to the output dir, so dot can find the font file. - QCString oldDir = convertToQCString(QDir::currentDirPath()); - // go to the html output directory (i.e. path) - QDir::setCurrent(outDir); - //printf("Going to dir %s\n",QDir::currentDirPath().data()); + QDir d(outDir); + if (!d.exists()) + { + err("Error: Output dir %s does not exist!\n",outDir.data()); exit(1); + } + setDotFontPath(d.absPath()); + + QCString absOutFile = QCString(d.absPath())+"/"+outFile.data(); DotRunner dotRun(inFile); - dotRun.addJob(MAP_CMD,outFile); + dotRun.addJob(MAP_CMD,absOutFile); if (!dotRun.run()) { - QDir::setCurrent(oldDir); + unsetDotFontPath(); return ""; } - + QString result; QTextOStream tmpout(&result); tmpout.setEncoding(tmpout.UnicodeUTF8); - convertMapFile(tmpout, outFile, relPath ,TRUE, context); - QDir().remove(outFile); -// printf("result=%s\n",result.data()); + convertMapFile(tmpout, absOutFile, relPath ,TRUE, context); + d.remove(outFile); - QDir::setCurrent(oldDir); + unsetDotFontPath(); return result; } // end MDG mods @@ -3117,18 +3113,16 @@ QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat fo { QDir d(path); // store the original directory - if (!d.exists()) - { - err("Error: Output dir %s does not exist!\n",path); - exit(1); - } - QCString oldDir = convertToQCString(QDir::currentDirPath()); - // go to the output directory (i.e. path) - QDir::setCurrent(d.absPath()); - QDir thisDir; + if (!d.exists()) + { + err("Error: Output dir %s does not exist!\n",path); exit(1); + } + setDotFontPath(d.absPath()); + QCString baseName = m_diskName; + QCString absBaseName = QCString(d.absPath())+"/"+baseName; - QFile dotfile(baseName+".dot"); + QFile dotfile(absBaseName+".dot"); if (dotfile.open(IO_WriteOnly)) { QTextStream tdot(&dotfile); @@ -3166,12 +3160,15 @@ QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat fo QCString imgName = baseName+"."+imgExt; QCString mapName=baseName+".map"; - DotRunner dotRun(baseName+".dot"); - dotRun.addJob(imgExt,imgName); - if (writeImageMap) dotRun.addJob(MAP_CMD,mapName); + QCString absImgName = QCString(d.absPath())+"/"+imgName; + QCString absMapName = QCString(d.absPath())+"/"+mapName; + + DotRunner dotRun(absBaseName+".dot"); + dotRun.addJob(imgExt,absImgName); + if (writeImageMap) dotRun.addJob(MAP_CMD,absMapName); if (!dotRun.run()) { - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } @@ -3182,38 +3179,33 @@ QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat fo << "\" border=\"0\" alt=\"\" usemap=\"#" << mapLabel << "_map\"/>" << endl; t << "<map name=\"" << mapLabel << "_map\" id=\"" << mapLabel << "\">" << endl; - convertMapFile(t,mapName,relPath); + convertMapFile(t,absMapName,relPath); t << "</map></td></tr></table></center>" << endl; - thisDir.remove(mapName); } } else if (format==EPS) { - DotRunner dotRun(baseName+".dot"); - dotRun.addJob("ps",baseName+".eps"); - if (!dotRun.run()) - { - QDir::setCurrent(oldDir); - return baseName; - } - + DotRunner dotRun(absBaseName+".dot"); + dotRun.addJob("ps",absBaseName+".eps"); if (Config_getBool("USE_PDFLATEX")) { QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - baseName.data(),baseName.data()); - if (portable_system("epstopdf",epstopdfArgs)!=0) - { - err("Error: Problems running epstopdf. Check your TeX installation!\n"); - QDir::setCurrent(oldDir); - return baseName; - } + absBaseName.data(),absBaseName.data()); + dotRun.addPostProcessing("epstopdf",epstopdfArgs); + } + + if (!dotRun.run()) + { + unsetDotFontPath(); + return baseName; } + int width,height; - if (!readBoundingBoxEPS(baseName+".eps",&width,&height)) + if (!readBoundingBoxEPS(absBaseName+".eps",&width,&height)) { err("Error: Could not extract bounding box from .eps!\n"); - QDir::setCurrent(oldDir); + unsetDotFontPath(); return baseName; } int maxWidth = 420; /* approx. page width in points */ @@ -3228,11 +3220,10 @@ QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat fo } if (Config_getBool("DOT_CLEANUP")) { - thisDir.remove(baseName+".dot"); + d.remove(baseName+".dot"); } - QDir::setCurrent(oldDir); - + unsetDotFontPath(); return baseName; } @@ -321,10 +321,14 @@ class DotRunner */ void addJob(const char *format,const char *output); + void addPostProcessing(const char *cmd,const char *args); + /** Runs dot for all jobs added. */ bool run(); private: QList<QCString> m_jobs; + QCString m_postArgs; + QCString m_postCmd; QCString m_file; }; diff --git a/src/doxygen.cpp b/src/doxygen.cpp index f53a291..05d9429 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -78,6 +78,7 @@ #include "marshal.h" #include "portable.h" #include "vhdlscanner.h" +#include "vhdldocgen.h" #include "layout.h" @@ -4078,12 +4079,12 @@ static bool findClassRelation( QCString biName=bi->name; bool explicitGlobalScope=FALSE; + //printf("findClassRelation: biName=`%s'\n",biName.data()); if (biName.left(2)=="::") // explicit global scope { biName=biName.right(biName.length()-2); explicitGlobalScope=TRUE; } - //printf("biName=`%s'\n",biName.data()); EntryNav *parentNode=rootNav->parent(); bool lastParent=FALSE; @@ -4108,7 +4109,7 @@ static bool findClassRelation( // &stripped); MemberDef *baseClassTypeDef=0; QCString templSpec; - ClassDef *baseClass=getResolvedClass(explicitGlobalScope ? 0 : cd, + ClassDef *baseClass=getResolvedClass(explicitGlobalScope ? Doxygen::globalScope : context, cd->getFileDef(), baseClassName, &baseClassTypeDef, @@ -4154,7 +4155,7 @@ static bool findClassRelation( { templSpec=removeRedundantWhiteSpace(baseClassName.mid(i,e-i)); baseClassName=baseClassName.left(i)+baseClassName.right(baseClassName.length()-e); - baseClass=getResolvedClass(cd, + baseClass=getResolvedClass(explicitGlobalScope ? Doxygen::globalScope : context, cd->getFileDef(), baseClassName, &baseClassTypeDef, @@ -4190,7 +4191,7 @@ static bool findClassRelation( QCString tmpTemplSpec; // replace any namespace aliases replaceNamespaceAliases(baseClassName,si); - baseClass=getResolvedClass(cd, + baseClass=getResolvedClass(explicitGlobalScope ? Doxygen::globalScope : context, cd->getFileDef(), baseClassName, &baseClassTypeDef, @@ -4648,8 +4649,9 @@ static void addListReferences() { LockingPtr< QList<ListItemInfo> > xrefItems = pd->xrefListItems(); addRefItem(xrefItems.pointer(), + name, theTranslator->trPage(TRUE,TRUE), - name,pd->title()); + name,pd->title(),0); } } DirSDict::Iterator ddi(*Doxygen::directories); @@ -4663,8 +4665,9 @@ static void addListReferences() //} LockingPtr< QList<ListItemInfo> > xrefItems = dd->xrefListItems(); addRefItem(xrefItems.pointer(), + name, theTranslator->trDir(TRUE,TRUE), - name,dd->displayName()); + name,dd->displayName(),0); } } @@ -7782,9 +7785,13 @@ static void buildPageList(EntryNav *rootNav) QCString title=root->args.stripWhiteSpace(); if (title.isEmpty()) title=theTranslator->trMainPage(); - addRefItem(root->sli,"page", - Config_getBool("GENERATE_TREEVIEW")?"main":"index", - title + QCString name = Config_getBool("GENERATE_TREEVIEW")?"main":"index"; + addRefItem(root->sli, + name, + "page", + name, + title, + 0 ); rootNav->releaseEntry(); @@ -8422,113 +8429,6 @@ static bool patternMatch(QFileInfo *fi,QStrList *patList) return found; } -static int transcodeCharacterBuffer(BufStr &srcBuf,int size, - const char *inputEncoding,const char *outputEncoding) -{ - if (inputEncoding==0 || outputEncoding==0) return size; - if (qstricmp(inputEncoding,outputEncoding)==0) return size; - void *cd = portable_iconv_open(outputEncoding,inputEncoding); - if (cd==(void *)(-1)) - { - err("Error: unsupported character conversion: '%s'->'%s': %s\n" - "Check the INPUT_ENCODING setting in the config file!\n", - inputEncoding,outputEncoding,strerror(errno)); - exit(1); - } - int tmpBufSize=size*4+1; - BufStr tmpBuf(tmpBufSize); - size_t iLeft=size; - size_t oLeft=tmpBufSize; - const char *srcPtr = srcBuf.data(); - char *dstPtr = tmpBuf.data(); - uint newSize=0; - if (!portable_iconv(cd, &srcPtr, &iLeft, &dstPtr, &oLeft)) - { - newSize = tmpBufSize-oLeft; - srcBuf.shrink(newSize); - strncpy(srcBuf.data(),tmpBuf.data(),newSize); - //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data()); - } - else - { - err("Error: failed to translate characters from %s to %s: check INPUT_ENCODING\n", - inputEncoding,outputEncoding); - exit(1); - } - portable_iconv_close(cd); - return newSize; -} - -//---------------------------------------------------------------------------- -// reads a file into an array and filters out any 0x00 and 0x06 bytes, -// because these are special for the parser. - -void copyAndFilterFile(const char *fileName,BufStr &dest) -{ - // try to open file - int size=0; - //uint oldPos = dest.curPos(); - //printf(".......oldPos=%d\n",oldPos); - - QFileInfo fi(fileName); - if (!fi.exists()) return; - QCString filterName = getFileFilter(fileName); - if (filterName.isEmpty()) - { - QFile f(fileName); - if (!f.open(IO_ReadOnly)) - { - err("Error: could not open file %s\n",fileName); - return; - } - size=fi.size(); - // read the file - dest.skip(size); - if (f.readBlock(dest.data()/*+oldPos*/,size)!=size) - { - err("Error while reading file %s\n",fileName); - return; - } - } - else - { - QCString cmd=filterName+" \""+fileName+"\""; - Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data()); - FILE *f=portable_popen(cmd,"r"); - if (!f) - { - err("Error: could not execute filter %s\n",filterName.data()); - return; - } - const int bufSize=1024; - char buf[bufSize]; - int numRead; - while ((numRead=fread(buf,1,bufSize,f))>0) - { - //printf(">>>>>>>>Reading %d bytes\n",numRead); - dest.addArray(buf,numRead),size+=numRead; - } - portable_pclose(f); - } - // filter unwanted bytes from the resulting data - uchar conv[256]; - int i; - for (i=0;i<256;i++) conv[i]=i; - conv[0x06]=0x20; // replace the offending characters with spaces - conv[0x00]=0x20; - // remove any special markers from the input - uchar *p=(uchar *)dest.data()/*+oldPos*/; - for (i=0;i<size;i++,p++) *p=conv[*p]; - // and translate CR's - int newSize=filterCRLF(dest.data()/*+oldPos*/,size); - //printf("filter char at %p size=%d newSize=%d\n",dest.data()+oldPos,size,newSize); - if (newSize!=size) // we removed chars - { - dest.shrink(/*oldPos+*/newSize); // resize the array - //printf(".......resizing from %d to %d result=[%s]\n",oldPos+size,oldPos+newSize,dest.data()); - } -} - //---------------------------------------------------------------------------- static void copyStyleSheet() { @@ -8562,6 +8462,8 @@ static void copyStyleSheet() } } + +//! parse the list of input files static void parseFiles(Entry *root,EntryNav *rootNav) { void *cd = 0; @@ -8587,26 +8489,21 @@ static void parseFiles(Entry *root,EntryNav *rootNav) QFileInfo fi(fileName); BufStr preBuf(fi.size()+4096); - //BufStr *bufPtr = &preBuf; if (Config_getBool("ENABLE_PREPROCESSING") && parser->needsPreprocessing(extension)) { + BufStr inBuf(fi.size()+4096); msg("Preprocessing %s...\n",s->data()); - preprocessFile(fileName,preBuf); + readInputFile(fileName,inBuf); + preprocessFile(fileName,inBuf,preBuf); } - else + else // no preprocessing { msg("Reading %s...\n",s->data()); - copyAndFilterFile(fileName,preBuf); + readInputFile(fileName,preBuf); } - preBuf.addChar('\n'); /* to prevent problems under Windows ? */ - - // do character transcoding if needed. - transcodeCharacterBuffer(preBuf,preBuf.curPos(), - Config_getString("INPUT_ENCODING"),"UTF-8"); - BufStr convBuf(preBuf.curPos()+1024); // convert multi-line C++ comments to C style comments @@ -9911,6 +9808,29 @@ void parseInput() if (generateMan) manOutput = createOutputDirectory(outputDirectory,"MAN_OUTPUT","/man"); + + if (Config_getBool("HAVE_DOT")) + { + QCString curFontPath = Config_getString("DOT_FONTPATH"); + if (curFontPath.isEmpty()) + { + portable_getenv("DOTFONTPATH"); + QCString newFontPath = "."; + if (!curFontPath.isEmpty()) + { + newFontPath+=portable_pathListSeparator(); + newFontPath+=curFontPath; + } + portable_setenv("DOTFONTPATH",newFontPath); + } + else + { + portable_setenv("DOTFONTPATH",curFontPath); + } + } + + + /************************************************************************** * Handle layout file * **************************************************************************/ @@ -10102,14 +10022,14 @@ void parseInput() msg("Computing class relations...\n"); computeTemplateClassRelations(); flushUnresolvedRelations(); - //if (Config_getBool("OPTIMIZE_OUTPUT_VHDL")) - //{ - // VhdlDocGen::computeVhdlComponentRelations(g_classEntries,g_storage); - //} - //else - //{ + if (Config_getBool("OPTIMIZE_OUTPUT_VHDL")) + { + VhdlDocGen::computeVhdlComponentRelations(); + } + else + { computeClassRelations(); - //} + } g_classEntries.clear(); msg("Add enum values to enums...\n"); diff --git a/src/filedef.cpp b/src/filedef.cpp index bcfcc01..7dd8b79 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -1094,8 +1094,10 @@ void FileDef::addListReferences() { LockingPtr< QList<ListItemInfo> > xrefItems = xrefListItems(); addRefItem(xrefItems.pointer(), + getOutputFileBase(), theTranslator->trFile(TRUE,TRUE), - getOutputFileBase(),name() + getOutputFileBase(),name(), + 0 ); } if (memberGroupSDict) diff --git a/src/formula.cpp b/src/formula.cpp index 0ba3e22..ee4976b 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -84,7 +84,7 @@ void FormulaList::generateBitmaps(const char *path) for (fli.toFirst();(formula=fli.current());++fli) { QCString resultName; - resultName.sprintf("form_%d.png",formula->getId()); + resultName.sprintf("form_%d.gif",formula->getId()); // only formulas for which no image exists are generated QFileInfo fi(resultName); if (!fi.exists()) @@ -119,7 +119,7 @@ void FormulaList::generateBitmaps(const char *path) for (;(pagePtr=pli.current());++pli,++pageIndex) { int pageNum=*pagePtr; - msg("Generating image form_%d.png for formula\n",pageNum); + msg("Generating image form_%d.gif for formula\n",pageNum); char dviArgs[4096]; QCString formBase; formBase.sprintf("_form%d",pageNum); @@ -268,7 +268,7 @@ void FormulaList::generateBitmaps(const char *path) } // save the result as a png QCString resultName; - resultName.sprintf("form_%d.png",pageNum); + resultName.sprintf("form_%d.gif",pageNum); // the option parameter 1 is used here as a temporary hack // to select the right color palette! dstImage.save(resultName,1); diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 3f3c86f..1b3c47e 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -1230,8 +1230,10 @@ void GroupDef::addListReferences() { LockingPtr< QList<ListItemInfo> > xrefItems = xrefListItems(); addRefItem(xrefItems.pointer(), + getOutputFileBase(), theTranslator->trGroup(TRUE,TRUE), - getOutputFileBase(),name() + getOutputFileBase(),name(), + 0 ); } MemberGroupSDict::Iterator mgli(*memberGroupSDict); diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index fbea282..dae7084 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1758,7 +1758,7 @@ void HtmlGenerator::startMemberGroupDocs() void HtmlGenerator::endMemberGroupDocs() { - t << "<br/><br/></div></td></tr>" << endl; + t << "</div></td></tr>" << endl; } void HtmlGenerator::startMemberGroup() diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 794ef9f..f3f9438 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -1580,38 +1580,18 @@ void LatexGenerator::docify(const char *str) void LatexGenerator::codify(const char *str) { - static bool isJapanese = theTranslator->idLanguage()=="japanese" || - theTranslator->idLanguage()=="japanese-en"; - if (str) { const char *p=str; char c; - char cs[2]; - cs[1]='\0'; + char cs[5]; int spacesToNextTabStop; static int tabSize = Config_getInt("TAB_SIZE"); while (*p) { - static bool MultiByte = FALSE; + //static bool MultiByte = FALSE; c=*p++; - if( isJapanese ) - { - if ( MultiByte ) - { - t << (char)c; - MultiByte = FALSE; - continue; - } - if ((uchar)c>=0x80) // char in range [0x80..0xff] - { - t << (char)c; - MultiByte = TRUE; - continue; - } - } - switch(c) { case 0x0c: break; // remove ^L @@ -1621,14 +1601,34 @@ void LatexGenerator::codify(const char *str) col+=spacesToNextTabStop; break; case '\n': t << '\n'; col=0; break; - default: if (m_prettyCode) + default: cs[0]=c; + cs[1]=0; + int bytes=1; + if (c<0) // multibyte utf-8 character + { + bytes++; // 1xxx.xxxx: >=2 byte character + cs[1]=*p; + cs[2]=0; + if (((uchar)c&0xE0)==0xE0) + { + bytes++; // 111x.xxxx: >=3 byte character + cs[2]=*(p+1); + cs[3]=0; + } + if (((uchar)c&0xF0)==0xF0) + { + bytes++; // 1111.xxxx: 4 byte character + cs[2]=*(p+2); + cs[4]=0; + } + } + if (m_prettyCode) { - cs[0]=c; filterLatexString(t,cs,insideTabbing,TRUE); } else { - t << c; + t << cs; } if (col>=80) { @@ -1637,8 +1637,9 @@ void LatexGenerator::codify(const char *str) } else { - col++; + col++; } + p+=(bytes-1); // skip to next character break; } } diff --git a/src/libdoxycfg.t b/src/libdoxycfg.t index c3f2f3c..0914b78 100644 --- a/src/libdoxycfg.t +++ b/src/libdoxycfg.t @@ -47,3 +47,6 @@ sub GenerateDep { #$ GenerateDep("config.cpp","config.l"); $(LEX) -PconfigYY -t config.l >config.cpp +configoptions.cpp: config.xml + python configgen.py config.xml >configoptions.cpp + diff --git a/src/memberdef.cpp b/src/memberdef.cpp index f9637e2..b3843cd 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1538,6 +1538,12 @@ void MemberDef::writeDeclaration(OutputList &ol, //ol.startEmphasis(); ol.popGeneratorState(); } + // for RTF we need to add an extra empty paragraph + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::RTF); + ol.startParagraph(); + ol.endParagraph(); + ol.popGeneratorState(); ol.endMemberDescription(); } warnIfUndocumented(); @@ -2714,14 +2720,16 @@ void MemberDef::addListReference(Definition *) QCString memName = name(); Definition *pd=getOuterScope(); QCString memArgs; - if (!isRelated() && + if (!isRelated() + /* && commented out as a result of bug 597016 ( - (!hideScopeNames && // there is a scope + (!hideScopeNames && // there is a scope pd && pd!=Doxygen::globalScope) // and we can show it || (pd=getClassDef()) // it's a class so we // show the scope anyway ) + */ ) { if (isObjCMethod()) @@ -2730,19 +2738,21 @@ void MemberDef::addListReference(Definition *) } else if (optimizeOutputJava) { - memName.prepend(pd->name()+"."); + if (!hideScopeNames) memName.prepend(pd->name()+"."); memArgs = argsString(); } else { - memName.prepend(pd->name()+"::"); + if (!hideScopeNames) memName.prepend(pd->name()+"::"); memArgs = argsString(); } } LockingPtr< QList<ListItemInfo> > xrefItems = xrefListItems(); if (xrefItems!=0) { - addRefItem(xrefItems.pointer(),memLabel, + addRefItem(xrefItems.pointer(), + qualifiedName(), + memLabel, getOutputFileBase()+"#"+anchor(),memName,memArgs); } } diff --git a/src/membergroup.cpp b/src/membergroup.cpp index a191354..5c4a2e8 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -273,8 +273,12 @@ void MemberGroup::addListReferences(Definition *def) memberList->addListReferences(def); if (m_xrefListItems && def) { - addRefItem(m_xrefListItems,theTranslator->trGroup(TRUE,TRUE), - def->getOutputFileBase()+"#"+anchor(),grpHeader,0); + QCString name = def->getOutputFileBase()+"#"+anchor(); + addRefItem(m_xrefListItems, + name, + theTranslator->trGroup(TRUE,TRUE), + name, + grpHeader,0); } } diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 689fd26..2b41d4c 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -655,8 +655,10 @@ void NamespaceDef::addListReferences() { LockingPtr< QList<ListItemInfo> > xrefItems = xrefListItems(); addRefItem(xrefItems.pointer(), + qualifiedName(), fortranOpt?theTranslator->trModule(TRUE,TRUE):theTranslator->trNamespace(TRUE,TRUE), - getOutputFileBase(),displayName() + getOutputFileBase(),displayName(), + 0 ); } MemberGroupSDict::Iterator mgli(*memberGroupSDict); diff --git a/src/pagedef.cpp b/src/pagedef.cpp index 1f451cc..efb361c 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -70,10 +70,7 @@ void PageDef::writeDocumentation(OutputList &ol) { //outputList->disable(OutputGenerator::Man); QCString pageName; - if (Config_getBool("CASE_SENSE_NAMES")) - pageName=name(); - else - pageName=name().lower(); + pageName=escapeCharsInString(name(),FALSE); startFile(ol,pageName,pageName,title(),HLI_Pages,TRUE); @@ -20,7 +20,6 @@ #include "qtbc.h" #include <stdio.h> -//#include <qfile.h> #include "define.h" class BufStr; @@ -29,7 +28,7 @@ DefineDict* getFileDefineDict(); void initPreprocessor(); void cleanUpPreprocessor(); void addSearchDir(const char *dir); -void preprocessFile(const char *fileName,BufStr &output); +void preprocessFile(const char *fileName,BufStr &input,BufStr &output); void preFreeScanner(); #endif @@ -46,16 +46,21 @@ #include "debug.h" #include "bufstr.h" #include "portable.h" +#include "bufstr.h" #define YY_NEVER_INTERACTIVE 1 struct FileState { + FileState(int size) : fileBuf(size), oldFileBuf(0), oldFileBufPos(0) {} int lineNr; - FILE *filePtr; - FILE *oldYYin; - bool isPlainFile; + //FILE *filePtr; + BufStr fileBuf; + //FILE *oldYYin; + BufStr *oldFileBuf; + int oldFileBufPos; + //bool isPlainFile; YY_BUFFER_STATE bufState; QCString fileName; }; @@ -83,6 +88,8 @@ static int g_level; static int g_lastCContext; static int g_lastCPPContext; static QArray<int> g_levelGuard; +static BufStr *g_inputBuf; +static int g_inputBufPos; static BufStr *g_outputBuf; static int g_roundCount; static bool g_quoteArg; @@ -192,11 +199,11 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude // global guard if (g_curlyCount==0) // not #include inside { ... } { - if (g_allIncludes.find(absName)==0) + if (g_allIncludes.find(absName)!=0) { - alreadyIncluded = TRUE; - //printf(" already included 1\n"); - return 0; // already done + alreadyIncluded = TRUE; + //printf(" already included 1\n"); + return 0; // already done } g_allIncludes.insert(absName,(void *)0x8); } @@ -215,16 +222,28 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude } g_includeStack.setAutoDelete(TRUE); - if (alreadyIncluded) + if (alreadyIncluded) { //printf(" already included 2\n"); - return 0; + return 0; } //printf("#include %s\n",absName.data()); - fs = new FileState; + fs = new FileState(fi.size()+4096); alreadyIncluded = FALSE; + if (!readInputFile(absName,fs->fileBuf)) + { // error + //printf(" error reading\n"); + delete fs; + fs=0; + } + else + { + fs->oldFileBuf = g_inputBuf; + fs->oldFileBufPos = g_inputBufPos; + } +#if 0 QCString filterName = getFileFilter(absName); if (!filterName.isEmpty()) { @@ -256,6 +275,8 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude { fs->oldYYin = preYYin; } +#endif + } return fs; } @@ -1155,9 +1176,9 @@ static void readIncludeFile(const QCString &inc) uint i=0; // find the start of the include file name - while (i<inc.length() && + while (i<inc.length() && (inc.at(i)==' ' || inc.at(i)=='"' || inc.at(i)=='<') - ) i++; + ) i++; uint s=i; // was it a local include? @@ -1190,13 +1211,13 @@ static void readIncludeFile(const QCString &inc) } if (oldFileDef) { - // add include dependency to the file in which the #include was found - oldFileDef->addIncludeDependency(g_yyFileDef,incFileName,localInclude,g_isImported); - // add included by dependency + // add include dependency to the file in which the #include was found + oldFileDef->addIncludeDependency(g_yyFileDef,incFileName,localInclude,g_isImported); + // add included by dependency if (g_yyFileDef) { - //printf("Adding include dependency %s->%s\n",oldFileDef->name().data(),incFileName.data()); - g_yyFileDef->addIncludedByDependency(oldFileDef,oldFileDef->docName(),localInclude,g_isImported); + //printf("Adding include dependency %s->%s\n",oldFileDef->name().data(),incFileName.data()); + g_yyFileDef->addIncludedByDependency(oldFileDef,oldFileDef->docName(),localInclude,g_isImported); } } fs->bufState=YY_CURRENT_BUFFER; @@ -1213,8 +1234,11 @@ static void readIncludeFile(const QCString &inc) outputArray(lineStr.data(),lineStr.length()); //fprintf(stderr,"Switching to include file %s\n",incFileName.data()); - preYYin=fs->filePtr; - yy_switch_to_buffer(yy_create_buffer(preYYin, YY_BUF_SIZE)); + //preYYin=fs->filePtr; + //yy_switch_to_buffer(yy_create_buffer(preYYin, YY_BUF_SIZE)); + g_inputBuf=&fs->fileBuf; + g_inputBufPos=0; + yy_switch_to_buffer(yy_create_buffer(0, YY_BUF_SIZE)); } else { @@ -1309,6 +1333,7 @@ static char resolveTrigraph(char c) static int yyread(char *buf,int max_size) { +#if 0 int len = fread( buf, 1, max_size, preYYin ); if (len==0 && ferror( yyin )) { @@ -1316,6 +1341,13 @@ static int yyread(char *buf,int max_size) return len; } return filterCRLF(buf,len); +#endif + + int bytesInBuf = g_inputBuf->curPos()-g_inputBufPos; + int bytesToCopy = QMIN(max_size,bytesInBuf); + memcpy(buf,g_inputBuf->data()+g_inputBufPos,bytesToCopy); + g_inputBufPos+=bytesToCopy; + return bytesToCopy; } /* ----------------------------------------------------------------- */ @@ -1590,7 +1622,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) g_incName=c; BEGIN(Include); } -<Command>"define"{B}+ { +<Command>("cmake")?"define"{B}+ { //printf("!!!DefName\n"); BEGIN(DefName); } @@ -2231,6 +2263,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) { FileState *fs=g_includeStack.pop(); //fileDefineCache->merge(g_yyFileName,fs->fileName); +#if 0 if (fs->isPlainFile) { if (fs->filePtr && fclose(fs->filePtr)!=0) @@ -2247,11 +2280,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } fs->filePtr=0; } +#endif YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER; yy_switch_to_buffer( fs->bufState ); yy_delete_buffer( oldBuf ); g_yyLineNr=fs->lineNr; - preYYin = fs->oldYYin; + //preYYin = fs->oldYYin; + g_inputBuf = fs->oldFileBuf; + g_inputBufPos = fs->oldFileBufPos; setFileName(fs->fileName.copy()); //fprintf(stderr,"######## FileName %s\n",g_yyFileName.data()); @@ -2264,6 +2300,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) delete fs; fs=0; } } +<*>"/*"/"*/" | <*>"/*"[*]? { outputArray(yytext,yyleng); g_lastCContext=YY_START; @@ -2385,14 +2422,18 @@ void cleanUpPreprocessor() } -void preprocessFile(const char *fileName,BufStr &output) +void preprocessFile(const char *fileName,BufStr &input,BufStr &output) { uint orgOffset=output.curPos(); + //printf("##########################\n%s\n####################\n", + // input.data()); g_macroExpansion = Config_getBool("MACRO_EXPANSION"); g_expandOnlyPredef = Config_getBool("EXPAND_ONLY_PREDEF"); g_curlyCount=0; g_nospaces=FALSE; + g_inputBuf=&input; + g_inputBufPos=0; g_outputBuf=&output; g_includeStack.setAutoDelete(TRUE); g_includeStack.clear(); @@ -2511,6 +2552,7 @@ void preprocessFile(const char *fileName,BufStr &output) firstTime=FALSE; } +#if 0 QCString inputFilter = getFileFilter(fileName); if (inputFilter.isEmpty()) { @@ -2532,6 +2574,7 @@ void preprocessFile(const char *fileName,BufStr &output) return; } } +#endif g_yyLineNr = 1; g_level = 0; g_ifcount = 0; @@ -2544,10 +2587,13 @@ void preprocessFile(const char *fileName,BufStr &output) preYYlex(); g_lexInit=TRUE; + +#if 0 if (inputFilter.isEmpty()) fclose(preYYin); else portable_pclose(preYYin); +#endif if (Debug::isFlagSet(Debug::Preprocessor)) { diff --git a/src/scanner.l b/src/scanner.l index f112d5b..dd1eb77 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1124,7 +1124,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) <FindMembers>{BN}{1,80} { lineCount(); } -<FindMembers>"@"{ID}{BN}*"(" { +<FindMembers>"@"({ID}".")*{ID}{BN}*"(" { if (insideJava) // Java annotation { lineCount(); @@ -2010,7 +2010,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) lastCPPContext = YY_START; BEGIN( SkipCPP ) ; } -<FindMembers,FindFields>{B}*"#"{B}*"define" { if (insidePHP) +<FindMembers,FindFields>{B}*"#"{B}*("cmake")?"define" { + if (insidePHP) REJECT; current->bodyLine = yyLineNr; BEGIN( Define ); @@ -2674,6 +2675,10 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) current->type=current->type.simplifyWhiteSpace(); current->args=removeRedundantWhiteSpace(current->args); current->name=current->name.stripWhiteSpace(); + if (current->section==Entry::CLASS_SEC) // remove spec for "struct Bla bla;" + { + current->spec = 0; + } current->section = Entry::VARIABLE_SEC ; current->fileName = yyFileName; current->startLine = yyLineNr; diff --git a/src/translator_cz.h b/src/translator_cz.h index daad247..8d6d386 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -20,7 +20,7 @@ // Updates: // -------- -// 2009/08/24 - +// 2009/09/02 - Updates for "new since 1.6.0 (mainly for the new search engine)". // 2008/06/09 - Corrections in trLegendDocs(). // 2007/11/13 - Update for "new since 1.5.4 (mainly for Fortran)". // 2007/03/20 - removing decode(), conversion of literals to UTF-8. @@ -1821,7 +1821,7 @@ class TranslatorCzech : public Translator /*! directory relation for \a name */ virtual QCString trDirRelation(const char *name) { - return "Relace "+QCString(name); + return "Relace " + QCString(name); } /*! Loading message shown when loading search results */ @@ -1847,7 +1847,6 @@ class TranslatorCzech : public Translator { return "Nic se nenašlo"; } - }; #endif // TRANSLATOR_CZ_H diff --git a/src/translator_fr.h b/src/translator_fr.h index e7b66c8..575e923 100644 --- a/src/translator_fr.h +++ b/src/translator_fr.h @@ -158,7 +158,7 @@ class TranslatorFrench : public TranslatorAdapter_1_5_4 /*! header that is put before the list of typedefs. */ virtual QCString trMemberTypedefDocumentation() { - return "Documentation des définitions de type membres"; } + return "Documentation des définitions de type membre"; } /*! header that is put before the list of enumerations. */ virtual QCString trMemberEnumerationDocumentation() @@ -386,7 +386,7 @@ class TranslatorFrench : public TranslatorAdapter_1_5_4 if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="des fonctions, variables, macros, enumérations, et définitions de type "; + result+="des fonctions, variables, macros, énumérations, et définitions de type "; } else { @@ -573,7 +573,7 @@ class TranslatorFrench : public TranslatorAdapter_1_5_4 */ virtual QCString trTypedefDocumentation() { - return "Documentation des définition de type"; } + return "Documentation des définitions de type"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration types @@ -812,7 +812,7 @@ class TranslatorFrench : public TranslatorAdapter_1_5_4 if (i<numEntries-2) // not the fore last entry result+=", "; else // the fore last entry - result+=", et "; + result+=" et "; } } return result; @@ -998,7 +998,7 @@ class TranslatorFrench : public TranslatorAdapter_1_5_4 /*! header that is put before the list of constructor/destructors. */ virtual QCString trConstructorDocumentation() { - return "Documentation des constructeurs et destructeur"; + return "Documentation des constructeurs et destructeurs"; } /*! Used in the file documentation to point to the corresponding sources. */ virtual QCString trGotoSourceCode() @@ -1192,7 +1192,7 @@ class TranslatorFrench : public TranslatorAdapter_1_5_4 "};\n" "\\endcode\n" "Si la valeur 240 est attribuée au tag \\c MAX_DOT_GRAPH_HEIGHT " - "du fichier de configuration, cela génčrera le graphe suivant :" + "du fichier de configuration, cela générera le graphe suivant :" "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" "<p>\n" "Les rectangles du graphe ci-dessus ont la signification suivante :\n" @@ -1736,6 +1736,41 @@ class TranslatorFrench : public TranslatorAdapter_1_5_4 */ virtual QCString trEnumerationValueDocumentation() { return "Documentation des énumérations"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.0 (mainly for the new search engine) +////////////////////////////////////////////////////////////////////////// + + /*! directory relation for \a name */ + virtual QCString trDirRelation(const char *name) + { + return QCString(name)+" Relation"; + } + + /*! Loading message shown when loading search results */ + virtual QCString trLoading() + { + return "Chargement..."; + } + + /*! Label used for search results in the global namespace */ + virtual QCString trGlobalNamespace() + { + return "Espace de nommage global"; + } + + /*! Message shown while searching */ + virtual QCString trSearching() + { + return "Recherche..."; + } + + /*! Text shown when no search results are found */ + virtual QCString trNoMatches() + { + return "Aucune correspondance"; + } + }; #endif diff --git a/src/translator_pl.h b/src/translator_pl.h index 571966c..dd6373e 100644 --- a/src/translator_pl.h +++ b/src/translator_pl.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * + * * * Copyright (C) 1997-2008 by Dimitri van Heesch. * @@ -20,21 +20,8 @@ #ifndef TRANSLATOR_PL_H #define TRANSLATOR_PL_H -class TranslatorPolish : public TranslatorAdapter_1_6_0 +class TranslatorPolish : public Translator { - private: - /*! to avoid macro redefinition from translator_pl.h */ - inline QCString decode(const QCString& sInput) - { - //if (Config_getBool("USE_WINDOWS_ENCODING")) - //{ - // return ISO88592ToWin1250(sInput); - //} - //else - //{ - return sInput; - //} - } public: // --- Language control methods ------------------- @@ -62,80 +49,73 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! return the language charset. This will be used for the HTML output */ virtual QCString idLanguageCharset() { - //if (Config_getBool("USE_WINDOWS_ENCODING")) - //{ - // return "windows-1250"; - //} - //else - //{ - return "iso-8859-2"; - //} + return "utf-8"; } // --- Language translation methods ------------------- /*! used in the compound documentation before a list of related functions. */ QCString trRelatedFunctions() - { return decode("Funkcje powi±zane"); } + { return "Funkcje powiÄ…zane"; } /*! subscript for the related functions. */ QCString trRelatedSubscript() - { return decode("(Zauważ, że to nie s± metody klas.)"); } + { return "(ZauwaĹĽ, ĹĽe to nie sÄ… metody klas.)"; } /*! header that is put before the detailed description of files, classes and namespaces. */ QCString trDetailedDescription() - { return decode("Opis szczegółowy"); } + { return "Opis szczegółowy"; } /*! header that is put before the list of typedefs. */ QCString trMemberTypedefDocumentation() - { return decode("Dokumentacja składowych definicji typu"); } + { return "Dokumentacja skĹ‚adowych definicji typu"; } /*! header that is put before the list of enumerations. */ QCString trMemberEnumerationDocumentation() - { return decode("Dokumentacja składowych wyliczanych"); } + { return "Dokumentacja skĹ‚adowych wyliczanych"; } /*! header that is put before the list of member functions. */ QCString trMemberFunctionDocumentation() - { return decode("Dokumentacja funkcji składowych"); } + { return "Dokumentacja funkcji skĹ‚adowych"; } /*! header that is put before the list of member attributes. */ QCString trMemberDataDocumentation() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return decode("Dokumentacja pól"); + return "Dokumentacja pĂłl"; } else { - return decode("Dokumentacja atrybutów składowych"); + return "Dokumentacja atrybutĂłw skĹ‚adowych"; } } /*! this is the text of a link put after brief descriptions. */ QCString trMore() - { return decode("Więcej..."); } + { return "WiÄ™cej..."; } /*! put in the class documentation */ QCString trListOfAllMembers() - { return decode("Lista wszystkich składowych."); } + { return "Lista wszystkich skĹ‚adowych."; } /*! used as the title of the "list of all members" page of a class */ QCString trMemberList() - { return decode("Lista składowych"); } + { return "Lista skĹ‚adowych"; } /*! this is the first part of a sentence that is followed by a class name */ QCString trThisIsTheListOfAllMembers() - { return "To jest kompletna lista składowych dla "; } + { return "To jest kompletna lista skĹ‚adowych dla "; } /*! this is the remainder of the sentence after the class name */ QCString trIncludingInheritedMembers() - { return decode(", uwzględniaj±ca wszystkie dziedziczone składowe."); } + { return ", uwzglÄ™dniajÄ…ca wszystkie dziedziczone skĹ‚adowe."; } /*! this is put at the author sections at the bottom of man pages. * parameter s is name of the project name. */ QCString trGeneratedAutomatically(const char *s) - { QCString result=decode("Wygenerowano automatycznie z kodu Ľródłowego programem Doxygen"); + { QCString result="Wygenerowano automatycznie z kodu ĹşrĂłdĹ‚owego programem Doxygen"; if (s) result+=(QCString)" dla "+s; result+="."; return result; @@ -147,7 +127,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! put after an enum value in the list of all members */ QCString trEnumValue() - { return decode("warto¶ć wyliczenia"); } + { return "wartość wyliczenia"; } /*! put after an undocumented member in the list of all members */ QCString trDefinedIn() @@ -159,7 +139,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 * compounds or files (see the \\group command). */ QCString trModules() - { return decode("Moduły"); } + { return "ModuĹ‚y"; } /*! This is put above each page as a link to the class hierarchy */ QCString trClassHierarchy() @@ -180,11 +160,11 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! This is put above each page as a link to the list of documented files */ QCString trFileList() - { return decode("Lista plików"); } + { return "Lista plikĂłw"; } /*! This is put above each page as a link to the list of all verbatim headers */ QCString trHeaderFiles() - { return decode("Pliki nagłówkowe"); } + { return "Pliki nagĹ‚Ăłwkowe"; } /*! This is put above each page as a link to all members of compounds. */ QCString trCompoundMembers() @@ -195,7 +175,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 } else { - return decode("Składowe klas"); + return "SkĹ‚adowe klas"; } } @@ -208,7 +188,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 } else { - return decode("Składowe plików"); + return "SkĹ‚adowe plikĂłw"; } } @@ -218,7 +198,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! This is put above each page as a link to all examples. */ QCString trExamples() - { return decode("Przykłady"); } + { return "PrzykĹ‚ady"; } /*! This is put above each page as a link to the search engine. */ QCString trSearch() @@ -226,17 +206,17 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! This is an introduction to the class hierarchy. */ QCString trClassHierarchyDescription() - { return decode("Ta lista dziedziczenia posortowana jest z grubsza, " - "choć nie całkowicie, alfabetycznie:"); + { return "Ta lista dziedziczenia posortowana jest z grubsza, " + "choć nie caĹ‚kowicie, alfabetycznie:"; } /*! This is an introduction to the list with all files. */ QCString trFileListDescription(bool extractAll) { - QCString result="Tutaj znajduje się lista wszystkich "; + QCString result="Tutaj znajduje siÄ™ lista wszystkich "; if (!extractAll) result+="udokumentowanych "; - result+="plików z ich krótkimi opisami:"; - return decode(result); + result+="plikĂłw z ich krĂłtkimi opisami:"; + return result; } /*! This is an introduction to the annotated compound list. */ @@ -245,93 +225,93 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return decode("Tutaj znajduj± się struktury danych wraz z ich krótkimi opisami:"); + return "Tutaj znajdujÄ… siÄ™ struktury danych wraz z ich krĂłtkimi opisami:"; } else { - return decode("Tutaj znajduj± się klasy, struktury, " - "unie i interfejsy wraz z ich krótkimi opisami:"); + return "Tutaj znajdujÄ… siÄ™ klasy, struktury, " + "unie i interfejsy wraz z ich krĂłtkimi opisami:"; } } /*! This is an introduction to the page with all class members. */ QCString trCompoundMembersDescription(bool extractAll) { - QCString result="Tutaj znajduje się lista wszystkich "; + QCString result="Tutaj znajduje siÄ™ lista wszystkich "; if (!extractAll) { result+="udokumentowanych "; } if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="pól struktur i unii"; + result+="pĂłl struktur i unii"; } else { - result+="składowych"; + result+="skĹ‚adowych"; } - result+=" wraz z odno¶nikami do "; + result+=" wraz z odnoĹ›nikami do "; if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="dokumentacji struktur/unii dla każdego pola:"; + result+="dokumentacji struktur/unii dla kaĹĽdego pola:"; } else { - result+="dokumentacji klas dla każdej składowej:"; + result+="dokumentacji klas dla kaĹĽdej skĹ‚adowej:"; } } else { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="struktur/unii, do których dane pole należy:"; + result+="struktur/unii, do ktĂłrych dane pole naleĹĽy:"; } else { - result+="klas, do których dana składowa należy:"; + result+="klas, do ktĂłrych dana skĹ‚adowa naleĹĽy:"; } } - return decode(result); + return result; } /*! This is an introduction to the page with all file members. */ QCString trFileMembersDescription(bool extractAll) { - QCString result="Tutaj znajduje się lista wszystkich "; + QCString result="Tutaj znajduje siÄ™ lista wszystkich "; if (!extractAll) result+="udokumentowanych "; if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="funkcji, zmiennych, makr, wyliczeń i definicji typów"; + result+="funkcji, zmiennych, makr, wyliczeĹ„ i definicji typĂłw"; } else { - result+="składowych plików"; + result+="skĹ‚adowych plikĂłw"; } - result+=" wraz z odno¶nikami do "; + result+=" wraz z odnoĹ›nikami do "; if (extractAll) - result+="plików, do których one należ±:"; + result+="plikĂłw, do ktĂłrych one naleĹĽÄ…:"; else result+="dokumentacji:"; - return decode(result); + return result; } /*! This is an introduction to the page with the list of all header files. */ QCString trHeaderFilesDescription() - { return decode("Tutaj znajduj± się pliki nagłówkowe tworz±ce API:"); } + { return "Tutaj znajdujÄ… siÄ™ pliki nagĹ‚Ăłwkowe tworzÄ…ce API:"; } /*! This is an introduction to the page with the list of all examples */ QCString trExamplesDescription() - { return decode("Tutaj znajduje się lista wszystkich przykładów:"); } + { return "Tutaj znajduje siÄ™ lista wszystkich przykĹ‚adĂłw:"; } /*! This is an introduction to the page with the list of related pages */ QCString trRelatedPagesDescription() - { return decode("Tutaj znajduje się lista wszystkich stron dokumentacji:"); } + { return "Tutaj znajduje siÄ™ lista wszystkich stron dokumentacji:"; } /*! This is an introduction to the page with the list of class/file groups */ QCString trModulesDescription() - { return decode("Tutaj znajduje się lista wszystkich grup:"); } + { return "Tutaj znajduje siÄ™ lista wszystkich grup:"; } /*! This sentences is used in the annotated class/file lists if no brief * description is given. @@ -377,7 +357,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 * list of all files. */ QCString trFileIndex() - { return decode("Indeks plików"); } + { return "Indeks plikĂłw"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all groups. @@ -404,13 +384,13 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 * the documentation of all files. */ QCString trFileDocumentation() - { return decode("Dokumentacja plików"); } + { return "Dokumentacja plikĂłw"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all examples. */ QCString trExampleDocumentation() - { return decode("Dokumentacja przykładów"); } + { return "Dokumentacja przykĹ‚adĂłw"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all related pages. @@ -420,7 +400,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! This is used in LaTeX as the title of the document */ QCString trReferenceManual() - { return decode("Podręcznik"); } + { return "PodrÄ™cznik"; } /*! This is used in the documentation of a file as a header before the * list of defines @@ -438,7 +418,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 * list of typedefs */ QCString trTypedefs() - { return decode("Definicje typów"); } + { return "Definicje typĂłw"; } /*! This is used in the documentation of a file as a header before the * list of enumerations @@ -462,7 +442,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 * list of (global) variables */ QCString trEnumerationValues() - { return decode("Warto¶ci wyliczeń"); } + { return "WartoĹ›ci wyliczeĹ„"; } /*! This is used in the documentation of a file before the list of * documentation blocks for defines @@ -474,19 +454,19 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 * of documentation blocks for function prototypes */ QCString trFunctionPrototypeDocumentation() - { return decode("Dokumentacja prototypów funkcji"); } + { return "Dokumentacja prototypĂłw funkcji"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for typedefs */ QCString trTypedefDocumentation() - { return decode("Dokumentacja definicji typów"); } + { return "Dokumentacja definicji typĂłw"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration types */ QCString trEnumerationTypeDocumentation() - { return decode("Dokumentacja typów wyliczanych"); } + { return "Dokumentacja typĂłw wyliczanych"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for functions @@ -540,19 +520,19 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! this text is generated when the \\internal command is used. */ QCString trForInternalUseOnly() - { return decode("Tylko do użytku wewnętrznego."); } + { return "Tylko do uĹĽytku wewnÄ™trznego."; } /*! this text is generated when the \\reimp command is used. */ QCString trReimplementedForInternalReasons() - { return decode("Reimplementowana z wewnętrzych przyczyn; nie dotyczy API."); } + { return "Reimplementowana z wewnÄ™trzych przyczyn; nie dotyczy API."; } /*! this text is generated when the \\warning command is used. */ QCString trWarning() - { return decode("Ostrzeżenie"); } + { return "OstrzeĹĽenie"; } /*! this text is generated when the \\bug command is used. */ QCString trBugsAndLimitations() - { return decode("Błędy i ograniczenia"); } + { return "BĹ‚Ä™dy i ograniczenia"; } /*! this text is generated when the \\version command is used. */ QCString trVersion() @@ -568,7 +548,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! this text is generated when the \\sa command is used. */ QCString trSeeAlso() - { return decode("Zobacz również"); } + { return "Zobacz rĂłwnieĹĽ"; } /*! this text is generated when the \\param command is used. */ QCString trParameters() @@ -576,7 +556,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! this text is generated when the \\exception command is used. */ QCString trExceptions() - { return decode("Wyj±tki"); } + { return "WyjÄ…tki"; } /*! this text is used in the title page of a LaTeX document. */ QCString trGeneratedBy() @@ -591,10 +571,10 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! used as an introduction to the namespace list */ QCString trNamespaceListDescription(bool extractAll) { - QCString result="Tutaj znajduj± się wszystkie "; + QCString result="Tutaj znajdujÄ… siÄ™ wszystkie "; if (!extractAll) result+="udokumentowane "; - result+="przestrzenie nazw wraz z ich krótkimi opisami:"; - return decode(result); + result+="przestrzenie nazw wraz z ich krĂłtkimi opisami:"; + return result; } /*! used in the class documentation as a header before the list of all @@ -611,7 +591,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 * related classes */ QCString trRelatedFunctionDocumentation() - { return decode("Dokumentacja przyjaciół i funkcji zwi±zanych"); } + { return "Dokumentacja przyjaciół i funkcji zwiÄ…zanych"; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990425 @@ -630,12 +610,12 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 case ClassDef::Struct: result+=" struktury "; break; case ClassDef::Union: result+=" unii "; break; case ClassDef::Interface: result+=" interfejsu "; break; - case ClassDef::Protocol: result+=" protokołu "; break; + case ClassDef::Protocol: result+=" protokoĹ‚u "; break; case ClassDef::Category: result+=" kategorii "; break; - case ClassDef::Exception: result+=" wyj±tku "; break; + case ClassDef::Exception: result+=" wyjÄ…tku "; break; } result+=(QCString)clName; - return decode(result); + return result; } /*! used as the title of the HTML page of a file */ @@ -660,7 +640,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 QCString trPublicSlots() { return "Sloty publiczne"; } QCString trSignals() - { return decode("Sygnały"); } + { return "SygnaĹ‚y"; } QCString trStaticPublicMembers() { return "Statyczne metody publiczne"; } QCString trProtectedMembers() @@ -735,19 +715,19 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! This is put above each page as a link to all members of namespaces. */ QCString trNamespaceMembers() - { return decode("Składowe przestrzeni nazw"); } + { return "SkĹ‚adowe przestrzeni nazw"; } /*! This is an introduction to the page with all namespace members */ QCString trNamespaceMemberDescription(bool extractAll) { - QCString result="Tutaj znajduje się lista wszystkich "; + QCString result="Tutaj znajduje siÄ™ lista wszystkich "; if (!extractAll) result+="udokumentowanych "; - result+="składowych wraz z odno¶nikami do "; + result+="skĹ‚adowych wraz z odnoĹ›nikami do "; if (extractAll) - result+="dokumentacji przestrzeni nazw dla każdej składowej:"; + result+="dokumentacji przestrzeni nazw dla kaĹĽdej skĹ‚adowej:"; else - result+="przestrzeni nazw do których składowe te należ±:"; - return decode(result); + result+="przestrzeni nazw do ktĂłrych skĹ‚adowe te naleĹĽÄ…:"; + return result; } /*! This is used in LaTeX as the title of the chapter with the * index of all namespaces. @@ -789,13 +769,13 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 case ClassDef::Struct: result+="j struktury"; break; case ClassDef::Union: result+="j unii"; break; case ClassDef::Interface: result+="go interfejsu"; break; - case ClassDef::Protocol: result+="go protokołu"; break; + case ClassDef::Protocol: result+="go protokoĹ‚u"; break; case ClassDef::Category: result+="j kategorii"; break; - case ClassDef::Exception: result+="go wyj±tku"; break; + case ClassDef::Exception: result+="go wyjÄ…tku"; break; } - result+=" została wygenerowana z plik"; - if (single) result+="u:"; else result+="ów:"; - return decode(result); + result+=" zostaĹ‚a wygenerowana z plik"; + if (single) result+="u:"; else result+="Ăłw:"; + return result; } /*! This is in the (quick) index as a link to the alphabetical compound @@ -810,12 +790,12 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! This is used as the heading text for the retval command. */ QCString trReturnValues() - { return decode("Zwracane warto¶ci"); } + { return "Zwracane wartoĹ›ci"; } /*! This is in the (quick) index as a link to the main page (index.html) */ QCString trMainPage() - { return decode("Strona główna"); } + { return "Strona gĹ‚Ăłwna"; } /*! This is used in references to page that are put in the LaTeX * documentation. It should be an abbreviation of the word page. @@ -829,7 +809,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 QCString trSources() { - return decode("¬ródła"); + return "ĹąrĂłdĹ‚a"; } QCString trDefinedAtLineInSourceFile() { @@ -856,12 +836,12 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! this text is put before a collaboration diagram */ QCString trCollaborationDiagram(const char *clName) { - return (QCString)decode("Diagram współpracy dla ")+clName+":"; + return (QCString)"Diagram współpracy dla "+clName+":"; } /*! this text is put before an include dependency graph */ QCString trInclDepGraph(const char *fName) { - return (QCString)decode("Wykres zależno¶ci zał±czania dla ")+fName+":"; + return (QCString)"Wykres zaleĹĽnoĹ›ci zaĹ‚Ä…czania dla "+fName+":"; } /*! header that is put before the list of constructor/destructors. */ QCString trConstructorDocumentation() @@ -871,22 +851,22 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! Used in the file documentation to point to the corresponding sources. */ QCString trGotoSourceCode() { - return decode("IdĽ do kodu Ľródłowego tego pliku."); + return "IdĹş do kodu ĹşrĂłdĹ‚owego tego pliku."; } /*! Used in the file sources to point to the corresponding documentation. */ QCString trGotoDocumentation() { - return decode("IdĽ do dokumentacji tego pliku."); + return "IdĹş do dokumentacji tego pliku."; } /*! Text for the \\pre command */ QCString trPrecondition() { - return decode("Warunek wstępny"); + return "Warunek wstÄ™pny"; } /*! Text for the \\post command */ QCString trPostcondition() { - return decode("Warunek końcowy"); + return "Warunek koĹ„cowy"; } /*! Text for the \\invariant command */ QCString trInvariant() @@ -896,12 +876,12 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! Text shown before a multi-line variable/enum initialization */ QCString trInitialValue() { - return decode("Warto¶ć pocz±tkowa:"); + return "Wartość poczÄ…tkowa:"; } /*! Text used the source code in the file index */ QCString trCode() { - return decode("kod Ľródłowy"); + return "kod ĹşrĂłdĹ‚owy"; } QCString trGraphicalHierarchy() { @@ -909,11 +889,11 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 } QCString trGotoGraphicalHierarchy() { - return decode("IdĽ do graficznej hierarchi klas"); + return "IdĹş do graficznej hierarchi klas"; } QCString trGotoTextualHierarchy() { - return decode("IdĽ do tekstowej hierarchi klas"); + return "IdĹş do tekstowej hierarchi klas"; } QCString trPageIndex() { @@ -993,11 +973,11 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 QCString trReferencedBy() { - return decode("Odwołania w"); + return "OdwoĹ‚ania w"; } QCString trRemarks() { - return decode("Spostrzeżenia"); + return "SpostrzeĹĽenia"; } QCString trAttention() { @@ -1005,8 +985,8 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 } QCString trInclByDepGraph() { - return decode("Ten wykres pokazuje, które pliki bezpo¶rednio lub " - "po¶rednio zał±czaj± ten plik:"); + return "Ten wykres pokazuje, ktĂłre pliki bezpoĹ›rednio lub " + "poĹ›rednio zaĹ‚Ä…czajÄ… ten plik:"; } QCString trSince() { @@ -1025,10 +1005,10 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! page explaining how the dot graph's should be interpreted */ QCString trLegendDocs() { - return decode( - "Ta strona wyja¶nia jak interpretować wykresy, które s± wygenerowane " + return + "Ta strona wyjaĹ›nia jak interpretować wykresy, ktĂłre sÄ… wygenerowane " "przez doxygen.<p>\n" - "Rozważ następuj±cy przykład:\n" + "RozwaĹĽ nastÄ™pujÄ…cy przykĹ‚ad:\n" "\\code\n" "/*! Klasa Niewidzialna z powodu okrojenia */\n" "class Niewidzialna { };\n\n" @@ -1036,17 +1016,17 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 "class Okrojona : public Niewidzialna { };\n\n" "/* Klasa nie udokumentowana komentarzami doxygen */\n" "class Nieudokumentowana { };\n\n" - "/*! Klasa, która jest dziedziczona publicznie */\n" + "/*! Klasa, ktĂłra jest dziedziczona publicznie */\n" "class PublicznaBaza : public Okrojona { };\n\n" "/*! A template class */\n" "template<class T> class Templ { };\n\n" - "/*! Klasa, która jest dziedziczona przy użyciu dziedziczenia chronionego */\n" + "/*! Klasa, ktĂłra jest dziedziczona przy uĹĽyciu dziedziczenia chronionego */\n" "class ChronionaBaza { };\n\n" - "/*! Klasa, która jest dziedziczona prywatnie */\n" + "/*! Klasa, ktĂłra jest dziedziczona prywatnie */\n" "class PrywatnaBaza { };\n\n" - "/*! Klasa, która jest użyta przez klasę Dziedziczona */\n" + "/*! Klasa, ktĂłra jest uĹĽyta przez klasÄ™ Dziedziczona */\n" "class Uzyta { };\n\n" - "/*! Superklasa, która dziedziczy kilka innych klas */\n" + "/*! Superklasa, ktĂłra dziedziczy kilka innych klas */\n" "class Dziedziczona : public PublicznaBaza,\n" " protected ChronionaBaza,\n" " private PrywatnaBaza,\n" @@ -1057,30 +1037,32 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 " Uzyta *m_usedClass;\n" "};\n" "\\endcode\n" - "Je¶li znacznik \\c MAX_DOT_GRAPH_HEIGHT w pliku konfiguracji " - "jest ustawiony na 200, odniesie to rezultat w następuj±cym wykresie:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "Rezultat na nastÄ™pujÄ…cym wykresie:" + "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n" "<p>\n" - "Prostok±ty w powyższym wykresie maj± następuj±ce znaczenie:\n" + "ProstokÄ…ty w powyĹĽszym wykresie majÄ… nastÄ™pujÄ…ce znaczenie:\n" + "</p>\n" "<ul>\n" - "<li>Wypełniony czarny prostok±t reprezentuje strukturę lub klasę dla " - "której został wygenerowany wykres.\n" - "<li>Prostok±t z czarn± obwolut± oznacza udokumentowan± strukturę lub klasę.\n" - "<li>Prostok±t z szar± obwolut± oznacza nieudokumentowan± strukturę lub klasę.\n" - "<li>Prostok±t z czerwon± obwolut± oznacza udokumentowan± strukturę lub klasę dla\n" - "której nie s± pokazane wszystkie relacje dziedziczenia/zawierania. Wykres jest " - "okrojony, je¶li nie mie¶ci się w okre¶lonych brzegach." + "<li>WypeĹ‚niony czarny prostokÄ…t reprezentuje strukturÄ™ lub klasÄ™ dla " + "ktĂłrej zostaĹ‚ wygenerowany wykres.</li>\n" + "<li>ProstokÄ…t z czarnÄ… obwolutÄ… oznacza udokumentowanÄ… strukturÄ™ lub klasÄ™.</li>\n" + "<li>ProstokÄ…t z szarÄ… obwolutÄ… oznacza nieudokumentowanÄ… strukturÄ™ lub klasÄ™.</li>\n" + "<li>ProstokÄ…t z czerwonÄ… obwolutÄ… oznacza udokumentowanÄ… strukturÄ™ lub klasÄ™ dla\n" + "ktĂłrej nie sÄ… pokazane wszystkie relacje dziedziczenia/zawierania. Wykres jest " + "okrojony, jeĹ›li nie mieĹ›ci siÄ™ w okreĹ›lonych brzegach.</li>\n" "</ul>\n" - "Strzałki maj± następuj±ce znaczenie:\n" + "<p>\n" + "StrzaĹ‚ki majÄ… nastÄ™pujÄ…ce znaczenie:\n" + "<p>\n" "<ul>\n" - "<li>Ciemno niebieska strzałka jest używana do wizualizacji relacji " - "dziedziczenia publicznego pomiędzy dwiema klasami.\n" - "<li>Ciemno zielona strzałka jest używana dla dziedziczenia chronionego.\n" - "<li>Ciemno czerwona strzałka jest używana dla dziedziczenia prywatnego.\n" - "<li>Fioletowa przerywana strzałka jest używana je¶li klasa jest zawarta " - "lub użyta przez inn± klasę. Strzałka jest podpisana zmienn±(ymi) " - "przez które wskazywana klasa lub struktura jest dostępna. \n" - "</ul>\n"); + "<li>Ciemno niebieska strzaĹ‚ka jest uĹĽywana do wizualizacji relacji " + "dziedziczenia publicznego pomiÄ™dzy dwiema klasami.</li>\n" + "<li>Ciemno zielona strzaĹ‚ka jest uĹĽywana dla dziedziczenia chronionego.</li>\n" + "<li>Ciemno czerwona strzaĹ‚ka jest uĹĽywana dla dziedziczenia prywatnego.</li>\n" + "<li>Fioletowa przerywana strzaĹ‚ka jest uĹĽywana jeĹ›li klasa jest zawarta " + "lub uĹĽyta przez innÄ… klasÄ™. StrzaĹ‚ka jest podpisana zmiennÄ…(ymi) " + "przez ktĂłre wskazywana klasa lub struktura jest dostÄ™pna. </li>\n" + "</ul>\n"; } /*! text for the link to the legend page */ QCString trLegend() @@ -1119,12 +1101,12 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! Used as a section header for IDL properties */ virtual QCString trProperties() { - return decode("Wła¶ciwo¶ci"); + return "WĹ‚aĹ›ciwoĹ›ci"; } /*! Used as a section header for IDL property documentation */ virtual QCString trPropertyDocumentation() { - return decode("Dokumentacja wła¶ciwo¶ci"); + return "Dokumentacja wĹ‚aĹ›ciwoĹ›ci"; } ////////////////////////////////////////////////////////////////////////// // new since 1.2.4 @@ -1155,27 +1137,27 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! Title of the package index page */ virtual QCString trPackageList() { - return decode("Lista Pakietów"); + return "Lista PakietĂłw"; } /*! The description of the package index page */ virtual QCString trPackageListDescription() { - return decode("Oto lista pakietów wraz z krótkim opisem (o ile jest dostępny):"); + return "Oto lista pakietĂłw wraz z krĂłtkim opisem (o ile jest dostÄ™pny):"; } /*! The link name in the Quick links header for each page */ virtual QCString trPackages() { - return decode("Pakiety"); + return "Pakiety"; } /*! Used as a chapter title for Latex & RTF output */ virtual QCString trPackageDocumentation() { - return decode("Dokumentacja Pakietu"); + return "Dokumentacja Pakietu"; } /*! Text shown before a multi-line define */ virtual QCString trDefineValue() { - return decode("Warto¶ć:"); + return "Wartość:"; } ////////////////////////////////////////////////////////////////////////// @@ -1185,12 +1167,12 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! Used as a marker that is put before a \\bug item */ virtual QCString trBug() { - return decode("Bł±d"); + return "BĹ‚Ä…d"; } /*! Used as the header of the bug list */ virtual QCString trBugList() { - return decode("Lista błędów"); + return "Lista bĹ‚Ä™dĂłw"; } ////////////////////////////////////////////////////////////////////////// @@ -1212,7 +1194,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! Used as header RTF general index */ virtual QCString trRTFGeneralIndex() { - return decode("Indeks"); + return "Indeks"; } /*! This is used for translation of the word that will possibly @@ -1244,9 +1226,9 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 virtual QCString trNamespace(bool first_capital, bool singular) { QCString result((first_capital ? "Przestrze" : "przestrze")); - result+=(singular ? "ń" : "nie"); + result+=(singular ? "Ĺ„" : "nie"); result+=" nazw"; - return decode(result); + return result; } /*! This is used for translation of the word that will possibly @@ -1277,9 +1259,9 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 */ virtual QCString trMember(bool first_capital, bool singular) { - QCString result((first_capital ? "Składow" : "składow")); + QCString result((first_capital ? "SkĹ‚adow" : "skĹ‚adow")); result+=(singular ? "a" : "e"); - return decode(result); + return result; } /*! This is used for translation of the word that will possibly @@ -1325,7 +1307,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 */ virtual QCString trReferences() { - return decode("Odwołuje się do"); + return "OdwoĹ‚uje siÄ™ do"; } @@ -1353,7 +1335,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 */ virtual QCString trRTFTableOfContents() { - return decode("Spis tre¶ci"); + return "Spis treĹ›ci"; } ////////////////////////////////////////////////////////////////////////// @@ -1365,7 +1347,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 */ virtual QCString trDeprecatedList() { - return decode("Lista elementów do wycofania"); + return "Lista elementĂłw do wycofania"; } ////////////////////////////////////////////////////////////////////////// @@ -1382,7 +1364,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! Header used for the documentation section of a class' events. */ virtual QCString trEventDocumentation() { - return decode("Dokumentacja zdarzeń"); + return "Dokumentacja zdarzeĹ„"; } ////////////////////////////////////////////////////////////////////////// @@ -1438,7 +1420,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! Put in front of the call graph for a function. */ virtual QCString trCallGraph() { - return "Oto graf wywołań dla tej funkcji:"; + return "Oto graf wywoĹ‚aĹ„ dla tej funkcji:"; } ////////////////////////////////////////////////////////////////////////// @@ -1472,22 +1454,22 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 { if (numDocuments==0) { - return "Niestety żaden dokument nie pasuje do twojego zapytania."; + return "Niestety ĹĽaden dokument nie pasuje do twojego zapytania."; } else if (numDocuments==1) { - return "Znaleziono <b>1</b> dokument pasuj±cy do twojego zapytania."; + return "Znaleziono <b>1</b> dokument pasujÄ…cy do twojego zapytania."; } int count = numDocuments % 10; if ((count>=2) && (count<=4)) { - return "Znaleziono <b>$num</b> dokumenty pasuj±ce do twojego zapytania. " - "Najlepiej pasuj±ce dokumenty wy¶wietlane s± na pocz±tku listy."; + return "Znaleziono <b>$num</b> dokumenty pasujÄ…ce do twojego zapytania. " + "Najlepiej pasujÄ…ce dokumenty wyĹ›wietlane sÄ… na poczÄ…tku listy."; } else { - return "Znaleziono <b>$num</b> dokumentów pasuj±cych do twojego zapytania. " - "Najlepiej pasuj±ce dokumenty wy¶wietlane s± na pocz±tku listy."; + return "Znaleziono <b>$num</b> dokumentĂłw pasujÄ…cych do twojego zapytania. " + "Najlepiej pasujÄ…ce dokumenty wyĹ›wietlane sÄ… na poczÄ…tku listy."; } } /*! This string is put before the list of matched words, for each search @@ -1495,7 +1477,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 */ virtual QCString trSearchMatches() { - return "Pasuj±ce słowa:"; + return "PasujÄ…ce sĹ‚owa:"; } ////////////////////////////////////////////////////////////////////////// @@ -1506,7 +1488,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 */ virtual QCString trSourceFile(QCString& filename) { - return "Plik Ľródłowy " + filename; + return "Plik ĹşrĂłdĹ‚owy " + filename; } ////////////////////////////////////////////////////////////////////////// @@ -1517,13 +1499,13 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 * hierarchy. */ virtual QCString trDirIndex() - { return "Struktura katalogów"; } + { return "Struktura katalogĂłw"; } /*! This is used as the name of the chapter containing the documentation * of the directories. */ virtual QCString trDirDocumentation() - { return "Dokumentacja katalogów"; } + { return "Dokumentacja katalogĂłw"; } /*! This is used as the title of the directory index and also in the * Quick links of a HTML page, to link to the directory hierarchy. @@ -1536,8 +1518,8 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 */ virtual QCString trDirDescription() { - return "Ta struktura katalogów jest posortowana jest z grubsza, " - "choć nie całkowicie, alfabetycznie:"; + return "Ta struktura katalogĂłw jest posortowana jest z grubsza, " + "choć nie caĹ‚kowicie, alfabetycznie:"; } /*! This returns the title of a directory page. The name of the @@ -1565,8 +1547,8 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 */ virtual QCString trOverloadText() { - return "To jest metoda przeci±żona, udostępniona dla wygody. " - "Różni się od powyższej metody tylko zestawem akceptowanych argumentów."; + return "To jest metoda przeciÄ…ĹĽona, udostÄ™pniona dla wygody. " + "Różni siÄ™ od powyĹĽszej metody tylko zestawem akceptowanych argumentĂłw."; } ////////////////////////////////////////////////////////////////////////// @@ -1576,14 +1558,14 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! This is used to introduce a caller (or called-by) graph */ virtual QCString trCallerGraph() { - return "Oto graf wywoływań tej funkcji:"; + return "Oto graf wywoĹ‚ywaĹ„ tej funkcji:"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration values */ virtual QCString trEnumerationValueDocumentation() - { return "Dokumentacja wyliczeń"; } //TODO check if it is correct translation + { return "Dokumentacja wyliczeĹ„"; } //TODO check if it is correct translation ////////////////////////////////////////////////////////////////////////// // new since 1.5.4 (mainly for Fortran) @@ -1591,11 +1573,11 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! header that is put before the list of member subprograms (Fortran). */ virtual QCString trMemberFunctionDocumentationFortran() - { return "Dokumentacja składowej funkcji/podprogramu"; } + { return "Dokumentacja skĹ‚adowej funkcji/podprogramu"; } /*! This is put above each page as a link to the list of annotated data types (Fortran). */ virtual QCString trCompoundListFortran() - { return "Lista typów danych"; } + { return "Lista typĂłw danych"; } /*! This is put above each page as a link to all members of compounds (Fortran). */ virtual QCString trCompoundMembersFortran() @@ -1603,25 +1585,25 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! This is an introduction to the annotated compound list (Fortran). */ virtual QCString trCompoundListDescriptionFortran() - { return "Tutaj znajduj± się typy danych z ich krótkimi opisami:"; } + { return "Tutaj znajdujÄ… siÄ™ typy danych z ich krĂłtkimi opisami:"; } /*! This is an introduction to the page with all data types (Fortran). */ virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) { - QCString result="Tutaj znajduje się lista wszystkich "; + QCString result="Tutaj znajduje siÄ™ lista wszystkich "; if (!extractAll) { result+="udokumentowanych "; } - result+="składowych typów danych"; - result+=" wraz z odno¶nikami do "; + result+="skĹ‚adowych typĂłw danych"; + result+=" wraz z odnoĹ›nikami do "; if (!extractAll) { - result+="dokumentacji struktury danych dla każdej składowej"; + result+="dokumentacji struktury danych dla kaĹĽdej skĹ‚adowej"; } else { - result+="typów danych, do których dana składowa należy:"; + result+="typĂłw danych, do ktĂłrych dana skĹ‚adowa naleĹĽy:"; } return result; } @@ -1630,13 +1612,13 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 * annotated compound index (Fortran). */ virtual QCString trCompoundIndexFortran() - { return "Indeks typów danych"; } + { return "Indeks typĂłw danych"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all data types (Fortran). */ virtual QCString trTypeDocumentation() - { return "Dokumentacja typów danych"; } + { return "Dokumentacja typĂłw danych"; } /*! This is used in the documentation of a file as a header before the * list of (global) subprograms (Fortran). @@ -1658,14 +1640,14 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! used as the title of page containing all the index of all modules (Fortran). */ virtual QCString trModulesList() - { return "Lista modułów"; } + { return "Lista moduĹ‚Ăłw"; } /*! used as an introduction to the modules list (Fortran) */ virtual QCString trModulesListDescription(bool extractAll) { - QCString result="Tutaj znajduje się lista wszystkich "; + QCString result="Tutaj znajduje siÄ™ lista wszystkich "; if (!extractAll) result+="udokumentowanych "; - result+="modułów z ich krótkimi opisami:"; + result+="moduĹ‚Ăłw z ich krĂłtkimi opisami:"; return result; } @@ -1678,13 +1660,13 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 if (isTemplate) result+=" szablonu"; switch(compType) { - case ClassDef::Class: result+=" modułu "; break; + case ClassDef::Class: result+=" moduĹ‚u "; break; case ClassDef::Struct: result+=" typu "; break; case ClassDef::Union: result+=" unii "; break; case ClassDef::Interface: result+=" interfejsu "; break; - case ClassDef::Protocol: result+=" protokołu "; break; + case ClassDef::Protocol: result+=" protokoĹ‚u "; break; case ClassDef::Category: result+=" kategorii "; break; - case ClassDef::Exception: result+=" wyj±tku "; break; + case ClassDef::Exception: result+=" wyjÄ…tku "; break; } result+=(QCString)clName; return result; @@ -1692,28 +1674,28 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! used as the title of the HTML page of a module (Fortran) */ virtual QCString trModuleReference(const char *namespaceName) { - QCString result="Dokumentacja modułu "; + QCString result="Dokumentacja moduĹ‚u "; result+=namespaceName; return result; } /*! This is put above each page as a link to all members of modules. (Fortran) */ virtual QCString trModulesMembers() - { return "Składowe modułu"; } + { return "SkĹ‚adowe moduĹ‚u"; } /*! This is an introduction to the page with all modules members (Fortran) */ virtual QCString trModulesMemberDescription(bool extractAll) { - QCString result="Tutaj znajduje się lista wszystkich "; + QCString result="Tutaj znajduje siÄ™ lista wszystkich "; if (!extractAll) result+="udokumentowanych "; - result+="składowych modułów wraz z odno¶nikami do "; + result+="skĹ‚adowych moduĹ‚Ăłw wraz z odnoĹ›nikami do "; if (extractAll) { - result+="dokumentacji modułu dla każdej składowej:"; + result+="dokumentacji moduĹ‚u dla kaĹĽdej skĹ‚adowej:"; } else { - result+="modułów do których składowe te należ±:"; + result+="moduĹ‚Ăłw do ktĂłrych skĹ‚adowe te naleĹĽÄ…:"; } return result; } @@ -1722,7 +1704,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 * index of all modules (Fortran). */ virtual QCString trModulesIndex() - { return "Indeks modułu"; } + { return "Indeks moduĹ‚u"; } /*! This is used for translation of the word that will possibly * be followed by a single name or by a list of names @@ -1730,7 +1712,7 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 */ virtual QCString trModule(bool first_capital, bool singular) { - QCString result((first_capital ? "Moduł" : "moduł")); + QCString result((first_capital ? "ModuĹ‚" : "moduĹ‚")); if (!singular) result+="y"; return result; } @@ -1744,17 +1726,17 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 QCString result=(QCString)"Dokumentacja dla te"; switch(compType) { - case ClassDef::Class: result+="go modułu"; break; + case ClassDef::Class: result+="go moduĹ‚u"; break; case ClassDef::Struct: result+="go typu"; break; case ClassDef::Union: result+="j unii"; break; case ClassDef::Interface: result+="go interfejsu"; break; - case ClassDef::Protocol: result+="go protokołu"; break; + case ClassDef::Protocol: result+="go protokoĹ‚u"; break; case ClassDef::Category: result+="j kategorii"; break; - case ClassDef::Exception: result+="go wyj±tku"; break; + case ClassDef::Exception: result+="go wyjÄ…tku"; break; } - result+=" została wygenerowana z plik"; - if (single) result+="u:"; else result+="ów:"; - return decode(result); + result+=" zostaĹ‚a wygenerowana z plik"; + if (single) result+="u:"; else result+="Ăłw:"; + return result; } /*! This is used for translation of the word that will possibly * be followed by a single name or by a list of names @@ -1780,8 +1762,43 @@ class TranslatorPolish : public TranslatorAdapter_1_6_0 /*! C# Type Constraint list */ virtual QCString trTypeConstraints() { - return "Więzy typów"; //TODO check if it is correct translation + return "WiÄ™zy typĂłw"; //TODO check if it is correct translation + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.0 (mainly for the new search engine) +////////////////////////////////////////////////////////////////////////// + + /*! directory relation for \a name */ + virtual QCString trDirRelation(const char *name) + { + return "Relcja "+ QCString(name); } + + /*! Loading message shown when loading search results */ + virtual QCString trLoading() + { + return "Wczytywanie..."; + } + + /*! Label used for search results in the global namespace */ + virtual QCString trGlobalNamespace() + { + return "Globalna przestrzeĹ„ nazw"; + } + + /*! Message shown while searching */ + virtual QCString trSearching() + { + return "Szukanie..."; + } + + /*! Text shown when no search results are found */ + virtual QCString trNoMatches() + { + return "Brak dopasowaĹ„"; + } + }; #endif diff --git a/src/util.cpp b/src/util.cpp index c164c2d..3a96fce 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -49,6 +49,7 @@ #include "textdocvisitor.h" #include "portable.h" #include "parserintf.h" +#include "bufstr.h" #define ENABLE_TRACINGSUPPORT 0 @@ -5515,31 +5516,48 @@ QCString substituteTemplateArgumentsInString( { //printf("n=%s formArg->type='%s' formArg->name='%s' formArg->defval='%s'\n", // n.data(),formArg->type.data(),formArg->name.data(),formArg->defval.data()); + //printf(">> formArg->name='%s' actArg->type='%s' actArg->name='%s'\n", + // formArg->name.data(),actArg->type.data(),actArg->name.data() + // ); if (formArg->name==n && actArg && !actArg->type.isEmpty()) // base class is a template argument { // replace formal argument with the actual argument of the instance - if (actArg->name.isEmpty()) + if (!leftScopeMatch(actArg->type,n)) + // the scope guard is to prevent recursive lockup for + // template<class A> class C : public<A::T>, + // where A::T would become A::T::T here, + // since n==A and actArg->type==A::T + // see bug595833 for an example { - result += actArg->type+" "; - } - else // for case where the actual arg is something like "unsigned int" - // the "int" part is in actArg->name. - { - result += actArg->type+" "+actArg->name+" "; + if (actArg->name.isEmpty()) + { + result += actArg->type+" "; + found=TRUE; + } + else + // for case where the actual arg is something like "unsigned int" + // the "int" part is in actArg->name. + { + result += actArg->type+" "+actArg->name+" "; + found=TRUE; + } } - found=TRUE; } - else if (formArg->name==n && actArg==0 && !formArg->defval.isEmpty() && - formArg->defval!=name /* to prevent recursion */ + else if (formArg->name==n && + actArg==0 && + !formArg->defval.isEmpty() && + formArg->defval!=name /* to prevent recursion */ ) { result += substituteTemplateArgumentsInString(formArg->defval,formalArgs,actualArgs)+" "; found=TRUE; } } - else if (formArg->name==n && actArg==0 && !formArg->defval.isEmpty() && - formArg->defval!=name /* to prevent recursion */ - ) + else if (formArg->name==n && + actArg==0 && + !formArg->defval.isEmpty() && + formArg->defval!=name /* to prevent recursion */ + ) { result += substituteTemplateArgumentsInString(formArg->defval,formalArgs,actualArgs)+" "; found=TRUE; @@ -5777,12 +5795,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, pd->setReference(tagInfo->tagName); } - QCString pageName; - if (Config_getBool("CASE_SENSE_NAMES")) - pageName=pd->name(); - else - pageName=pd->name().lower(); - pd->setFileName(pageName); + pd->setFileName(convertNameToFile(pd->name(),FALSE)); //printf("Appending page `%s'\n",baseName.data()); Doxygen::pageSDict->append(baseName,pd); @@ -5799,13 +5812,9 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, { file=gd->getOutputFileBase(); } - else if (pd->getGroupDef()) + else { - file=pd->getGroupDef()->getOutputFileBase().copy(); - } - else - { - file=pageName; + file=pd->getOutputFileBase(); } SectionInfo *si=new SectionInfo( file,pd->name(),pd->title(),SectionInfo::Page,pd->getReference()); @@ -5814,7 +5823,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, // si->fileName.data()); //printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data()); //printf("Adding section key=%s si->fileName=%s\n",pageName.data(),si->fileName.data()); - Doxygen::sectionDict.insert(pageName,si); + Doxygen::sectionDict.insert(pd->name(),si); } } return pd; @@ -5823,6 +5832,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, //---------------------------------------------------------------------------- void addRefItem(const QList<ListItemInfo> *sli, + const char *key, const char *prefix, const char *name,const char *title,const char *args) { //printf("addRefItem(sli=%p,prefix=%s,name=%s,title=%s,args=%s)\n",sli,prefix,name,title,args); @@ -5834,7 +5844,6 @@ void addRefItem(const QList<ListItemInfo> *sli, { RefList *refList = Doxygen::xrefLists->find(lii->type); if (refList -#if 0 && ( // either not a built-in list or the list is enabled @@ -5843,7 +5852,6 @@ void addRefItem(const QList<ListItemInfo> *sli, (lii->type!="bug" || Config_getBool("GENERATE_BUGLIST")) && (lii->type!="deprecated" || Config_getBool("GENERATE_DEPRECATEDLIST")) ) -#endif ) { RefItem *item = refList->getRefItem(lii->itemId); @@ -5854,7 +5862,7 @@ void addRefItem(const QList<ListItemInfo> *sli, item->title = title; item->args = args; - refList->insertIntoList(title,item); + refList->insertIntoList(key,item); #if 0 @@ -6843,3 +6851,121 @@ void stackTrace() #endif } +static int transcodeCharacterBuffer(BufStr &srcBuf,int size, + const char *inputEncoding,const char *outputEncoding) +{ + if (inputEncoding==0 || outputEncoding==0) return size; + if (qstricmp(inputEncoding,outputEncoding)==0) return size; + void *cd = portable_iconv_open(outputEncoding,inputEncoding); + if (cd==(void *)(-1)) + { + err("Error: unsupported character conversion: '%s'->'%s': %s\n" + "Check the INPUT_ENCODING setting in the config file!\n", + inputEncoding,outputEncoding,strerror(errno)); + exit(1); + } + int tmpBufSize=size*4+1; + BufStr tmpBuf(tmpBufSize); + size_t iLeft=size; + size_t oLeft=tmpBufSize; + const char *srcPtr = srcBuf.data(); + char *dstPtr = tmpBuf.data(); + uint newSize=0; + if (!portable_iconv(cd, &srcPtr, &iLeft, &dstPtr, &oLeft)) + { + newSize = tmpBufSize-oLeft; + srcBuf.shrink(newSize); + strncpy(srcBuf.data(),tmpBuf.data(),newSize); + //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data()); + } + else + { + err("Error: failed to translate characters from %s to %s: check INPUT_ENCODING\n", + inputEncoding,outputEncoding); + exit(1); + } + portable_iconv_close(cd); + return newSize; +} + +//! read a file name \a fileName and optionally filter and transcode it +bool readInputFile(const char *fileName,BufStr &inBuf) +{ + // try to open file + int size=0; + //uint oldPos = dest.curPos(); + //printf(".......oldPos=%d\n",oldPos); + + QFileInfo fi(fileName); + if (!fi.exists()) return FALSE; + QCString filterName = getFileFilter(fileName); + if (filterName.isEmpty()) + { + QFile f(fileName); + if (!f.open(IO_ReadOnly)) + { + err("Error: could not open file %s\n",fileName); + return FALSE; + } + size=fi.size(); + // read the file + inBuf.skip(size); + if (f.readBlock(inBuf.data()/*+oldPos*/,size)!=size) + { + err("Error while reading file %s\n",fileName); + return FALSE; + } + } + else + { + QCString cmd=filterName+" \""+fileName+"\""; + Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data()); + FILE *f=portable_popen(cmd,"r"); + if (!f) + { + err("Error: could not execute filter %s\n",filterName.data()); + return FALSE; + } + const int bufSize=1024; + char buf[bufSize]; + int numRead; + while ((numRead=fread(buf,1,bufSize,f))>0) + { + //printf(">>>>>>>>Reading %d bytes\n",numRead); + inBuf.addArray(buf,numRead),size+=numRead; + } + portable_pclose(f); + } + + if (inBuf.size()>=2 && + ((inBuf.at(0)==-1 && inBuf.at(1)==-2) || // Litte endian BOM + (inBuf.at(0)==-2 && inBuf.at(1)==-1) // big endian BOM + ) + ) // UCS-2 encoded file + { + transcodeCharacterBuffer(inBuf,inBuf.curPos(), + "UCS-2","UTF-8"); + } + else // transcode according to the INPUT_ENCODING setting + { + // do character transcoding if needed. + transcodeCharacterBuffer(inBuf,inBuf.curPos(), + Config_getString("INPUT_ENCODING"),"UTF-8"); + } + + inBuf.addChar('\n'); /* to prevent problems under Windows ? */ + + // and translate CR's + size=inBuf.curPos(); + int newSize=filterCRLF(inBuf.data(),size); + //printf("filter char at %p size=%d newSize=%d\n",dest.data()+oldPos,size,newSize); + if (newSize!=size) // we removed chars + { + inBuf.shrink(newSize); // resize the array + //printf(".......resizing from %d to %d result=[%s]\n",oldPos+size,oldPos+newSize,dest.data()); + } + inBuf.at(inBuf.curPos())='\0'; + return TRUE; +} + + @@ -53,6 +53,7 @@ class PageDef; struct SectionInfo; class QDir; class Definition; +class BufStr; //-------------------------------------------------------------------- @@ -279,7 +280,8 @@ int getScopeFragment(const QCString &s,int p,int *l); int filterCRLF(char *buf,int len); void addRefItem(const QList<ListItemInfo> *sli,const char *prefix, - const char *name,const char *title,const char *args=0); + const char *key, + const char *name,const char *title,const char *args); PageDef *addRelatedPage(const char *name,const QCString &ptitle, const QCString &doc,QList<SectionInfo> *anchors, @@ -363,5 +365,8 @@ QCString convertCharEntitiesToUTF8(const QCString &s); bool usingTreeIndex(); void stackTrace(); +bool readInputFile(const char *fileName,BufStr &inBuf); + + #endif diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 27c2fa7..7abebc0 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -204,52 +204,32 @@ ClassDef *VhdlDocGen::getClass(const char *name) } /*! - * adds components to their entities + * adds architectures to their entity */ -void VhdlDocGen::computeVhdlComponentRelations(const QDict<EntryNav>& classEntries,FileStorage* g_storage) +void VhdlDocGen::computeVhdlComponentRelations() { ClassSDict::Iterator cli(*Doxygen::classSDict); - for (cli.toFirst();cli.current();++cli) cli.current()->visited=FALSE; - QDictIterator<EntryNav> edi(classEntries); - EntryNav *rootNav; - for (;(rootNav=edi.current());++edi) - { - ClassDef *cd; - rootNav->loadEntry(g_storage); - Entry *root = rootNav->entry(); - QCString bName=stripAnonymousNamespaceScope(rootNav->name()); - if ((cd=getClass(bName))) + for (cli.toFirst();cli.current();++cli) + { + cli.current()->visited=FALSE; + ClassDef * cd = cli.current(); + if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS) { - QListIterator<BaseInfo> bii(*root->extends); - BaseInfo *bi=0; - for (bii.toFirst();(bi=bii.current());++bii) + QCString bName=cd->name(); + int i=bName.find("::"); + if (i>0) { - ClassDef* baseDef=getClass(bi->name); - - if (baseDef && baseDef != cd) - { - QCString cc=VhdlDocGen::getClassName(cd); - ClassDef *ccdef=getClass(cc); - if (ccdef==0) break; - - int ii=ccdef->protection(); - int jj=baseDef->protection(); - - if (ii==VhdlDocGen::ENTITYCLASS && jj==VhdlDocGen::ENTITYCLASS && (ccdef !=baseDef)) - { - ccdef->insertBaseClass(baseDef,bi->name,Public,Normal,0); - baseDef->insertSubClass(ccdef,Public,bi->virt,0); - } - } - else - { - if (Config_getBool("WARNINGS")) - warn(rootNav->fileDef()->fileName().data(),root->startLine, "found component without entity: [%s]",bi->name.data()); - } - }//for - }//if - rootNav->releaseEntry(); - }// for + QCString entityName=bName.left(i); + ClassDef *classEntity=Doxygen::classSDict->find(entityName); + // entity for architecutre ? + if (classEntity) + { + classEntity->insertBaseClass(cd,bName,Public,Normal,0); + cd->insertSubClass(classEntity,Public,Normal,0); + } + } + } + } } // computeVhdlComponentRelations diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h index 6323489..7d1a4a2 100644 --- a/src/vhdldocgen.h +++ b/src/vhdldocgen.h @@ -105,7 +105,7 @@ class VhdlDocGen static void debugClassName(ClassSDict*); //static void MergeFuncDoc(Entry* p,Entry* root); - static void computeVhdlComponentRelations(const QDict<EntryNav>&,FileStorage*); + static void computeVhdlComponentRelations(); //static void addVariableToComponents(EntryNav *rootNav,ClassDef *cd, MemberDef::MemberType mtype, const QCString &name, bool fromAnnScope,MemberDef *fromAnnMemb,Protection prot,bool related); |