diff options
45 files changed, 807 insertions, 275 deletions
@@ -168,7 +168,7 @@ DOCSET_FEEDNAME = "Doxygen docs" DOCSET_BUNDLE_ID = org.doxygen.Doxygen DOCSET_PUBLISHER_ID = org.doxygen.Publisher DOCSET_PUBLISHER_NAME = Publisher -GENERATE_HTMLHELP = YES +GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO @@ -1,7 +1,7 @@ -DOXYGEN Version 1.7.3-20110123 +DOXYGEN Version 1.7.3-20110217 Please read the installation section of the manual (http://www.doxygen.org/install.html) for instructions. -------- -Dimitri van Heesch (23 January 2011) +Dimitri van Heesch (17 February 2011) @@ -1,4 +1,4 @@ -DOXYGEN Version 1.7.3_20110123 +DOXYGEN Version 1.7.3_20110217 Please read INSTALL for compilation instructions. @@ -26,4 +26,4 @@ forum. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (23 January 2011) +Dimitri van Heesch (dimitri@stack.nl) (17 February 2011) diff --git a/addon/doxywizard/wizard.cpp b/addon/doxywizard/wizard.cpp index 3c15622..ce989e7 100644 --- a/addon/doxywizard/wizard.cpp +++ b/addon/doxywizard/wizard.cpp @@ -2,6 +2,7 @@ #include "input.h" #include "doxywizard.h" +#include <math.h> #include <QtGui> // options configurable via the wizard @@ -20,7 +20,7 @@ doxygen_version_minor=7 doxygen_version_revision=3 #NOTE: Setting version_mmn to "NO" will omit mmn info from the package. -doxygen_version_mmn=20110123 +doxygen_version_mmn=20110217 bin_dirs=`echo $PATH | sed -e "s/:/ /g"` diff --git a/doc/config.doc b/doc/config.doc index 8c72a23..0a3b0ce 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -161,6 +161,7 @@ followed by the descriptions of the tags grouped by category. \refitem cfg_html_colorstyle_hue HTML_COLORSTYLE_HUE \refitem cfg_html_colorstyle_sat HTML_COLORSTYLE_SAT \refitem cfg_html_dynamic_sections HTML_DYNAMIC_SECTIONS +\refitem cfg_html_extra_files HTML_EXTRA_FILES \refitem cfg_html_file_extension HTML_FILE_EXTENSION \refitem cfg_html_footer HTML_FOOTER \refitem cfg_html_header HTML_HEADER @@ -185,6 +186,7 @@ followed by the descriptions of the tags grouped by category. \refitem cfg_javadoc_autobrief JAVADOC_AUTOBRIEF \refitem cfg_latex_batchmode LATEX_BATCHMODE \refitem cfg_latex_cmd_name LATEX_CMD_NAME +\refitem cfg_latex_footer LATEX_FOOTER \refitem cfg_latex_header LATEX_HEADER \refitem cfg_latex_hide_indices LATEX_HIDE_INDICES \refitem cfg_latex_output LATEX_OUTPUT @@ -1280,21 +1282,18 @@ AClass::ANamespace, ANamespace::*Test <dt>\c HTML_HEADER <dd> \addindex HTML_HEADER The \c HTML_HEADER tag can be used to specify a user-defined HTML - header file for each generated HTML page. To get valid HTML the header file - should contain at least a \c \<HTML\> and a \c \<BODY\> tag, but it is - good idea to include the style sheet that is generated by doxygen as well. - Minimal example: -\verbatim - <HTML> - <HEAD> - <TITLE>My title</TITLE> - <LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css"> - </HEAD> - <BODY BGCOLOR="#FFFFFF"> -\endverbatim + header file for each generated HTML page. If the tag is left blank doxygen will generate a standard header. + To get valid HTML the header file that + includes any scripts and style sheets that doxygen + needs, it is highly recommended to start with a default header using +\verbatim +doxygen -w html new_header.html new_footer.html new_stylesheet.css YourConfigFile +\endverbatim + and then modify the file \c new_header.html. + The following markers have a special meaning inside the header and footer: <dl> <dt><code>\$title</code><dd>will be replaced with the title of the page. @@ -1303,55 +1302,83 @@ AClass::ANamespace, ANamespace::*Test <dt><code>\$year</code><dd>will be replaces with the current year. <dt><code>\$doxygenversion</code><dd>will be replaced with the version of doxygen <dt><code>\$projectname</code><dd>will be replaced with the name of - the project (see \c PROJECT_NAME) + the project (see \ref cfg_project_name "PROJECT_NAME") <dt><code>\$projectnumber</code><dd>will be replaced with the project number - (see \c PROJECT_NUMBER) + (see \ref cfg_project_number "PROJECT_NUMBER") <dt><code>\$projectbrief</code><dd>will be replaced with the project brief - description (see \c PROJECT_BRIEF) + description (see \ref cfg_project_brief "PROJECT_BRIEF") <dt><code>\$projectlogo</code><dd>will be replaced with the project logo - (see \c PROJECT_LOGO) + (see \ref cfg_project_logo "PROJECT_LOGO") + <dt><code>\$treeview</code><dd>will be replaced with links to + the javascript and style sheets needed for the navigation tree + (or an empty string when \ref cfg_generate_treeview "GENERATE_TREEVIEW" + is disabled). + <dt><code>\$search</code><dd>will be replaced with a links to + the javascript and style sheets needed for the search engine + (or an empty string when \ref cfg_searchengine "SEARCHENGINE" + is disabled). + <dt><code>\$mathjax</code><dd>will be replaced with a links to + the javascript and style sheets needed for the MathJax feature + (or an empty string when \ref cfg_use_mathjax "USE_MATHJAX" is disabled). <dt><code>\$relpath\$</code><dd> If \c CREATE_SUBDIRS is enabled, the command <code>\$relpath\$</code> can be used to produce a relative path to the root of the HTML output directory, e.g. use \$relpath\$doxygen.css, to refer to the standard style sheet. </dl> - - See also section \ref doxygen_usage for information on how to generate - the default header that doxygen normally uses. - @note When using a custom header you are responsible - for the proper inclusion of any scripts and style sheets that doxygen - needs, which is dependent on the configuration options used. - It is adviced to generate a default header using + To cope with differences in the layout of the header and footer that depend on + configuration settings, the header can also contain special blocks that + will be copied to the output or skipped depending on the configuration. + Such blocks have the following form: \verbatim -doxygen -w html header.html footer.html stylesheet.css YourConfigFile + <!--BEGIN BLOCKNAME--> + Some context copied when condition BLOCKNAME holds + <!--END BLOCKNAME--> + <!--BEGIN !BLOCKNAME--> + Some context copied when condition BLOCKNAME does not hold + <!--END !BLOCKNAME--> \endverbatim - and then modify that header. + The following block names are supported: + <dl> + <dt><code>DISABLE_INDEX</code><dd>Content within this block is copied to the output + when the \ref cfg_disable_index "DISABLE_INDEX" option is enabled (so when the index is disabled). + <dt><code>GENERATE_TREEVIEW</code><dd>Content within this block is copied to the output + when the \ref cfg_generate_treeview "GENERATE_TREEVIEW" option is enabled. + <dt><code>SEARCHENGINE</code><dd>Content within this block is copied to the output + when the \ref cfg_searchengine "SEARCHENGINE" option is enabled. + <dt><code>PROJECT_NAME</code><dd>Content within the block is copied to the output + when the \ref cfg_project_name "PROJECT_NAME" option is not empty. + <dt><code>PROJECT_NUMBER</code><dd>Content within the block is copied to the output + when the \ref cfg_project_number "PROJECT_NUMBER" option is not empty. + <dt><code>PROJECT_BRIEF</code><dd>Content within the block is copied to the output + when the \ref cfg_project_brief "PROJECT_BRIEF" option is not empty. + <dt><code>PROJECT_LOGO</code><dd>Content within the block is copied to the output + when the \ref cfg_project_logo "PROJECT_LOGO" option is not empty. + <dt><code>TITLEAREA</code><dd>Content within this block is copied to the output + when a title is visible at the top of each page. This is the case + if either \ref cfg_project_name "PROJECT_NAME", + \ref cfg_project_brief "PROJECT_BRIEF", \ref cfg_project_logo "PROJECT_LOGO" + is filled in or if both \ref cfg_disable_index "DISABLE_INDEX" and + \ref cfg_searchengine "SEARCHENGINE" are enabled. + </dl> + + See also section \ref doxygen_usage for information on how to generate + the default header that doxygen normally uses. @note The header is subject to change so you typically - have to redo this when upgrading to a newer version of doxygen or when - changing the value of configuration settings such as \c GENERATE_TREEVIEW! + have to regenerate the default header when upgrading to a newer version of + doxygen. \anchor cfg_html_footer <dt>\c HTML_FOOTER <dd> \addindex HTML_FOOTER The \c HTML_FOOTER tag can be used to specify a user-defined HTML footer for - each generated HTML page. To get valid HTML the footer file should contain - at least a \c \</BODY\> and a \c \</HTML\> tag. A minimal example: -\verbatim - </BODY> - </HTML> -\endverbatim + each generated HTML page. If the tag is left blank doxygen will generate a standard footer. - The following commands have a special meaning inside the footer: - <code>\$title</code>, <code>\$datetime</code>, <code>\$date</code>, - <code>\$doxygenversion</code>, <code>\$projectname</code>, - <code>\$projectnumber</code>. - Doxygen will replace them by respectively - the title of the page, the current date and time, only the current date, - the version number of doxygen, the project name (see \c PROJECT_NAME), or the - project number (see \c PROJECT_NUMBER). + See \ref cfg_html_header "HTML_HEADER" for more information on + how to generate a default footer and what special commands can be + used inside the footer. See also section \ref doxygen_usage for information on how to generate the default footer that doxygen normally uses. @@ -1367,6 +1394,16 @@ doxygen -w html header.html footer.html stylesheet.css YourConfigFile See also section \ref doxygen_usage for information on how to generate the style sheet that doxygen normally uses. +\anchor cfg_html_extra_files +<dt>\c HTML_EXTRA_FILES <dd> + \addindex HTML_EXTRA_FILES + The \c HTML_EXTRA_FILES tag can be used to specify one or more extra images or + other source files which should be copied to the HTML output directory. Note + that these files will be copied to the base HTML output directory. Use the + $relpath$ marker in the \c HTML_HEADER and/or \c HTML_FOOTER files to load these + files. In the \c HTML_STYLESHEET file, use the file name only. Also note that + the files will be copied as-is; there are no commands or markers available. + \anchor cfg_html_colorstyle_hue <dt>\c HTML_COLORSTYLE_HUE <dd> \addindex HTML_COLOR_STYLE_HUE @@ -1821,6 +1858,14 @@ EXTRA_PACKAGES = times the title of the page, the current date and time, only the current date, the version number of doxygen, the project name (see \c PROJECT_NAME), or the project number (see \c PROJECT_NUMBER). + +\anchor cfg_latex_footer +<dt>\c LATEX_FOOTER <dd> + \addindex LATEX_FOOTER + The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for + the generated latex document. The footer should contain everything after + the last chapter. If it is left blank doxygen will generate a + standard footer. Notice: only use this tag if you know what you are doing! \anchor cfg_pdf_hyperlinks <dt>\c PDF_HYPERLINKS <dd> diff --git a/doc/doxygen.1 b/doc/doxygen.1 index 7006eb4..37e4adb 100644 --- a/doc/doxygen.1 +++ b/doc/doxygen.1 @@ -31,7 +31,7 @@ doxygen \fB\-w\fR rtf styleSheetFile HTML: doxygen \fB\-w\fR html headerFile footerFile styleSheetFile [configFile] .TP -LaTeX: doxygen \fB\-w\fR latex headerFile styleSheetFile [configFile] +LaTeX: doxygen \fB\-w\fR latex headerFile footerFile styleSheetFile [configFile] .TP 5) Use doxygen to generate an rtf extensions file .TP diff --git a/doc/language.doc b/doc/language.doc index f773ab6..9622e87 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -164,7 +164,7 @@ when the translator was updated. <td>Italian</td> <td>Alessandro Falappa<br/>Ahmed Aldo Faisal</td> <td>alessandro at falappa dot net<br/>aaf23 at cam dot ac dot uk</td> - <td>1.6.0</td> + <td>up-to-date</td> </tr> <tr bgcolor="#ffffff"> <td>Japanese</td> @@ -351,7 +351,7 @@ when the translator was updated. \hline Indonesian & Hendy Irawan & {\tt\tiny ceefour at gauldong dot net} & 1.4.6 \\ \hline - Italian & Alessandro Falappa & {\tt\tiny alessandro at falappa dot net} & 1.6.0 \\ + Italian & Alessandro Falappa & {\tt\tiny alessandro at falappa dot net} & up-to-date \\ ~ & Ahmed Aldo Faisal & {\tt\tiny aaf23 at cam dot ac dot uk} & ~ \\ \hline Japanese & Hiroki Iseri & {\tt\tiny goyoki at gmail dot com} & 1.6.0 \\ diff --git a/doc/translator_report.txt b/doc/translator_report.txt index 0d401aa..91bda18 100644 --- a/doc/translator_report.txt +++ b/doc/translator_report.txt @@ -10,7 +10,7 @@ Persian, Polish, Portuguese, Romanian, Russian, Serbian, SerbianCyrilic, Slovak, Slovene, Spanish, Swedish, Turkish, Ukrainian, and Vietnamese. -Of them, 14 translators are up-to-date, 24 translators are based on +Of them, 15 translators are up-to-date, 23 translators are based on some adapter class, and 2 are English based. ---------------------------------------------------------------------- @@ -28,6 +28,7 @@ still may be some details listed even for them: TranslatorEnglish TranslatorEsperanto TranslatorGreek + TranslatorItalian TranslatorKorean -- Change the base class to Translator. TranslatorPersian -- The MAX_DOT_GRAPH_HEIGHT found in trLegendDocs() TranslatorSlovak @@ -64,7 +65,6 @@ must be implemented to become up-to-date: TranslatorJapanese 1.6.0 9 methods to implement (4 %) Note: Reimplementation using UTF-8 suggested. - TranslatorItalian 1.6.0 9 methods to implement (4 %) TranslatorFinnish 1.6.0 9 methods to implement (4 %) TranslatorChinesetraditional 1.6.0 9 methods to implement (4 %) Note: Reimplementation using UTF-8 suggested. @@ -379,24 +379,6 @@ TranslatorIndonesian (TranslatorAdapter_1_4_6) 32 methods to implement (14 %) virtual QCString trNoDescriptionAvailable() -TranslatorItalian (TranslatorAdapter_1_6_0) 9 methods to implement (4 %) ------------------ - - Implements 216 of the required methods (96 %). - - Missing methods (should be implemented): - - virtual QCString trSearching() - virtual QCString trNoMatches() - virtual QCString trLoading() - virtual QCString trDateTime(int year, int month, int day, int dayOfWeek, int hour, int minutes, int seconds, bool includeTime) - virtual QCString trFileIn(const char * name) - virtual QCString trGlobalNamespace() - virtual QCString trDirRelation(const char * name) - virtual QCString trDirDependency(const char * name) - virtual QCString trIncludesFileIn(const char * name) - - TranslatorJapanese (TranslatorAdapter_1_6_0) 9 methods to implement (4 %) ------------------ diff --git a/qtools/Doxyfile b/qtools/Doxyfile index 9e2a9f4..329fb48 100644 --- a/qtools/Doxyfile +++ b/qtools/Doxyfile @@ -171,7 +171,7 @@ FORMULA_TRANSPARENT = YES USE_MATHJAX = NO MATHJAX_RELPATH = http://www.mathjax.org/mathjax SEARCHENGINE = YES -SERVER_BASED_SEARCH = NO +SERVER_BASED_SEARCH = YES #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- diff --git a/qtools/scstring.cpp b/qtools/scstring.cpp index 698e036..26d3a52 100644 --- a/qtools/scstring.cpp +++ b/qtools/scstring.cpp @@ -141,15 +141,16 @@ SCString &SCString::sprintf( const char *format, ... ) va_list ap; va_start( ap, format ); uint l = length(); - const uint minlen=256; + const uint minlen=4095; if (l<minlen) { if (m_data) - m_data = (char *)realloc(m_data,minlen); + m_data = (char *)realloc(m_data,minlen+1); else - m_data = (char *)malloc(minlen); + m_data = (char *)malloc(minlen+1); + m_data[minlen]='\0'; } - vsprintf( m_data, format, ap ); + vsnprintf( m_data, minlen, format, ap ); resize( qstrlen(m_data) + 1 ); // truncate va_end( ap ); return *this; @@ -1889,16 +1889,15 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} //FileInfo *f; bool ambig; bool found=FALSE; - FileDef *fd=0; - QCString absPath = yytext; - if (g_sourceFileDef && QDir::isRelativePath(absPath)) - { - absPath = QDir::cleanDirPath(g_sourceFileDef->getPath()+"/"+absPath); - } + //QCString absPath = yytext; + //if (g_sourceFileDef && QDir::isRelativePath(absPath)) + //{ + // absPath = QDir::cleanDirPath(g_sourceFileDef->getPath()+"/"+absPath); + //} - //printf("looking for include %s -> %s\n",yytext,absPath.data()); - if ((fd=findFileDef(Doxygen::inputNameDict,absPath,ambig)) && - fd->isLinkable()) + FileDef *fd=findFileDef(Doxygen::inputNameDict,yytext,ambig); + //printf("looking for include %s -> %s fd=%p\n",yytext,absPath.data(),fd); + if (fd && fd->isLinkable()) { if (ambig) // multiple input files match the name { @@ -1925,9 +1924,9 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} found = TRUE; } } + //printf(" include file %s found=%d\n",fd ? fd->absFilePath().data() : "<none>",found); if (found) { - //printf(" include file %s found=%d\n",fd->absFilePath().data(),found); g_code->writeCodeLink(fd->getReference(),fd->getOutputFileBase(),0,yytext,fd->briefDescriptionAsTooltip()); } else diff --git a/src/commentscan.l b/src/commentscan.l index d224600..3284e57 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -2381,7 +2381,8 @@ static bool handleInternal(const QCString &) } else { - //addOutput("\\internal "); + // re-enabled for bug640828 + addOutput("\\internal "); } return FALSE; } diff --git a/src/config.xml b/src/config.xml index d08c996..cbdcb42 100644 --- a/src/config.xml +++ b/src/config.xml @@ -804,6 +804,14 @@ will generate a default style sheet. Note that doxygen will try to copy the style sheet file to the HTML output directory, so don't put your own stylesheet in the HTML output directory as well, or it will be erased! ' defval='' depends='GENERATE_HTML'/> + <option type='list' id='HTML_EXTRA_FILES' format='file' docs=' +The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +other source files which should be copied to the HTML output directory. Note +that these files will be copied to the base HTML output directory. Use the +$relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +files. In the HTML_STYLESHEET file, use the file name only. Also note that +the files will be copied as-is; there are no commands or markers available. +' depends='GENERATE_HTML'/> <option type='int' id='HTML_COLORSTYLE_HUE' docs=' The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen will adjust the colors in the stylesheet and background images @@ -1105,6 +1113,12 @@ the generated latex document. The header should contain everything until the first chapter. If it is left blank doxygen will generate a standard header. Notice: only use this tag if you know what you are doing! ' defval='' depends='GENERATE_LATEX'/> + <option type='string' id='LATEX_FOOTER' format='file' docs=' +The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +the generated latex document. The footer should contain everything after +the last chapter. If it is left blank doxygen will generate a +standard footer. Notice: only use this tag if you know what you are doing! +' defval='' depends='GENERATE_LATEX'/> <option type='bool' id='PDF_HYPERLINKS' docs=' If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is prepared for conversion to pdf (using ps2pdf). The pdf file will diff --git a/src/configoptions.cpp b/src/configoptions.cpp index 4fdaf90..716576d 100644 --- a/src/configoptions.cpp +++ b/src/configoptions.cpp @@ -1151,6 +1151,18 @@ void addConfigOptions(Config *cfg) cs->setWidgetType(ConfigString::File); cs->addDependency("GENERATE_HTML"); //---- + cl = cfg->addList( + "HTML_EXTRA_FILES", + "The HTML_EXTRA_FILES tag can be used to specify one or more extra images or\n" + "other source files which should be copied to the HTML output directory. Note\n" + "that these files will be copied to the base HTML output directory. Use the\n" + "$relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these\n" + "files. In the HTML_STYLESHEET file, use the file name only. Also note that\n" + "the files will be copied as-is; there are no commands or markers available." + ); + cl->addDependency("GENERATE_HTML"); + cl->setWidgetType(ConfigList::File); + //---- ci = cfg->addInt( "HTML_COLORSTYLE_HUE", "The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.\n" @@ -1638,6 +1650,16 @@ void addConfigOptions(Config *cfg) cs->setWidgetType(ConfigString::File); cs->addDependency("GENERATE_LATEX"); //---- + cs = cfg->addString( + "LATEX_FOOTER", + "The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for\n" + "the generated latex document. The footer should contain everything after\n" + "the last chapter. If it is left blank doxygen will generate a\n" + "standard footer. Notice: only use this tag if you know what you are doing!" + ); + cs->setWidgetType(ConfigString::File); + cs->addDependency("GENERATE_LATEX"); + //---- cb = cfg->addBool( "PDF_HYPERLINKS", "If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated\n" diff --git a/src/docparser.cpp b/src/docparser.cpp index 94a1dfb..d27308c 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -5424,7 +5424,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta g_hasReturnCommand=TRUE; break; case XML_TERM: - m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Bold,TRUE)); + //m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Bold,TRUE)); if (insideTable(this)) { retval=RetVal_TableCell; @@ -5506,19 +5506,19 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta QCString type; findAttribute(tagHtmlAttribs,"type",&type); DocHtmlList::Type listType = DocHtmlList::Unordered; + HtmlAttribList emptyList; if (type=="number") { listType=DocHtmlList::Ordered; } if (type=="table") { - DocHtmlTable *table = new DocHtmlTable(this,tagHtmlAttribs); + DocHtmlTable *table = new DocHtmlTable(this,emptyList); m_children.append(table); retval=table->parseXml(); } else { - HtmlAttribList emptyList; DocHtmlList *list = new DocHtmlList(this,emptyList,listType); m_children.append(list); retval=list->parseXml(); @@ -5671,7 +5671,7 @@ int DocPara::handleHtmlEndTag(const QCString &tagName) break; case XML_TERM: - m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Bold,FALSE)); + //m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Bold,FALSE)); break; case XML_SUMMARY: case XML_REMARKS: diff --git a/src/docparser.h b/src/docparser.h index af5f85d..39f0fe5 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -451,7 +451,7 @@ class DocFormula : public DocNode QCString relPath() const { return m_relPath; } int id() const { return m_id; } void accept(DocVisitor *v) { v->visit(this); } - bool isInline() { return text().at(0)!='\\'; } + bool isInline() { return m_text.length()>0 ? m_text.at(0)!='\\' : TRUE; } private: QCString m_name; diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 26cce5e..d33dc4a 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -334,9 +334,10 @@ CVSPEC {BLANK}*("const"|"volatile") LNKWORD2 (({SCOPEPRE}*"operator"{OPMASK})|({SCOPEPRE}"operator"{OPMASKOPT})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOPT})){CVSPEC}? LNKWORD3 ([0-9a-z_A-Z\-]+("/"|"\\"))*[0-9a-z_A-Z\-]+("."[0-9a-z_A-Z]+)+ CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."] -WORD1 "%"?{CHARWORDQ}+|"{"|"}"|"'\"'"|("\""[^"\n]*\n?[^"\n]*"\"") +ESCWORD "%"{ID}(("::"|"."){ID})* +WORD1 {ESCWORD}|{CHARWORDQ}+|"{"|"}"|"'\"'"|("\""[^"\n]*\n?[^"\n]*"\"") WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?" -WORD1NQ "%"?{CHARWORDQ}+ +WORD1NQ {ESCWORD}|{CHARWORDQ}+ WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?" HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">" HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p" diff --git a/src/dot.cpp b/src/dot.cpp index 63e595a..371bed9 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -3523,6 +3523,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, * \param inFile just the basename part of the filename * \param outDir output directory * \param relPath relative path the to root of the output dir + * \param baseName the base name of the output files * \param context the scope in which this graph is found (for resolving links) */ void writeDotImageMapFromFile(FTextStream &t, diff --git a/src/doxygen.cpp b/src/doxygen.cpp index ca6c8ef..3886a70 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -4694,7 +4694,7 @@ static void addListReferences() PageDef *pd=0; for (pdi.toFirst();(pd=pdi.current());++pdi) { - QCString name = pd->name(); + QCString name = pd->getOutputFileBase(); if (pd->getGroupDef()) { name = pd->getGroupDef()->getOutputFileBase(); @@ -8619,6 +8619,30 @@ static void copyLogo() } } +static void copyExtraFiles() +{ + QStrList files = Config_getList("HTML_EXTRA_FILES"); + uint i; + for (i=0; i<files.count(); ++i) + { + QCString fileName(files.at(i)); + + if (!fileName.isEmpty()) + { + QFileInfo fi(fileName); + if (!fi.exists()) + { + err("Extra HTML file '%s' specified in HTML_EXTRA_FILES does not exist!\n", fileName.data()); + } + else + { + QCString destFileName = Config_getString("HTML_OUTPUT")+"/"+fi.fileName().data(); + Doxygen::indexList.addImageFile(fi.fileName().data()); + copyFile(fileName, destFileName); + } + } + } +} //! parse the list of input files static void parseFiles(Entry *root,EntryNav *rootNav) @@ -9151,7 +9175,7 @@ static void usage(const char *name) msg("5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.\n"); msg(" RTF: %s -w rtf styleSheetFile\n",name); msg(" HTML: %s -w html headerFile footerFile styleSheetFile [configFile]\n",name); - msg(" LaTeX: %s -w latex headerFile styleSheetFile [configFile]\n\n",name); + msg(" LaTeX: %s -w latex headerFile footerFile styleSheetFile [configFile]\n\n",name); msg("6) Use doxygen to generate an rtf extensions file\n"); msg(" RTF: %s -e rtf extensionsFile\n\n",name); msg("If -s is specified the comments in the config file will be omitted.\n"); @@ -9430,7 +9454,7 @@ void readConfiguration(int argc, char **argv) QFile f; if (openOutputFile(argv[optind+1],f)) { - HtmlGenerator::writeHeaderFile(f); + HtmlGenerator::writeHeaderFile(f, argv[optind+3]); } f.close(); if (openOutputFile(argv[optind+2],f)) @@ -9447,11 +9471,11 @@ void readConfiguration(int argc, char **argv) } else if (stricmp(formatName,"latex")==0) { - if (optind+3<argc) // use config file to get settings + if (optind+4<argc) // use config file to get settings { - if (!Config::instance()->parse(argv[optind+3])) + if (!Config::instance()->parse(argv[optind+4])) { - err("error opening or reading configuration file %s!\n",argv[optind+3]); + err("error opening or reading configuration file %s!\n",argv[optind+4]); exit(1); } Config::instance()->substituteEnvironmentVars(); @@ -9463,7 +9487,7 @@ void readConfiguration(int argc, char **argv) { Config::instance()->init(); } - if (optind+2>=argc) + if (optind+3>=argc) { err("error: option \"-w latex\" does not have enough arguments\n"); cleanUpDoxygen(); @@ -9484,6 +9508,11 @@ void readConfiguration(int argc, char **argv) f.close(); if (openOutputFile(argv[optind+2],f)) { + LatexGenerator::writeFooterFile(f); + } + f.close(); + if (openOutputFile(argv[optind+3],f)) + { LatexGenerator::writeStyleSheetFile(f); } cleanUpDoxygen(); @@ -10380,6 +10409,7 @@ void generateOutput() //if (Config_getBool("HTML_DYNAMIC_SECTIONS")) HtmlGenerator::generateSectionImages(); copyStyleSheet(); copyLogo(); + copyExtraFiles(); if (!generateTreeView && Config_getBool("USE_INLINE_TREES")) { FTVHelp::generateTreeViewImages(); diff --git a/src/doxygen.css b/src/doxygen.css index 037b132..a4add20 100644 --- a/src/doxygen.css +++ b/src/doxygen.css @@ -771,21 +771,21 @@ dl.bug #projectname { - font: 300% arial,sans-serif; + font: 300% Tahoma, Arial,sans-serif; margin: 0px; - padding: 0px; + padding: 2px 0px; } #projectbrief { - font: 120% arial,sans-serif; + font: 120% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #projectnumber { - font: 50% arial,sans-serif; + font: 50% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } diff --git a/src/doxygen_css.h b/src/doxygen_css.h index a52861f..17a688d 100644 --- a/src/doxygen_css.h +++ b/src/doxygen_css.h @@ -771,21 +771,21 @@ " \n" "#projectname\n" "{\n" -" font: 300% arial,sans-serif;\n" +" font: 300% Tahoma, Arial,sans-serif;\n" " margin: 0px;\n" -" padding: 0px;\n" +" padding: 2px 0px;\n" "}\n" " \n" "#projectbrief\n" "{\n" -" font: 120% arial,sans-serif;\n" +" font: 120% Tahoma, Arial,sans-serif;\n" " margin: 0px;\n" " padding: 0px;\n" "}\n" "\n" "#projectnumber\n" "{\n" -" font: 50% arial,sans-serif;\n" +" font: 50% Tahoma, Arial,sans-serif;\n" " margin: 0px;\n" " padding: 0px;\n" "}\n" diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 6fcc70a..df0b700 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -197,7 +197,7 @@ static int getAmpOrExclAtTheEnd(const char *buf, int length); static void truncatePrepass(int index); static void pushBuffer(QCString &buffer); static void popBuffer(); -static void extractPrefix(QCString& text); +//static void extractPrefix(QCString& text); static QCString extractFromParens(const QCString name); //----------------------------------------------------------------------------- diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index f826c37..871edb5 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -43,6 +43,7 @@ static const char resize_script[]= #include "resize_js.h" ; +#if 0 static const char jquery_script1[]= #include "jquery_js.h" ; @@ -52,6 +53,7 @@ static const char jquery_script2[]= static const char jquery_script3[]= #include "jquery_ui_js.h" ; +#endif static const char navtree_css[]= #include "navtree_css.h" @@ -936,13 +938,13 @@ void FTVHelp::generateJSLink(FTextStream &t,FTVNode *n) { if (n->file.isEmpty()) // no link { - t << "\"" << n->name << "\", null, "; + t << "\"" << convertToJSString(n->name) << "\", null, "; } else // link into other page { // TODO: external links with installdox // TODO: use m_topLevelIndex - t << "\"" << n->name << "\", \""; + t << "\"" << convertToJSString(n->name) << "\", \""; t << externalRef("",n->ref,TRUE); t << n->file << Doxygen::htmlFileExtension; if (!n->anchor.isEmpty()) t << "#" << n->anchor; @@ -1088,6 +1090,7 @@ void FTVHelp::generateTreeViewScripts() t << resize_script; } } +#if 0 // generate jquery.js { QFile f(Config_getString("HTML_OUTPUT")+"/jquery.js"); @@ -1097,6 +1100,7 @@ void FTVHelp::generateTreeViewScripts() t << jquery_script1 << jquery_script2 << jquery_script3; } } +#endif // generate navtree.css { QFile f(Config_getString("HTML_OUTPUT")+"/navtree.css"); diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 9b864aa..c59ba89 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -1138,17 +1138,17 @@ void HtmlDocVisitor::visitPost(DocHtmlCaption *) m_t << "</caption>\n"; } -void HtmlDocVisitor::visitPre(DocInternal *i) +void HtmlDocVisitor::visitPre(DocInternal *) { if (m_hide) return; - forceEndParagraph(i); - m_t << "<p><b>" << theTranslator->trForInternalUseOnly() << "</b></p>" << endl; + //forceEndParagraph(i); + //m_t << "<p><b>" << theTranslator->trForInternalUseOnly() << "</b></p>" << endl; } -void HtmlDocVisitor::visitPost(DocInternal *i) +void HtmlDocVisitor::visitPost(DocInternal *) { if (m_hide) return; - forceStartParagraph(i); + //forceStartParagraph(i); } void HtmlDocVisitor::visitPre(DocHRef *href) diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 2f05470..7f9cbe5 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -16,7 +16,6 @@ */ #include <stdlib.h> -//#include <math.h> #include "qtbc.h" #include <qdir.h> @@ -58,6 +57,16 @@ static const char search_styleSheet[] = #include "search_css.h" ; +static const char search_jquery_script1[]= +#include "jquery_js.h" +; +static const char search_jquery_script2[]= +#include "sizzle_js.h" +; +static const char search_jquery_script3[]= +#include "jquery_ui_js.h" +; + static QCString g_header; static QCString g_footer; @@ -823,6 +832,208 @@ static void writeTitleArea(FTextStream &t,const char *relPath, } } +//------------------------------------------------------------------------ + +/// substitute all occurrences of \a src in \a s by \a dst +QCString substitute(const char *s,const char *src,const char *dst) +{ + if (s==0 || src==0) return s; + const char *p, *q; + int srcLen = strlen(src); + int dstLen = dst ? strlen(dst) : 0; + int resLen; + if (srcLen!=dstLen) + { + int count; + for (count=0, p=s; (q=strstr(p,src))!=0; p=q+srcLen) count++; + resLen = p-s+strlen(p)+count*(dstLen-srcLen); + } + else // result has same size as s + { + resLen = strlen(s); + } + QCString result(resLen+1); + char *r; + for (r=result.data(), p=s; (q=strstr(p,src))!=0; p=q+srcLen) + { + int l = (int)(q-p); + memcpy(r,p,l); + r+=l; + if (dst) memcpy(r,dst,dstLen); + r+=dstLen; + } + strcpy(r,p); + //printf("substitute(%s,%s,%s)->%s\n",s,src,dst,result.data()); + return result; +} +//---------------------------------------------------------------------- + +/// Clear a text block \a s from \a begin to end \a markers +QCString clearBlock(const char *s,const char *begin,const char *end) +{ + if (s==0 || begin==0 || end==0) return s; + const char *p, *q; + int beginLen = strlen(begin); + int endLen = strlen(end); + int resLen = 0; + for(p=s; (q=strstr(p,begin))!=0; p=q+endLen) + { + resLen+=q-p; + p=q+beginLen; + if((q=strstr(p,end))==0) + { + resLen+=beginLen; + break; + } + } + resLen+=strlen(p); + + QCString result(resLen+1); + char *r; + for (r=result.data(), p=s; (q=strstr(p,begin))!=0; p=q+endLen) + { + int l = (int)(q-p); + memcpy(r,p,l); + r+=l; + p=q+beginLen; + if((q=strstr(p,end))==0) + { + memcpy(r,begin,beginLen); + r+=beginLen; + break; + } + } + strcpy(r,p); + return result; +} +//---------------------------------------------------------------------- + +QCString selectBlock(const QCString& s,const QCString &name,bool which) +{ + const QCString begin = "<!--BEGIN " + name + "-->"; + const QCString end = "<!--END " + name + "-->"; + const QCString nobegin = "<!--BEGIN !" + name + "-->"; + const QCString noend = "<!--END !" + name + "-->"; + + QCString result = s; + if (which) + { + result = substitute(result, begin, ""); + result = substitute(result, end, ""); + result = clearBlock(result, nobegin, noend); + } + else + { + result = substitute(result, nobegin, ""); + result = substitute(result, noend, ""); + result = clearBlock(result, begin, end); + } + + return result; +} + +static QCString getSearchBox(bool serverSide, QCString relPath, bool highlightSearch) +{ + QGString result; + FTextStream t(&result); + if (serverSide) { + writeServerSearchBox(t, relPath, highlightSearch); + } + else { + writeClientSearchBox(t, relPath); + } + return QCString(result); +} + + +static QCString substituteHtmlKeywords(const QCString &s,const char *title, + const QCString &relPath) +{ + // Build CSS/Javascript tags depending on treeview, search engine settings + QCString treeViewCssJs; + QCString searchCssJs; + QCString searchBox; + QCString mathJaxJs; + static bool treeView = Config_getBool("GENERATE_TREEVIEW"); + static bool searchEngine = Config_getBool("SEARCHENGINE"); + static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH"); + static bool mathJax = Config_getBool("USE_MATHJAX"); + static bool disableIndex = Config_getBool("DISABLE_INDEX"); + static bool hasProjectName = !Config_getString("PROJECT_NAME").isEmpty(); + static bool hasProjectNumber = !Config_getString("PROJECT_NUMBER").isEmpty(); + static bool hasProjectBrief = !Config_getString("PROJECT_BRIEF").isEmpty(); + static bool hasProjectLogo = !Config_getString("PROJECT_LOGO").isEmpty(); + static bool titleArea = (hasProjectName || hasProjectBrief || hasProjectLogo || (disableIndex && searchEngine)); + + if (treeView) + { + treeViewCssJs = "<link href=\"$relpath$navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n" + "<script type=\"text/javascript\" src=\"$relpath$jquery.js\"></script>\n" + "<script type=\"text/javascript\" src=\"$relpath$resize.js\"></script>\n" + "<script type=\"text/javascript\" src=\"$relpath$navtree.js\"></script>\n" + "<script type=\"text/javascript\">\n" + " $(document).ready(initResizable);\n" + "</script>"; + } + + if (searchEngine) + { + searchCssJs = "<link href=\"$relpath$search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"; + if (!Config_getBool("GENERATE_TREEVIEW")) + { + searchCssJs += "<script type=\"text/javascript\" src=\"$relpath$jquery.js\"></script>\n"; + } + searchCssJs += "<script type=\"text/javascript\" src=\"$relpath$search/search.js\"></script>\n"; + + if (!serverBasedSearch) + { + searchCssJs += "<script type=\"text/javascript\">\n" + " $(document).ready(function() { searchBox.OnSelectItem(0); });\n" + "</script>"; + } + else + { + searchCssJs += "<script type=\"text/javascript\">\n" + " $(document).ready(function() {\n" + " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n" + " });\n" + "</script>"; + } + searchBox = getSearchBox(serverBasedSearch, relPath, FALSE); + } + + if (mathJax) + { + mathJaxJs = "<script src=\"$relpath$MathJax.js\">\n" + " MathJax.Hub.Config({\n" + " extensions: [\"tex2jax.js\"],\n" + " jax: [\"input/TeX\",\"output/HTML-CSS\"],\n" + "});\n" + "</script>\n"; + } + + // first substitute generic keywords + QCString result = substituteKeywords(s,title); + + // additional HTML only keywords + result = substitute(result,"$treeview",treeViewCssJs); + result = substitute(result,"$search",searchCssJs); + result = substitute(result,"$searchbox",searchBox); + result = substitute(result,"$mathjax",mathJaxJs); + result = substitute(result,"$relpath$",relPath); //<-- must be last + + // additional HTML only conditional blocks + result = selectBlock(result,"DISABLE_INDEX",disableIndex); + result = selectBlock(result,"GENERATE_TREEVIEW",treeView); + result = selectBlock(result,"SEARCHENGINE",searchEngine); + result = selectBlock(result,"TITLEAREA",titleArea); + result = selectBlock(result,"PROJECT_NAME",hasProjectName); + result = selectBlock(result,"PROJECT_NUMBER",hasProjectNumber); + result = selectBlock(result,"PROJECT_BRIEF",hasProjectBrief); + result = selectBlock(result,"PROJECT_LOGO",hasProjectLogo); + + return result; +} //------------------------- Pictures for the Tabs ------------------------ @@ -870,6 +1081,15 @@ void HtmlGenerator::init() { fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data()); } + + { + QFile f(dname+"/jquery.js"); + if (f.open(IO_WriteOnly)) + { + FTextStream t(&f); + t << search_jquery_script1 << search_jquery_script2 << search_jquery_script3; + } + } } /// Additional initialization after indices have been created @@ -1022,37 +1242,88 @@ static void writeDefaultHeaderFile(FTextStream &t, const char *name, } -void HtmlGenerator::writeHeaderFile(QFile &file) +void HtmlGenerator::writeHeaderFile(QFile &file, const char *cssname) { FTextStream t(&file); - writeDefaultHeaderFile(t,file.name(),"$title",relativePathToRoot(0),TRUE); - t << "<div id=\"top\"><!-- do not remove this div! -->" << endl; - writeTitleArea(t,"$relpath$","$projectname","$projectbrief","$projectnumber","$projectlogo"); + + // writeDefaultHeaderFile(t,file.name(),"$title",relativePathToRoot(0),TRUE); + + QString relPathStr = "$relpath$"; + + QCString id(file.name()); + if (id.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension) + { + id=id.left(id.length()-Doxygen::htmlFileExtension.length()); + } + + t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; + t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n" + "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n" + "<title>$title</title>\n"; + t << "<link href=\"$relpath$tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"; + t << "<link href=\"$relpath$" << cssname << "\" rel=\"stylesheet\" type=\"text/css\" />\n"; + t << "$treeview\n"; + t << "$search\n"; + t << "$mathjax\n"; + t << "</head>\n"; + t << "<body>\n"; + t << "<div id=\"top\"><!-- do not remove this div! -->\n"; + + t << "<!--BEGIN TITLEAREA-->\n"; + t << "<div id=\"titlearea\">\n"; + t << "<table cellspacing=\"0\" cellpadding=\"0\">\n"; + t << " <tbody>\n"; + t << " <tr style=\"height: 56px;\">\n"; + t << " <!--BEGIN PROJECT_LOGO-->\n"; + t << " <td id=\"projectlogo\"><img alt=\"Logo\" src=\"$relpath$$projectlogo\"></td>\n"; + t << " <!--END PROJECT_LOGO-->\n"; + t << " <!--BEGIN PROJECT_NAME-->\n"; + t << " <td style=\"padding-left: 0.5em;\">\n"; + t << " <div id=\"projectname\">$projectname\n"; + t << " <!--BEGIN PROJECT_NUMBER--> <span id=\"projectnumber\">$projectnumber</span><!--END PROJECT_NUMBER-->\n"; + t << " </div>\n"; + t << " <!--BEGIN PROJECT_BRIEF--><div id=\"projectbrief\">$projectbrief</div><!--END PROJECT_BRIEF-->\n"; + t << " </td>\n"; + t << " <!--END PROJECT_NAME-->\n"; + t << " <!--BEGIN !PROJECT_NAME-->\n"; + t << " <!--BEGIN PROJECT_BRIEF-->\n"; + t << " <td style=\"padding-left: 0.5em;\">\n"; + t << " <div id=\"projectbrief\">$projectbrief</div>\n"; + t << " </td>\n"; + t << " <!--END PROJECT_BRIEF-->\n"; + t << " <!--END !PROJECT_NAME-->\n"; + t << " <!--BEGIN DISABLE_INDEX-->\n"; + t << " <!--BEGIN SEARCHENGINE-->\n"; + t << " <td>$searchbox</td>\n"; + t << " <!--END SEARCHENGINE-->\n"; + t << " <!--END DISABLE_INDEX-->\n"; + t << " </tr>\n"; + t << " </tbody>\n"; + t << "</table>\n"; + t << "</div>\n"; + t << "<!--END TITLEAREA-->\n"; } void HtmlGenerator::writeFooterFile(QFile &file) { - static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); FTextStream t(&file); - - if (generateTreeView) - { - t << " <li class=\"footer\">"; - t << theTranslator->trGeneratedAt( "$datetime", "$projectname" ) << endl; - t << " <a href=\"http://www.doxygen.org/index.html\">\n"; - t << " <img class=\"footer\" src=\"doxygen.png\" alt=\"doxygen\"/></a> $doxygenversion </li>\n"; - t << " </ul>\n"; - t << " </div>\n"; - } - else - { - t << "<hr class=\"footer\"/><address class=\"footer\"><small>\n"; - t << theTranslator->trGeneratedAt( "$datetime", "$projectname" ); - t << " <a href=\"http://www.doxygen.org/index.html\">" - << "<img class=\"footer\" src=\"$relpath$doxygen.png\" alt=\"doxygen\"/>" - << "</a> $doxygenversion"; - t << "</small></address>\n"; - } + + t << "<!--BEGIN GENERATE_TREEVIEW-->\n"; + t << " <li class=\"footer\">"; + t << theTranslator->trGeneratedAt( "$datetime", "$projectname" ) << endl; + t << " <a href=\"http://www.doxygen.org/index.html\">\n"; + t << " <img class=\"footer\" src=\"doxygen.png\" alt=\"doxygen\"/></a> $doxygenversion </li>\n"; + t << " </ul>\n"; + t << " </div>\n"; + t << "<!--END GENERATE_TREEVIEW-->\n"; + t << "<!--BEGIN !GENERATE_TREEVIEW-->\n"; + t << "<hr class=\"footer\"/><address class=\"footer\"><small>\n"; + t << theTranslator->trGeneratedAt( "$datetime", "$projectname" ); + t << " <a href=\"http://www.doxygen.org/index.html\">" + << "<img class=\"footer\" src=\"$relpath$doxygen.png\" alt=\"doxygen\"/>" + << "</a> $doxygenversion"; + t << "</small></address>\n"; + t << "<!--END !GENERATE_TREEVIEW-->\n"; t << "</body>\n" << "</html>\n"; @@ -1180,7 +1451,7 @@ void HtmlGenerator::startFile(const char *name,const char *, } else { - t << substituteKeywords(g_header,convertToHtml(dispTitle),relPath); + t << substituteHtmlKeywords(g_header,convertToHtml(dispTitle),relPath); } t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen " << versionString << " -->" << endl; @@ -1217,6 +1488,7 @@ void HtmlGenerator::writeSearchFooter(FTextStream &t,const QCString &relPath) t << "\n"; } + QCString HtmlGenerator::writeLogoAsString(const char *path) { static bool timeStamp = Config_getBool("HTML_TIMESTAMP"); @@ -1277,7 +1549,7 @@ void HtmlGenerator::writePageFooter(FTextStream &t,const QCString &lastTitle,con } else { - t << substituteKeywords(g_footer,convertToHtml(lastTitle),relPath); + t << substituteHtmlKeywords(g_footer,convertToHtml(lastTitle),relPath); } } @@ -2666,7 +2938,7 @@ void HtmlGenerator::writeSearchPage() } else { - t << substituteKeywords(g_header,"Search",""); + t << substituteHtmlKeywords(g_header,"Search",""); } t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen " @@ -2803,6 +3075,7 @@ void HtmlGenerator::writeSearchPage() { err("Failed to open file '%s' for writing...\n",scriptName.data()); } + } #if 0 diff --git a/src/htmlgen.h b/src/htmlgen.h index db6bc3a..405652b 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -34,7 +34,7 @@ class HtmlGenerator : public OutputGenerator virtual ~HtmlGenerator(); static void init(); static void writeStyleSheetFile(QFile &f); - static void writeHeaderFile(QFile &f); + static void writeHeaderFile(QFile &f, const char *cssname); static void writeFooterFile(QFile &f); static void writeTabData(); static void writeSearchFooter(FTextStream &t,const QCString &relPath); diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 65f6acb..9945ede 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -492,6 +492,7 @@ void HtmlHelp::createProjectFile() t << "nav_h.png" << endl; t << "nav_f.png" << endl; t << "bc_s.png" << endl; +#if 0 if (Config_getBool("HTML_DYNAMIC_SECTIONS")) { t << "open.png" << endl; @@ -527,6 +528,12 @@ void HtmlHelp::createProjectFile() t << "close.png" << endl; } } +#endif + uint i; + for (i=0;i<imageFiles.count();i++) + { + t << imageFiles.at(i) << endl; + } f.close(); } else @@ -690,3 +697,8 @@ void HtmlHelp::addIndexItem(Definition *context,MemberDef *md, } } +void HtmlHelp::addImageFile(const char *fileName) +{ + imageFiles.append(fileName); +} + diff --git a/src/htmlhelp.h b/src/htmlhelp.h index 87abe81..a600e77 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -79,7 +79,7 @@ class HtmlHelp : public IndexIntf // const char *anchor,const MemberDef *md); void addIndexItem(Definition *context,MemberDef *md,const char *title); void addIndexFile(const char *name); - void addImageFile(const char *) {} + void addImageFile(const char *); void addStyleSheetFile(const char *) {} private: @@ -90,6 +90,7 @@ class HtmlHelp : public IndexIntf HtmlHelpIndex *index; int dc; QStrList indexFiles; + QStrList imageFiles; QDict<void> indexFileDict; static HtmlHelp *theInstance; QCString recode(const QCString &s); diff --git a/src/image.cpp b/src/image.cpp index 5f4c141..04d5247 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -18,7 +18,6 @@ #include "qtbc.h" #include "image.h" -//#include "gifenc.h" #include <qfile.h> #include <math.h> #include "lodepng.h" diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 55e9634..48e3675 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -894,15 +894,15 @@ void LatexDocVisitor::visitPost(DocHtmlCell *c) void LatexDocVisitor::visitPre(DocInternal *) { if (m_hide) return; - m_t << "\\begin{DoxyInternal}{"; - filter(theTranslator->trForInternalUseOnly()); - m_t << "}\n"; + //m_t << "\\begin{DoxyInternal}{"; + //filter(theTranslator->trForInternalUseOnly()); + //m_t << "}\n"; } void LatexDocVisitor::visitPost(DocInternal *) { if (m_hide) return; - m_t << "\\end{DoxyInternal}" << endl; + //m_t << "\\end{DoxyInternal}" << endl; } void LatexDocVisitor::visitPre(DocHRef *href) diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 4d8b23b..ff00d0f 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -257,6 +257,7 @@ static void writeDefaultHeaderPart1(FTextStream &t) t << "\\makeindex\n" "\\setcounter{tocdepth}{3}\n" "\\renewcommand{\\footrulewidth}{0.4pt}\n" + "\\renewcommand{\\familydefault}{\\sfdefault}\n" "\\begin{document}\n"; static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); @@ -762,6 +763,12 @@ static void writeDefaultStyleSheetPart3(FTextStream &t) t << "\\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0}\n"; } +static void writeDefaultFooter(FTextStream &t) +{ + t << "\\printindex\n"; + t << "\\end{document}\n"; +} + void LatexGenerator::writeHeaderFile(QFile &f) { FTextStream t(&f); @@ -772,6 +779,12 @@ void LatexGenerator::writeHeaderFile(QFile &f) writeDefaultHeaderPart3(t); } +void LatexGenerator::writeFooterFile(QFile &f) +{ + FTextStream t(&f); + writeDefaultFooter(t); +} + void LatexGenerator::writeStyleSheetFile(QFile &f) { FTextStream t(&f); @@ -993,6 +1006,7 @@ void LatexGenerator::endIndexSection(IndexSections is) //static bool compactLatex = Config_getBool("COMPACT_LATEX"); static bool sourceBrowser = Config_getBool("SOURCE_BROWSER"); static QCString latexHeader = Config_getString("LATEX_HEADER"); + static QCString latexFooter = Config_getString("LATEX_FOOTER"); switch (is) { case isTitlePageStart: @@ -1211,8 +1225,15 @@ void LatexGenerator::endIndexSection(IndexSections is) case isPageDocumentation2: break; case isEndIndex: - t << "\\printindex\n"; - t << "\\end{document}\n"; + if (latexFooter.isEmpty()) + { + writeDefaultFooter(t); + } + else + { + QCString footer = fileToString(latexFooter); + t << substituteKeywords(footer,0); + } break; } } diff --git a/src/latexgen.h b/src/latexgen.h index 6088b58..fc341fa 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -30,6 +30,7 @@ class LatexGenerator : public OutputGenerator static void init(); static void writeStyleSheetFile(QFile &f); static void writeHeaderFile(QFile &f); + static void writeFooterFile(QFile &f); //OutputGenerator *copy(); //OutputGenerator *clone() { return new LatexGenerator(*this); } diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 443fd64..90780e1 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -661,19 +661,19 @@ void ManDocVisitor::visitPost(DocHtmlCell *) void ManDocVisitor::visitPre(DocInternal *) { if (m_hide) return; - if (!m_firstCol) m_t << endl; - m_t << ".PP" << endl; - m_t << "\\fB" << theTranslator->trForInternalUseOnly() << "\\fP" << endl; - m_t << ".RS 4" << endl; + //if (!m_firstCol) m_t << endl; + //m_t << ".PP" << endl; + //m_t << "\\fB" << theTranslator->trForInternalUseOnly() << "\\fP" << endl; + //m_t << ".RS 4" << endl; } void ManDocVisitor::visitPost(DocInternal *) { if (m_hide) return; - if (!m_firstCol) m_t << endl; - m_t << ".RE" << endl; - m_t << ".PP" << endl; - m_firstCol=TRUE; + //if (!m_firstCol) m_t << endl; + //m_t << ".RE" << endl; + //m_t << ".PP" << endl; + //m_firstCol=TRUE; } void ManDocVisitor::visitPre(DocHRef *) diff --git a/src/pagedef.cpp b/src/pagedef.cpp index 8563ec0..dc78179 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -102,6 +102,7 @@ void PageDef::writeDocumentation(OutputList &ol) } ol.endQuickIndices(); } + SectionInfo *si=Doxygen::sectionDict.find(name()); // save old generator state and write title only to Man generator ol.pushGeneratorState(); @@ -109,6 +110,11 @@ void PageDef::writeDocumentation(OutputList &ol) ol.disableAllBut(OutputGenerator::Man); ol.startTitleHead(pageName); ol.endTitleHead(pageName, pageName); + if (si) + { + ol.parseDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE); + ol.endSection(si->label,si->type); + } ol.popGeneratorState(); //2.} @@ -117,9 +123,8 @@ void PageDef::writeDocumentation(OutputList &ol) //2.{ ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); - SectionInfo *si=0; - if (!title().isEmpty() && !name().isEmpty() && - (si=Doxygen::sectionDict.find(name()))!=0) + ol.disable(OutputGenerator::Man); + if (!title().isEmpty() && !name().isEmpty() && si!=0) { //ol.startSection(si->label,si->title,si->type); startTitle(ol,getOutputFileBase(),this); @@ -56,12 +56,9 @@ struct FileState FileState(int size) : fileBuf(size), oldFileBuf(0), oldFileBufPos(0) {} int lineNr; - //FILE *filePtr; BufStr fileBuf; - //FILE *oldYYin; BufStr *oldFileBuf; int oldFileBufPos; - //bool isPlainFile; YY_BUFFER_STATE bufState; QCString fileName; }; @@ -1264,7 +1261,10 @@ 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); + bool ambig; + // change to local name for bug 641336 + FileDef *incFd = findFileDef(Doxygen::inputNameDict,incFileName,ambig); + oldFileDef->addIncludeDependency(ambig ? 0 : incFd,incFileName,localInclude,g_isImported); // add included by dependency if (g_yyFileDef) { @@ -1297,16 +1297,18 @@ static void readIncludeFile(const QCString &inc) if (oldFileDef) { bool ambig; - QCString absPath = incFileName; - if (QDir::isRelativePath(incFileName)) - { - absPath = QDir::cleanDirPath(oldFileDef->getPath()+"/"+incFileName); - //printf("%s + %s -> resolved path %s\n",oldFileDef->getPath().data(),incFileName.data(),absPath.data()); - } - FileDef *fd = findFileDef(Doxygen::inputNameDict,absPath,ambig); + //QCString absPath = incFileName; + //if (QDir::isRelativePath(incFileName)) + //{ + // absPath = QDir::cleanDirPath(oldFileDef->getPath()+"/"+incFileName); + // //printf("%s + %s -> resolved path %s\n",oldFileDef->getPath().data(),incFileName.data(),absPath.data()); + //} + + // change to local name for bug 641336 + FileDef *fd = findFileDef(Doxygen::inputNameDict,incFileName,ambig); //printf("%s::findFileDef(%s)=%p\n",oldFileDef->name().data(),incFileName.data(),fd); // add include dependency to the file in which the #include was found - oldFileDef->addIncludeDependency(fd,incFileName,localInclude,g_isImported); + oldFileDef->addIncludeDependency(ambig ? 0 : fd,incFileName,localInclude,g_isImported); // add included by dependency if (fd) { @@ -2506,9 +2508,10 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output) g_expandedDict->clear(); g_condStack.clear(); g_condStack.setAutoDelete(TRUE); + g_fileDefineDict->clear(); // add due to bug 641346 - static bool firstTime=TRUE; - if (firstTime) + //static bool firstTime=TRUE; + //if (firstTime) { // add predefined macros char *defStr; @@ -2618,7 +2621,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output) // def->name.data(),def->definition.data(),def->nargs); } } - firstTime=FALSE; + //firstTime=FALSE; } g_yyLineNr = 1; diff --git a/src/qhp.cpp b/src/qhp.cpp index 0f3e3ad..6a9e28e 100644 --- a/src/qhp.cpp +++ b/src/qhp.cpp @@ -85,7 +85,7 @@ void Qhp::initialize() { "name", filterName, 0 }; m_doc.open("customFilter", tagAttributes); - QStringList customFilterAttributes = QStringList::split(' ', Config_getString("QHP_CUST_FILTER_ATTRS")); + QStringList customFilterAttributes = QStringList::split(QChar(' '), Config_getString("QHP_CUST_FILTER_ATTRS")); for (int i = 0; i < (int)customFilterAttributes.count(); i++) { m_doc.openCloseContent("filterAttribute", customFilterAttributes[i]); @@ -96,7 +96,7 @@ void Qhp::initialize() m_doc.open("filterSection"); // Add section attributes - QStringList sectionFilterAttributes = QStringList::split(' ', + QStringList sectionFilterAttributes = QStringList::split(QChar(' '), Config_getString("QHP_SECT_FILTER_ATTRS")); if (!sectionFilterAttributes.contains(QString("doxygen"))) { diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index 8d6170e..3cb0b58 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -953,25 +953,25 @@ void RTFDocVisitor::visitPost(DocHtmlCell *) void RTFDocVisitor::visitPre(DocInternal *) { if (m_hide) return; - DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocInternal)}\n"); - m_t << "{"; // start desc - m_t << "{\\b "; // start bold - m_t << theTranslator->trForInternalUseOnly(); - m_t << "}"; // end bold - m_t << "\\par" << endl; - incIndentLevel(); - m_t << rtf_Style_Reset << getStyle("DescContinue"); - m_lastIsPara=FALSE; + //DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocInternal)}\n"); + //m_t << "{"; // start desc + //m_t << "{\\b "; // start bold + //m_t << theTranslator->trForInternalUseOnly(); + //m_t << "}"; // end bold + //m_t << "\\par" << endl; + //incIndentLevel(); + //m_t << rtf_Style_Reset << getStyle("DescContinue"); + //m_lastIsPara=FALSE; } void RTFDocVisitor::visitPost(DocInternal *) { if (m_hide) return; - DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocInternal)}\n"); - m_t << "\\par"; - decIndentLevel(); - m_t << "}"; // end desc - m_lastIsPara=TRUE; + //DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocInternal)}\n"); + //m_t << "\\par"; + //decIndentLevel(); + //m_t << "}"; // end desc + //m_lastIsPara=TRUE; } void RTFDocVisitor::visitPre(DocHRef *href) diff --git a/src/scanner.l b/src/scanner.l index 6abd7e7..0ed3933 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -587,6 +587,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) %x ClassVar %x CSConstraintName %x CSConstraintType +%x CSIndexer %x ClassCategory %x ClassTemplSpec %x CliPropertyType @@ -1660,7 +1661,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) <NSAliasArg>";" { BEGIN( FindMembers ); } -<PHPUse>({ID}{BN}*"\\"{BN}*)+{ID} { +<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} { lineCount(); aliasName=yytext; //current->fileName = yyFileName; @@ -1972,6 +1973,13 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) { // javascript function current->type="function"; } + else if (insideCS && strcmp(yytext,"this")==0) + { + // C# indexer + addType( current ) ; + current->name="this"; + BEGIN(CSIndexer); + } else { if (YY_START==FindMembers) @@ -2046,6 +2054,10 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } } } +<CSIndexer>"["[^\n\]]*"]" { + current->name+=removeRedundantWhiteSpace(yytext); + BEGIN(FindMembers); + } <FindMembers>[0-9]{ID} { // some number where we did not expect one } <FindMembers>"." { @@ -4089,9 +4101,15 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } <OldStyleArgs>. { current->args += *yytext; } <FuncQual,FuncRound,FuncFunc>. { current->args += *yytext; } +<FuncQual>{BN}*"try:" | <FuncQual>{BN}*"try"{BN}+ { /* try-function-block */ insideTryBlock=TRUE; lineCount(); + if (yytext[yyleng-1]==':') + { + unput(':'); + BEGIN( Function ); + } } <FuncQual>{BN}*"throw"{BN}*"(" { // C++ style throw clause current->exception = " throw (" ; @@ -4869,7 +4887,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) <BasesProt>"private"{BN}+ { lineCount(); baseProt = Private; } <BasesProt>{BN} { lineCount(); } <BasesProt>. { unput(*yytext); BEGIN(Bases); } -<Bases>("\\")?{BN}*({ID}{BN}*"\\"{BN}*)*{ID} { +<Bases>("\\")?({ID}"\\")*{ID} { // PHP namespace token, not sure if interspacing is allowed but it gives problems (see bug 640847) if (!insidePHP) { REJECT; diff --git a/src/search.php b/src/search.php index bc848c1..906f09c 100644 --- a/src/search.php +++ b/src/search.php @@ -140,7 +140,7 @@ function combine_results($results,&$docs) { $key=$di["url"]; $rank=$di["rank"]; - if ($docs[$key]) + if (isset($docs[$key])) { $docs[$key]["rank"]+=$rank; } diff --git a/src/search_php.h b/src/search_php.h index d75a95c..1ebedf1 100644 --- a/src/search_php.h +++ b/src/search_php.h @@ -140,7 +140,7 @@ " {\n" " $key=$di[\"url\"];\n" " $rank=$di[\"rank\"];\n" -" if ($docs[$key])\n" +" if (isset($docs[$key]))\n" " {\n" " $docs[$key][\"rank\"]+=$rank;\n" " }\n" diff --git a/src/translator_it.h b/src/translator_it.h index b3ae4ed..04a7f55 100644 --- a/src/translator_it.h +++ b/src/translator_it.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2011 by Dimitri van Heesch. + * Copyright (C) 1997-2010 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -19,6 +19,10 @@ * * Revision history * + * 2010/08: updated translation of new items used since version 1.6.0 and 1.6.3 + * completely reviewed the translation in the trLegendDocs() function + * corrected some typos all around + * reviewed some translations all around * 2007/11: updated translation of new items used since version 1.5.4 * 2007/10: Included corrections provided by Arialdo Martini <arialdomartini@bebox.it>, updated some strings marked with 'translate me' comment * 2006/10: made class to derive directly from Translator class (reported in Petr Prikryl October 9 translator report) @@ -80,7 +84,7 @@ #ifndef TRANSLATOR_IT_H #define TRANSLATOR_IT_H -class TranslatorItalian : public TranslatorAdapter_1_6_0 +class TranslatorItalian : public Translator { public: @@ -144,7 +148,7 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 } else { - return "Documentazione dei dati membri"; + return "Documentazione dei membri dato"; } } @@ -242,7 +246,7 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 } else { - return "Membri dei file"; + return "Elementi dei file"; } } @@ -323,13 +327,13 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 QCString result="Questo è un elenco "; if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - if (!extractAll) result+="delle funczioni, delle variabili, delle define, dei tipi enumerati e delle typedef documentate "; - else result+="di tutte le funczioni, variabili, define, tipi enumerati, e typedef "; + if (!extractAll) result+="delle funzioni, delle variabili, delle define, dei tipi enumerati e delle ridefinizioni dei tipi (typedef) documentate "; + else result+="di tutte le funzioni, variabili, define, tipi enumerati, e ridefinizioni dei tipi (typedef) "; } else { - if (!extractAll) result+="dei membri dei file documentati "; - else result+="di tutti i membri dei file "; + if (!extractAll) result+="degli elementi documentati dei file "; + else result+="di tutti gli elementi dei file "; } result+="con collegamenti alla documentazione"; if (extractAll) result+=" del file a cui appartengono:"; @@ -343,7 +347,7 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 /*! This is an introduction to the page with the list of related pages */ QCString trRelatedPagesDescription() - { return "Questo è l'elenco di tutte le pagine di documentazione generale:"; } + { return "Questo è l'elenco di tutte le pagine di documentazione collegate:"; } /*! This is an introduction to the page with the list of class/file groups */ QCString trModulesDescription() @@ -462,7 +466,7 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 * list of (global) variables */ QCString trEnumerationValues() - { return "Valori dei tipi enumerati"; } + { return "Valori del tipo enumerato"; } /*! This is used in the documentation of a file before the list of * documentation blocks for defines @@ -520,7 +524,7 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 */ QCString trGeneratedAt(const char *date,const char *projName) { - QCString result=(QCString)"Generato il "+date; + QCString result=(QCString)"Generato "+date; if (projName) result+=(QCString)" per "+projName; result+=(QCString)" da"; return result; @@ -560,7 +564,7 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 /*! this text is generated when the \\sa command is used. */ QCString trSeeAlso() - { return "Vedi anche"; } + { return "Si veda anche"; } /*! this text is generated when the \\param command is used. */ QCString trParameters() @@ -737,8 +741,8 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 QCString trNamespaceMemberDescription(bool extractAll) { QCString result="Questa è la lista "; - if (!extractAll) result+="dei membri dei namespace documentati, "; - else result+="di tutti i membri dei namespace "; + if (!extractAll) result+="dei membri documentati del namespace, "; + else result+="di tutti i membri del namespace "; result+="con collegamenti "; if (extractAll) result+="alla documentazione del namespace per ciascun membro:"; @@ -1021,21 +1025,21 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 { return "Questa pagina spiega come interpretare i grafi generati da doxygen.<p>\n" - "Considerate l'esempio seguente:\n" + "Si consideri l'esempio seguente:\n" "\\code\n" "/*! Classe invisibile per troncamento */\n" "class Invisible { };\n\n" - "/*! Classe troncata, la relazione di ereditarietà e nascosta */\n" + "/*! Classe tronca, la relazione di ereditarietà è nascosta */\n" "class Truncated : public Invisible { };\n\n" "/* Classe non documentata con i commenti speciali di doxygen*/\n" "class Undocumented { };\n\n" - "/*! Classe che utilizza una ereditarietà pubblica */\n" + "/*! Classe estesa mediante ereditarietà pubblica */\n" "class PublicBase : public Truncated { };\n\n" - "/*! A template class */\n" + "/*! Classe templatizzata */\n" "template<class T> class Templ { };\n\n" - "/*! Classe che utilizza una ereditarietà protetta*/\n" + "/*! Classe estesa mediante ereditarietà protetta*/\n" "class ProtectedBase { };\n\n" - "/*! Classe che utilizza una ereditarietà privata*/\n" + "/*! Classe estesa mediante ereditarietà privata*/\n" "class PrivateBase { };\n\n" "/*! Classe utilizzata dalla classe Inherited */\n" "class Used { };\n\n" @@ -1050,24 +1054,28 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 " Used *m_usedClass;\n" "};\n" "\\endcode\n" - "Se il tag \\c MAX_DOT_GRAPH_HEIGHT nel file di configurazione " - "è impostato a 200 verrà prodotto il grafo seguente:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "Verrà prodotto il grafo seguente:" + "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n" "<p>\n" "I riquadri nel grafo qui sopra hanno il seguente significato:\n" + "</p>\n" "<ul>\n" - "<li>Il riquadro nero pieno rappresenta la struct o la classe per la quale il grafo è stato generato.\n" - "<li>Un riquadro con un bordo nero denota una struct o una classe documentata.\n" - "<li>Un riquadro con un bordo grigio indica una struct o una classe non documentata.\n" - "<li>Un riquadro con un bordo rosso indica una struct o una classe per la quale non sono mostrate tutte le relazioni di ereditarietà/contenimento (un grafo viene troncato se non rientra nei limiti prestabiliti)." + "<li>Il riquadro grigio pieno rappresenta la struct o la classe per la quale il grafo è stato generato.</li>\n" + "<li>Un riquadro con un bordo nero denota una struct o una classe documentata.</li>\n" + "<li>Un riquadro con un bordo grigio indica una struct o una classe non documentata.</li>\n" + "<li>Un riquadro con un bordo rosso indica una struct o una classe per la quale non sono mostrate tutte le relazioni di ereditarietà/contenimento (un grafo viene troncato se non rientra nei limiti prestabiliti).</li>\n" "</ul>\n" + "<p>\n" "Le frecce hanno il seguente significato:\n" + "</p>\n" "<ul>\n" - "<li>Una freccia blu scuro indica una relazione di ereditarietà pubblica tra due classi.\n" - "<li>Una freccia verde indica un'ereditarietà protetta.\n" - "<li>Una freccia rossa indica un'ereditarietà privata.\n" + "<li>Una freccia blu scuro indica una relazione di ereditarietà pubblica tra due classi.</li>\n" + "<li>Una freccia verde indica un'ereditarietà protetta.</li>\n" + "<li>Una freccia rossa indica un'ereditarietà privata.</li>\n" "<li>Una freccia viola tratteggiata indica che una classe è contenuta o usata da un'altra classe." - " La freccia viene etichettata con la o le variabili attraverso cui la struct o la classe puntata dalla freccia è accessibile.\n" + " La freccia viene etichettata con la o le variabili attraverso cui la struct o la classe puntata dalla freccia è accessibile.</li>\n" + "<li>Una freccia gialla tratteggiata indica la relazione tra una istanza di un template e la classe templatizzata da cui è stata istanziata." + " La freccia viene etichettata con i parametri di template dell'istanza.</li>\n" "</ul>\n"; } /*! text for the link to the legend page */ @@ -1291,7 +1299,7 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 */ virtual QCString trReferences() { - return "Riferimenti"; + return "Referenzia"; } ////////////////////////////////////////////////////////////////////////// @@ -1529,7 +1537,7 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 virtual QCString trOverloadText() { return "Questa è una funzione membro sovraccaricata (overloaded), " - "fornita per comodità. Differisce dalla funzione di cui sopra" + "fornita per comodità. Differisce dalla funzione di cui sopra " "unicamente per gli argomenti passati."; } @@ -1750,6 +1758,96 @@ class TranslatorItalian : public TranslatorAdapter_1_6_0 return "Vincoli dei tipi"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.6.0 (mainly for the new search engine) +////////////////////////////////////////////////////////////////////////// + + /*! directory relation for \a name */ + virtual QCString trDirRelation(const char *name) + { + return "Relazione per "+QCString(name); + } + + /*! Loading message shown when loading search results */ + virtual QCString trLoading() + { + return "Caricamento in corso..."; + } + + /*! Label used for search results in the global namespace */ + virtual QCString trGlobalNamespace() + { + return "Namespace globale"; + } + + /*! Message shown while searching */ + virtual QCString trSearching() + { + return "Ricerca in corso..."; + } + + /*! Text shown when no search results are found */ + virtual QCString trNoMatches() + { + return "Nessun risultato"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 (missing items for the directory pages) +////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)"Grafo di dipendenza delle directory per "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)"File in "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)"Include il file in "+name; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "Lun","Mar","Mer","Gio","Ven","Sab","Dom" }; + static const char *months[] = { "Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic" }; + QCString sdate; + sdate.sprintf("%s %d %s %d",days[dayOfWeek-1],day,months[month-1],year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } + }; #endif + diff --git a/src/util.cpp b/src/util.cpp index 35c656b..100f140 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -3645,7 +3645,7 @@ static void findMembersWithSpecificName(MemberName *mn, //printf(" md->name()=`%s' md->args=`%s' fd=%p gd=%p current=%p\n", // md->name().data(),args,fd,gd,currentFile); if ( - ((gd && gd->isLinkable()) || (fd && fd->isLinkable())) && + ((gd && gd->isLinkable()) || (fd && fd->isLinkable()) || md->isReference()) && md->getNamespaceDef()==0 && md->isLinkable() && (!checkStatics || (!md->isStatic() && !md->isDefine()) || currentFile==0 || fd==currentFile) // statics must appear in the same file @@ -3908,11 +3908,11 @@ bool getDefs(const QCString &scName,const QCString &memberName, // maybe an namespace, file or group member ? - //printf("Testing for global function scopeName=`%s' mScope=`%s' :: mName=`%s'\n", + //printf("Testing for global symbol scopeName=`%s' mScope=`%s' :: mName=`%s'\n", // scopeName.data(),mScope.data(),mName.data()); if ((mn=Doxygen::functionNameSDict->find(mName))) // name is known { - //printf(" >function name found\n"); + //printf(" >symbol name found\n"); NamespaceDef *fnd=0; int scopeOffset=scopeName.length(); do @@ -4250,6 +4250,7 @@ bool resolveRef(/* in */ const char *scName, // we did find a member, but it is a global one while we were explicitly // looking for a scoped variable. See bug 616387 for an example why this check is needed. // note we do need to support autolinking to "::symbol" hence the >0 + //printf("not global member!\n"); *resContext=0; *resMember=0; return FALSE; @@ -4285,6 +4286,7 @@ bool resolveRef(/* in */ const char *scName, { return resolveRef(scName,name,inSeeBlock,resContext,resMember,FALSE,0,checkScope); } + //printf("resolveRef: %s not found!\n",name); return FALSE; } @@ -4565,41 +4567,6 @@ QCString substituteClassNames(const QCString &s) #endif //---------------------------------------------------------------------- -// substitute all occurrences of `src' in `s' by `dst' - -QCString substitute(const char *s,const char *src,const char *dst) -{ - if (s==0 || src==0) return s; - const char *p, *q; - int srcLen = strlen(src); - int dstLen = dst ? strlen(dst) : 0; - int resLen; - if (srcLen!=dstLen) - { - int count; - for (count=0, p=s; (q=strstr(p,src))!=0; p=q+srcLen) count++; - resLen = p-s+strlen(p)+count*(dstLen-srcLen); - } - else // result has same size as s - { - resLen = strlen(s); - } - QCString result(resLen+1); - char *r; - for (r=result.data(), p=s; (q=strstr(p,src))!=0; p=q+srcLen) - { - int l = (int)(q-p); - memcpy(r,p,l); - r+=l; - if (dst) memcpy(r,dst,dstLen); - r+=dstLen; - } - strcpy(r,p); - //printf("substitute(%s,%s,%s)->%s\n",s,src,dst,result.data()); - return result; -} - -//---------------------------------------------------------------------- struct FindFileCacheElem { @@ -4621,9 +4588,11 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) g_findFileDefCache.setAutoDelete(TRUE); FindFileCacheElem *cachedResult = g_findFileDefCache.find(key); + //printf("key=%s cachedResult=%p\n",key.data(),cachedResult); if (cachedResult) { ambig = cachedResult->isAmbig; + //printf("cached: fileDef=%p\n",cachedResult->fileDef); return cachedResult->fileDef; } else @@ -4641,10 +4610,12 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) { path=name.left(slashPos+1); name=name.right(name.length()-slashPos-1); + //printf("path=%s name=%s\n",path.data(),name.data()); } if (name.isEmpty()) goto exit; if ((fn=(*fnDict)[name])) { + //printf("fn->count()=%d\n",fn->count()); if (fn->count()==1) { FileDef *fd = fn->getFirst(); @@ -4652,6 +4623,7 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) { cachedResult->fileDef = fd; g_findFileDefCache.insert(key,cachedResult); + //printf("=1 ===> add to cache %p\n",fd); return fd; } } @@ -4671,6 +4643,7 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) lastMatch=fd; } } + //printf(">1 ===> add to cache %p\n",fd); ambig=(count>1); cachedResult->isAmbig = ambig; @@ -4684,7 +4657,9 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) //printf("not found!\n"); } exit: + //printf("0 ===> add to cache %p: %s\n",cachedResult,n); g_findFileDefCache.insert(key,cachedResult); + //delete cachedResult; return 0; } @@ -4719,9 +4694,9 @@ QCString showFileDefMatches(const FileNameDict *fnDict,const char *n) //---------------------------------------------------------------------- -QCString substituteKeywords(const QCString &s,const char *title,const QCString &relPath) +QCString substituteKeywords(const QCString &s,const char *title) { - QCString result = s.copy(); + QCString result = s; if (title) result = substitute(result,"$title",title); result = substitute(result,"$datetime",dateToString(TRUE)); result = substitute(result,"$date",dateToString(FALSE)); @@ -4731,7 +4706,6 @@ QCString substituteKeywords(const QCString &s,const char *title,const QCString & result = substitute(result,"$projectnumber",Config_getString("PROJECT_NUMBER")); result = substitute(result,"$projectbrief",Config_getString("PROJECT_BRIEF")); result = substitute(result,"$projectlogo",Config_getString("PROJECT_LOGO")); - result = substitute(result,"$relpath$",relPath); return result; } @@ -5272,6 +5246,26 @@ QCString convertToHtml(const char *s,bool keepEntities) return strBuf.get(); } +QCString convertToJSString(const char *s) +{ + static StrBuf strBuf; + strBuf.clear(); + if (s==0) return ""; + const char *p=s; + char c; + while ((c=*p++)) + { + switch (c) + { + case '"': strBuf.addStr("\\\""); break; + default: strBuf.addChar(c); break; + } + } + strBuf.addChar(0); + return strBuf.get(); +} + + QCString convertCharEntitiesToUTF8(const QCString &s) { static QDict<char> entityMap(67); @@ -178,6 +178,10 @@ QCString substituteClassNames(const QCString &s); QCString substitute(const char *s,const char *src,const char *dst); +QCString clearBlock(const char *s,const char *begin,const char *end); + +QCString selectBlock(const QCString& s,const QCString &name,bool which); + QCString resolveDefines(const char *n); ClassDef *getClass(const char *key); @@ -225,7 +229,7 @@ bool rightScopeMatch(const QCString &scope, const QCString &name); bool leftScopeMatch(const QCString &scope, const QCString &name); -QCString substituteKeywords(const QCString &s,const char *title,const QCString &relPath=""); +QCString substituteKeywords(const QCString &s,const char *title); int getPrefixIndex(const QCString &name); @@ -253,6 +257,8 @@ QCString convertToHtml(const char *s,bool keepEntities=TRUE); QCString convertToXML(const char *s); +QCString convertToJSString(const char *s); + QCString getOverloadDocs(); void addMembersToMemberGroup(/* in */ MemberList *ml, diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 17a0d4c..6932794 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -167,7 +167,7 @@ static void writeCombineScript() " xsltproc combine.xslt index.xml >all.xml\n" "-->\n" "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">\n" - " <xsl:output method=\"xml\" version=\"1.0\" indent=\"yes\" standalone=\"yes\" />\n" + " <xsl:output method=\"xml\" version=\"1.0\" indent=\"no\" standalone=\"yes\" />\n" " <xsl:template match=\"/\">\n" " <doxygen version=\"{doxygenindex/@version}\">\n" " <!-- Load all doxgen generated xml files -->\n" |