summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Regel <andreas.regel@newayselectronics.com>2018-05-28 11:12:22 (GMT)
committerAndreas Regel <andreas.regel@newayselectronics.com>2018-05-28 11:12:22 (GMT)
commite7fe7109421e75b75c7f8d50dd0e1c165b880eea (patch)
tree12a1a0410e689bacdcbce5541c6c1b2386379011 /src
parent9f7406d151e4f5d021558e97f5d87a0d9cacecf9 (diff)
parent63696c08425fc1662c5e76280e3cc74fb3769d80 (diff)
downloadDoxygen-e7fe7109421e75b75c7f8d50dd0e1c165b880eea.zip
Doxygen-e7fe7109421e75b75c7f8d50dd0e1c165b880eea.tar.gz
Doxygen-e7fe7109421e75b75c7f8d50dd0e1c165b880eea.tar.bz2
Merge branch 'master' into vhdl-localization
# Conflicts: # src/translator.h
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/cite.cpp2
-rw-r--r--src/clangparser.h2
-rw-r--r--src/classdef.cpp4
-rw-r--r--src/classdef.h2
-rw-r--r--src/code.l9
-rw-r--r--src/commentcnv.l8
-rw-r--r--src/commentscan.l64
-rw-r--r--src/condparser.cpp2
-rw-r--r--src/config.xml21
-rw-r--r--src/context.cpp2
-rw-r--r--src/definition.cpp10
-rw-r--r--src/diagram.cpp2
-rw-r--r--src/dirdef.cpp4
-rw-r--r--src/docparser.cpp65
-rw-r--r--src/docparser.h4
-rw-r--r--src/doctokenizer.l7
-rw-r--r--src/dot.cpp98
-rw-r--r--src/dot.h28
-rw-r--r--src/doxygen.cpp2
-rw-r--r--src/filedef.cpp4
-rw-r--r--src/formula.cpp4
-rw-r--r--src/fortrancode.l83
-rw-r--r--src/fortranscanner.l49
-rw-r--r--src/ftvhelp.cpp4
-rw-r--r--src/htmldocvisitor.cpp14
-rw-r--r--src/htmlgen.cpp41
-rw-r--r--src/htmlgen.h5
-rw-r--r--src/index.cpp7
-rwxr-xr-xsrc/languages.py2
-rw-r--r--src/latexdocvisitor.cpp16
-rw-r--r--src/latexgen.cpp187
-rw-r--r--src/latexgen.h5
-rw-r--r--src/mangen.cpp8
-rw-r--r--src/mangen.h5
-rw-r--r--src/markdown.cpp8
-rw-r--r--src/memberdef.cpp9
-rw-r--r--src/namespacedef.cpp2
-rw-r--r--src/outputgen.h5
-rw-r--r--src/outputlist.h10
-rw-r--r--src/pyscanner.l39
-rw-r--r--src/rtfgen.cpp2
-rw-r--r--src/rtfgen.h5
-rw-r--r--src/scanner.l34
-rw-r--r--src/searchindex.cpp1
-rw-r--r--src/tclscanner.l17
-rw-r--r--src/template.h4
-rw-r--r--src/translator.h31
-rw-r--r--src/translator_am.h4
-rw-r--r--src/translator_cn.h14
-rw-r--r--src/translator_dk.h3
-rw-r--r--src/translator_gr.h4
-rw-r--r--src/translator_je.h14
-rw-r--r--src/translator_jp.h12
-rw-r--r--src/translator_ke.h12
-rw-r--r--src/translator_kr.h12
-rw-r--r--src/translator_lv.h2
-rw-r--r--src/translator_no.h3
-rw-r--r--src/translator_pl.h10
-rw-r--r--src/translator_pt.h5
-rw-r--r--src/translator_sc.h5
-rw-r--r--src/translator_si.h2
-rw-r--r--src/translator_tw.h12
-rw-r--r--src/translator_vi.h16
-rw-r--r--src/util.cpp13
-rw-r--r--src/vhdlcode.l68
-rw-r--r--src/vhdldocgen.cpp14
-rw-r--r--src/vhdljjparser.cpp111
-rw-r--r--src/xmlgen.cpp2
69 files changed, 838 insertions, 439 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5c55efa..b57d360 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -119,7 +119,7 @@ FLEX_TARGET(xmlcode xmlcode.l ${GENERATED_SRC}/xmlcode.cpp
FLEX_TARGET(sqlcode sqlcode.l ${GENERATED_SRC}/sqlcode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(configimpl configimpl.l ${GENERATED_SRC}/configimpl.cpp COMPILE_FLAGS "${LEX_FLAGS}")
-BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS ${YACC_FLAGS})
+BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS "${YACC_FLAGS}")
add_library(doxycfg STATIC
${GENERATED_SRC}/lang_cfg.h
diff --git a/src/cite.cpp b/src/cite.cpp
index f86350b..b17800f 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -268,7 +268,7 @@ void CiteDict::generatePage() const
{
if (!bibFile.isEmpty())
{
- // bug_700510, multile times the same name were overwriting; creating new names
+ // bug_700510, multiple times the same name were overwriting; creating new names
// also for names with spaces
++i;
copyFile(bibFile,latexOutputDir + bibTmpFile + QCString().setNum(i) + ".bib");
diff --git a/src/clangparser.h b/src/clangparser.h
index 6072208..8bb9aba 100644
--- a/src/clangparser.h
+++ b/src/clangparser.h
@@ -19,7 +19,7 @@ class ClangParser
* @param[in,out] filesInTranslationUnit Other files that are
* part of the input and included by the file.
* The function will return a subset of the files,
- * only including the onces that were actually found
+ * only including the ones that were actually found
* during parsing.
*/
void start(const char *fileName,QStrList &filesInTranslationUnit);
diff --git a/src/classdef.cpp b/src/classdef.cpp
index f121e27..f810154 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -2687,7 +2687,7 @@ bool ClassDef::hasNonReferenceSuperClass()
return found;
}
-/*! called from MemberDef::writeDeclaration() to (recusively) write the
+/*! called from MemberDef::writeDeclaration() to (recursively) write the
* definition of an anonymous struct, union or class.
*/
void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup,
@@ -2873,7 +2873,7 @@ static bool isStandardFunc(MemberDef *md)
}
/*!
- * recusively merges the `all members' lists of a class base
+ * recursively merges the `all members' lists of a class base
* with that of this class. Must only be called for classes without
* subclasses!
*/
diff --git a/src/classdef.h b/src/classdef.h
index 23c5c5c..b169221 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -200,7 +200,7 @@ class ClassDef : public Definition
MemberDef *getMemberByName(const QCString &) const;
/** Returns TRUE iff \a bcd is a direct or indirect base class of this
- * class. This function will recusively traverse all branches of the
+ * class. This function will recursively traverse all branches of the
* inheritance tree.
*/
bool isBaseClass(ClassDef *bcd,bool followInstances,int level=0);
diff --git a/src/code.l b/src/code.l
index d7d5d74..74b360f 100644
--- a/src/code.l
+++ b/src/code.l
@@ -116,6 +116,7 @@ static int g_memCallContext;
static int g_lastCContext;
static int g_skipInlineInitContext;
+static bool g_insideCpp;
static bool g_insideObjC;
static bool g_insideJava;
static bool g_insideCS;
@@ -1823,7 +1824,7 @@ TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">"
SCOPETNAME (((({ID}{TEMPLIST}?){BN}*)?{SEP}{BN}*)*)((~{BN}*)?{ID})
SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*{SEP}{BN}*)+
KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize"|"@property")
-KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"set"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|"alignas"|"alignof"|{KEYWORD_OBJC})
+KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"set"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"null"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|"alignas"|"alignof"|{KEYWORD_OBJC})
FLOWKW ("break"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"return"|"switch"|"throw"|"throws"|"@catch"|"@finally")
FLOWCONDITION ("case"|"for"|"foreach"|"for each"|"goto"|"if"|"try"|"while"|"@try")
TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string"|"nullptr")
@@ -2415,6 +2416,8 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_prefixed_with_this_keyword = TRUE;
}
<Body>{KEYWORD}/([^a-z_A-Z0-9]) {
+ if (g_insideJava && qstrcmp("internal",yytext) ==0) REJECT;
+ if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT;
startFontClass("keyword");
codifyLines(yytext);
if (QCString(yytext)=="typedef")
@@ -2425,11 +2428,13 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
endFontClass();
}
<Body>{KEYWORD}/{B}* {
+ if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT;
startFontClass("keyword");
codifyLines(yytext);
endFontClass();
}
<Body>{KEYWORD}/{BN}*"(" {
+ if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT;
startFontClass("keyword");
codifyLines(yytext);
endFontClass();
@@ -2984,6 +2989,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
<MemberCall2,FuncCall>{KEYWORD}/([^a-z_A-Z0-9]) {
//addParmType();
//g_parmName=yytext;
+ if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT;
startFontClass("keyword");
g_code->codify(yytext);
endFontClass();
@@ -3742,6 +3748,7 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
g_insideJava = lang==SrcLangExt_Java;
g_insideCS = lang==SrcLangExt_CSharp;
g_insidePHP = lang==SrcLangExt_PHP;
+ g_insideCpp = lang==SrcLangExt_Cpp;
if (g_sourceFileDef)
{
setCurrentDoc("l00001");
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 44e2543..89d2fea 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -294,12 +294,12 @@ void replaceComment(int offset);
}
else
{
- /* check for fixed format; we might have some conditional as part of multilene if like C<5 .and. & */
+ /* check for fixed format; we might have some conditional as part of multiline if like C<5 .and. & */
if (isFixedForm && (g_col == 0))
{
copyToOutput(yytext,(int)yyleng);
g_nestingCount=0;
- g_commentStack.clear(); /* to be on the save side */
+ g_commentStack.clear(); /* to be on the safe side */
BEGIN(CComment);
g_commentStack.push(new CommentCtx(g_lineNr));
}
@@ -1093,7 +1093,9 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
if (Debug::isFlagSet(Debug::CommentCnv))
{
g_outBuf->at(g_outBuf->curPos())='\0';
- msg("-------------\n%s\n-------------\n",g_outBuf->data());
+ Debug::print(Debug::CommentCnv,0,"-----------\nCommentCnv: %s\n"
+ "output=[\n%s]\n-----------\n",fileName,g_outBuf->data()
+ );
}
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
}
diff --git a/src/commentscan.l b/src/commentscan.l
index 588d40a..55c55a7 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -548,7 +548,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
if (docEntry->sli)
{
QListIterator<ListItemInfo> slii(*docEntry->sli);
- for (slii.toFirst();(lii=slii.current());++slii)
+ for (slii.toLast();(lii=slii.current());--slii)
{
if (qstrcmp(lii->type,listName)==0)
{
@@ -563,14 +563,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
RefItem *item = refList->getRefItem(lii->itemId);
ASSERT(item!=0);
item->text += " <p>";
- if (Doxygen::markdownSupport)
- {
- item->text += processMarkdown(yyFileName,yyLineNr,current,outputXRef);
- }
- else
- {
- item->text += outputXRef;
- }
+ item->text += outputXRef;
//printf("%s: text +=%s\n",listName,item->text.data());
}
else // new item
@@ -585,14 +578,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
sprintf(anchorLabel,"_%s%06d",listName,itemId);
RefItem *item = refList->getRefItem(itemId);
ASSERT(item!=0);
- if (Doxygen::markdownSupport)
- {
- item->text = processMarkdown(yyFileName,yyLineNr,current,outputXRef);
- }
- else
- {
- item->text = outputXRef;
- }
+ item->text = outputXRef;
item->listAnchor = anchorLabel;
docEntry->addSpecialListItem(listName,itemId);
QCString cmdString;
@@ -1517,14 +1503,16 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (*yytext=='\n') yyLineNr++;
BEGIN( Comment );
}
+<GroupDocArg1>. { // ignore other stuff
+ }
<GroupDocArg2>"\\"{B}*"\n" { // line continuation
yyLineNr++;
addOutput('\n');
}
-<GroupDocArg2>[^\n\\\*]+ { // title (stored in type)
+<GroupDocArg2>[^\n\*]+ { // title (stored in type)
current->type += yytext;
current->type = current->type.stripWhiteSpace();
- }
+ }
<GroupDocArg2>{DOCNL} {
if ( current->groupDocType==Entry::GROUPDOC_NORMAL &&
current->type.isEmpty()
@@ -1860,10 +1848,10 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
addOutput(*yytext);
}
<FormatBlock><<EOF>> {
- QCString endTag = "@end"+blockName;
+ QCString endTag = "end"+blockName;
if (blockName=="startuml") endTag="enduml";
warn(yyFileName,yyLineNr,
- "reached end of comment while inside a @%s block; check for missing @%s tag!",
+ "reached end of comment while inside a \\%s block; check for missing \\%s tag!",
blockName.data(),endTag.data()
);
yyterminate();
@@ -1944,7 +1932,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "found @endif without matching start command");
+ "found \\endif without matching start command");
}
else
{
@@ -1962,7 +1950,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "found @else without matching start command");
+ "found \\else without matching start command");
}
else
{
@@ -1979,7 +1967,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "found @elseif without matching start command");
+ "found \\elseif without matching start command");
}
else
{
@@ -2943,7 +2931,19 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
langParser = parser;
current = curEntry;
if (comment.isEmpty()) return FALSE; // avoid empty strings
- inputString = comment;
+ if (Doxygen::markdownSupport)
+ {
+ inputString = processMarkdown(fileName,lineNr,NULL,comment);
+ QString qq(inputString);
+ while (qq.startsWith(" ")) qq = qq.mid(1);
+ while (qq.startsWith("\n")) qq = qq.mid(1);
+ if (qq.startsWith("<br>")) qq = qq.mid(4);
+ inputString = QCString(qq.data());
+ }
+ else
+ {
+ inputString = comment;
+ }
inputString.append(" ");
inputPosition = position;
yyLineNr = lineNr;
@@ -2970,7 +2970,7 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
}
Debug::print(Debug::CommentScan,0,"-----------\nCommentScanner: %s:%d\n"
- "input=[\n%s]\n",qPrint(fileName),lineNr,qPrint(comment)
+ "input=[\n%s]\n",qPrint(fileName),lineNr,qPrint(inputString)
);
commentscanYYrestart( commentscanYYin );
@@ -3008,15 +3008,9 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
openGroup(current,yyFileName,yyLineNr);
}
- if (Doxygen::markdownSupport)
- {
- current->brief = processMarkdown(fileName,lineNr,current,current->brief);
- current->doc = processMarkdown(fileName,lineNr,current,current->doc);
- current->inbodyDocs = processMarkdown(fileName,lineNr,current,current->inbodyDocs);
- }
-
- Debug::print(Debug::CommentScan,0,
- "brief=[line=%d\n%s]\ndocs=[line=%d\n%s]\ninbody=[line=%d\n%s]\n===========\n",
+ Debug::print(Debug::CommentScan,0,"-----------\nCommentScanner: %s:%d\noutput=[\n"
+ "brief=[line=%d\n%s]\ndocs=[line=%d\n%s]\ninbody=[line=%d\n%s]\n]\n===========\n",
+ qPrint(fileName),lineNr,
current->briefLine,qPrint(current->brief),
current->docLine,qPrint(current->doc),
current->inbodyLine,qPrint(current->inbodyDocs)
diff --git a/src/condparser.cpp b/src/condparser.cpp
index 6c5d787..ab33ae3 100644
--- a/src/condparser.cpp
+++ b/src/condparser.cpp
@@ -283,7 +283,7 @@ bool CondParser::parseVar()
}
/**
- * evaluate an operator for given valuess
+ * evaluate an operator for given values
*/
bool CondParser::evalOperator(int opId, bool lhs, bool rhs)
{
diff --git a/src/config.xml b/src/config.xml
index ca33470..2dcc0f4 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -125,7 +125,7 @@ SEARCHENGINE = YES
\endverbatim
To regenerate the Qt-1.44 documentation from the sources, you could use the
-following config file:
+following configuration file:
\verbatim
PROJECT_NAME = Qt
OUTPUT_DIRECTORY = qt_docs
@@ -212,7 +212,7 @@ Go to the <a href="commands.html">next</a> section or return to the
<option type='string' id='DOXYFILE_ENCODING' format='string' defval='UTF-8'>
<docs>
<![CDATA[
- This tag specifies the encoding used for all characters in the config file that
+ This tag specifies the encoding used for all characters in the configuration file that
follow. The default is UTF-8 which is also the encoding used for all text before
the first occurrence of this tag. Doxygen uses \c libiconv (or the iconv built into
\c libc) for the transcoding. See https://www.gnu.org/software/libiconv/ for the list of
@@ -1559,7 +1559,7 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
<docs>
<![CDATA[
If the \c REFERENCED_BY_RELATION tag is set to \c YES
- then for each documented function all documented
+ then for each documented entity all documented
functions referencing it will be listed.
]]>
</docs>
@@ -1606,7 +1606,7 @@ to disable this feature.
<br>
To use it do the following:
-# Install the latest version of \c global
- -# Enable \ref cfg_source_browser "SOURCE_BROWSER" and \c USE_HTAGS in the config file
+ -# Enable \ref cfg_source_browser "SOURCE_BROWSER" and \c USE_HTAGS in the configuration file
-# Make sure the \ref cfg_input "INPUT" points to the root of the source tree
-# Run \c doxygen as normal
<br>
@@ -2533,13 +2533,14 @@ EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
]]>
</docs>
</option>
- <option type='string' id='LATEX_CMD_NAME' format='file' defval='latex' depends='GENERATE_LATEX'>
+ <option type='string' id='LATEX_CMD_NAME' format='file' defval='' depends='GENERATE_LATEX'>
<docs>
<![CDATA[
The \c LATEX_CMD_NAME tag can be used to specify the \f$\mbox{\LaTeX}\f$ command name to be invoked.
- <br>Note that when enabling \ref cfg_use_pdflatex "USE_PDFLATEX" this option is only used for
- generating bitmaps for formulas in the HTML output, but not in the
- \c Makefile that is written to the output directory.
+ <br>Note that when not enabling \ref cfg_use_pdflatex "USE_PDFLATEX" the default is \c latex when
+ enabling \ref cfg_use_pdflatex "USE_PDFLATEX" the default is \c pdflatex and when in the later case
+ \c latex is chosen this is overwritten by \c pdflatex. For specific output languages the default can
+ have been set differently, this depends on the implementation of the output language.
]]>
</docs>
</option>
@@ -2772,7 +2773,7 @@ or
<docs>
<![CDATA[
Load stylesheet definitions from file. Syntax is similar to doxygen's
- config file, i.e. a series of assignments. You only have to provide
+ configuration file, i.e. a series of assignments. You only have to provide
replacements, missing definitions are set to their default value.
<br>
See also section \ref doxygen_usage for information on how to generate
@@ -2785,7 +2786,7 @@ or
<docs>
<![CDATA[
Set optional variables used in the generation of an RTF document.
- Syntax is similar to doxygen's config file.
+ Syntax is similar to doxygen's configuration file.
A template extensions file can be generated using
<code>doxygen -e rtf extensionFile</code>.
]]>
diff --git a/src/context.cpp b/src/context.cpp
index 063fb0e..c9a6bb3 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -246,7 +246,6 @@ class PropertyMapper
/** Add a property to the map
* @param[in] name The name of the property to add.
- * @param[in] obj The object handling access to the property.
* @param[in] handle The method to call when the property is accessed.
*/
void addProperty(const char *name,typename PropertyFunc::Handler handle)
@@ -262,6 +261,7 @@ class PropertyMapper
}
/** Gets the value of a property.
+ * @param[in] obj The object handling access to the property.
* @param[in] name The name of the property.
* @returns A variant representing the properties value or an
* invalid variant if it was not found.
diff --git a/src/definition.cpp b/src/definition.cpp
index ff30429..92baf0c 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -1034,15 +1034,15 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
- if (!latexSourceCode)
+ ol.disableAllBut(OutputGenerator::Html);
+ if (latexSourceCode)
{
- ol.disable(OutputGenerator::Latex);
+ ol.enable(OutputGenerator::Latex);
}
- if (!rtfSourceCode)
+ if (rtfSourceCode)
{
- ol.disable(OutputGenerator::RTF);
+ ol.enable(OutputGenerator::RTF);
}
- ol.disableAllBut(OutputGenerator::Html);
// write line link (HTML only)
ol.writeObjectLink(0,fn,anchorStr,lineStr);
ol.enableAll();
diff --git a/src/diagram.cpp b/src/diagram.cpp
index 42792ad..667aa85 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -833,7 +833,7 @@ void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
}
++rit; di=rit.current();
}
- // add last horizonal line and a vertical connection line
+ // add last horizontal line and a vertical connection line
if (bitmap)
{
if (doBase) // base classes
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index b247ba7..6631ed7 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -930,14 +930,14 @@ void buildDirectories()
for (;(fd=fni.current());++fni)
{
//printf("buildDirectories %s\n",fd->name().data());
- if (fd->getReference().isEmpty() && !fd->isDocumentationFile())
+ if (fd->getReference().isEmpty())
{
DirDef *dir;
if ((dir=Doxygen::directories->find(fd->getPath()))==0) // new directory
{
dir = DirDef::mergeDirectoryInTree(fd->getPath());
}
- if (dir) dir->addFile(fd);
+ if (dir && !fd->isDocumentationFile()) dir->addFile(fd);
}
else
{
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 3d57c2e..29c6ca7 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -451,11 +451,12 @@ static void checkArgumentName(const QCString &name,bool isParam)
}
/*! Checks if the parameters that have been specified using \@param are
- * indeed all parameters.
+ * indeed all parameters and that a parameter does not have multiple
+ * \@param blocks.
* Must be called after checkArgumentName() has been called for each
* argument.
*/
-static void checkUndocumentedParams()
+static void checkUnOrMultipleDocumentedParams()
{
if (g_memberDef && g_hasParamCommand && Config_getBool(WARN_IF_DOC_ERROR))
{
@@ -470,18 +471,37 @@ static void checkUndocumentedParams()
bool found=FALSE;
for (ali.toFirst();(a=ali.current());++ali)
{
+ int count = 0;
QCString argName = g_memberDef->isDefine() ? a->type : a->name;
if (lang==SrcLangExt_Fortran) argName = argName.lower();
argName=argName.stripWhiteSpace();
+ QCString aName = argName;
if (argName.right(3)=="...") argName=argName.left(argName.length()-3);
- if (g_memberDef->getLanguage()==SrcLangExt_Python && (argName=="self" || argName=="cls"))
+ if (lang==SrcLangExt_Python && (argName=="self" || argName=="cls"))
{
// allow undocumented self / cls parameter for Python
}
else if (!argName.isEmpty() && g_paramsFound.find(argName)==0 && a->docs.isEmpty())
{
found = TRUE;
- break;
+ }
+ else
+ {
+ QDictIterator<void> it1(g_paramsFound);
+ void *item1;
+ for (;(item1=it1.current());++it1)
+ {
+ if (argName == it1.currentKey()) count++;
+ }
+ }
+ if (count > 1)
+ {
+ warn_doc_error(g_memberDef->getDefFileName(),
+ g_memberDef->getDefLine(),
+ "argument '" + aName +
+ "' from the argument list of " +
+ QCString(g_memberDef->qualifiedName()) +
+ " has muliple @param documentation sections");
}
}
if (found)
@@ -497,7 +517,7 @@ static void checkUndocumentedParams()
QCString argName = g_memberDef->isDefine() ? a->type : a->name;
if (lang==SrcLangExt_Fortran) argName = argName.lower();
argName=argName.stripWhiteSpace();
- if (g_memberDef->getLanguage()==SrcLangExt_Python && (argName=="self" || argName=="cls"))
+ if (lang==SrcLangExt_Python && (argName=="self" || argName=="cls"))
{
// allow undocumented self / cls parameter for Python
}
@@ -5017,25 +5037,27 @@ void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type
void DocPara::handleImage(const QCString &cmdName)
{
+ QCString saveCmdName = cmdName;
+
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ qPrint(saveCmdName));
return;
}
tok=doctokenizerYYlex();
if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ qPrint(saveCmdName));
return;
}
DocImage::Type t;
@@ -5046,9 +5068,9 @@ void DocPara::handleImage(const QCString &cmdName)
else if (imgType=="rtf") t=DocImage::Rtf;
else
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"image type %s specified as the first argument of "
- "%s is not valid",
- qPrint(imgType),qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"output format %s specified as the first argument of "
+ "%s command is not valid",
+ qPrint(imgType),qPrint(saveCmdName));
return;
}
doctokenizerYYsetStateFile();
@@ -5057,7 +5079,7 @@ void DocPara::handleImage(const QCString &cmdName)
if (tok!=TK_WORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
HtmlAttribList attrList;
@@ -6125,16 +6147,15 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
}
}
}
- else if (findAttribute(tagHtmlAttribs,"langword",&cref)) // <see langword="..."/> or <see langworld="..."></see>
+ else if (findAttribute(tagHtmlAttribs,"langword",&cref)) // <see langword="..."/> or <see langword="..."></see>
{
- doctokenizerYYsetStatePara();
- DocLink *lnk = new DocLink(this,cref);
- m_children.append(lnk);
- QCString leftOver = lnk->parse(FALSE,TRUE);
- if (!leftOver.isEmpty())
- {
- m_children.append(new DocWord(this,leftOver));
- }
+ bool inSeeBlock = g_inSeeBlock;
+ g_token->name = cref;
+ g_inSeeBlock = TRUE;
+ m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Code,TRUE));
+ handleLinkedWord(this,m_children,TRUE);
+ m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Code,FALSE));
+ g_inSeeBlock = inSeeBlock;
}
else
{
@@ -7541,7 +7562,7 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
delete v;
}
- checkUndocumentedParams();
+ checkUnOrMultipleDocumentedParams();
detectNoDocumentedParams();
// TODO: These should be called at the end of the program.
diff --git a/src/docparser.h b/src/docparser.h
index 8fcbed6..d7390c2 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -277,7 +277,7 @@ class DocLinkedWord : public DocNode
QCString m_tooltip;
};
-/** Node representing an URL (or email address) */
+/** Node representing a URL (or email address) */
class DocURL : public DocNode
{
public:
@@ -306,7 +306,7 @@ class DocLineBreak : public DocNode
private:
};
-/** Node representing a horizonal ruler */
+/** Node representing a horizontal ruler */
class DocHorRuler : public DocNode
{
public:
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 90a8c55..e6b8865 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -387,7 +387,8 @@ LNKWORD2 (({SCOPEPRE}*"operator"{OPMASK})|({SCOPEPRE}"operator"{OPMASKOPT})|(("
LNKWORD3 ([0-9a-z_A-Z\-]+("/"|"\\"))*[0-9a-z_A-Z\-]+("."[0-9a-z_A-Z]+)+
CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
ESCWORD ("%"{ID}(("::"|"."){ID})*)|("%'")
-WORD1 {ESCWORD}|{CHARWORDQ}+|"{"|"}"|"'\"'"|("\""[^"\n]*\n?[^"\n]*"\"")
+CHARWORDQ1 [^ \-+0-9\t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
+WORD1 {ESCWORD}|{CHARWORDQ1}+|"{"|"}"|"'\"'"|("\""[^"\n]*\n?[^"\n]*"\"")
WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?"|"="|"'"
WORD1NQ {ESCWORD}|{CHARWORDQ}+|"{"|"}"
WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?"|"="|"'"
@@ -554,7 +555,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
g_token->indent = computeIndent(text,dotPos);
return TK_ENDLIST;
}
-<St_Para>"{"{BLANK}*"@link" {
+<St_Para>"{"{BLANK}*"@link"/{BLANK}+ {
g_token->name = "javalink";
return TK_COMMAND;
}
@@ -696,6 +697,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
}
/********* patterns for normal words ******************/
+<St_Para,St_Text>[\-+0-9] |
<St_Para,St_Text>{WORD1} |
<St_Para,St_Text>{WORD2} { /* function call */
if (yytext[0]=='%') // strip % if present
@@ -931,6 +933,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
g_token->name = yytext;
return TK_WORD;
}
+<St_TitleN>[\-+0-9] |
<St_TitleN>{WORD1} |
<St_TitleN>{WORD2} { /* word */
if (yytext[0]=='%') // strip % if present
diff --git a/src/dot.cpp b/src/dot.cpp
index 80703b9..eeb8b8b 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -266,6 +266,7 @@ static void writeGraphHeader(FTextStream &t,const QCString &title=QCString())
{
t << " // INTERACTIVE_SVG=YES\n";
}
+ t << " // LATEX_PDF_SIZE\n"; // write placeholder for LaTeX PDF bounding box size repacement
if (Config_getBool(DOT_TRANSPARENT))
{
t << " bgcolor=\"transparent\";" << endl;
@@ -437,6 +438,55 @@ static void unsetDotFontPath()
g_dotFontPath="";
}
+static bool resetPDFSize(const int width,const int height, const char *base)
+{
+ QString tmpName = QString::fromUtf8(QCString(base)+".tmp");
+ QString patchFile = QString::fromUtf8(QCString(base)+".dot");
+ if (!QDir::current().rename(patchFile,tmpName))
+ {
+ err("Failed to rename file %s to %s!\n",patchFile.data(),tmpName.data());
+ return FALSE;
+ }
+ QFile fi(tmpName);
+ QFile fo(patchFile);
+ if (!fi.open(IO_ReadOnly))
+ {
+ err("problem opening file %s for patching!\n",tmpName.data());
+ QDir::current().rename(tmpName,patchFile);
+ return FALSE;
+ }
+ if (!fo.open(IO_WriteOnly))
+ {
+ err("problem opening file %s for patching!\n",patchFile.data());
+ QDir::current().rename(tmpName,patchFile);
+ fi.close();
+ return FALSE;
+ }
+ FTextStream t(&fo);
+ const int maxLineLen=100*1024;
+ while (!fi.atEnd()) // foreach line
+ {
+ QCString line(maxLineLen);
+ int numBytes = fi.readLine(line.rawData(),maxLineLen);
+ if (numBytes<=0)
+ {
+ break;
+ }
+ line.resize(numBytes+1);
+ if (line.find("LATEX_PDF_SIZE") != -1)
+ {
+ double scale = (width > height ? width : height)/double(MAX_LATEX_GRAPH_INCH);
+ t << " size=\""<<width/scale << "," <<height/scale <<"\";\n";
+ }
+ else
+ t << line;
+ }
+ fi.close();
+ fo.close();
+ // remove temporary file
+ QDir::current().remove(tmpName);
+ return TRUE;
+}
static bool readBoundingBox(const char *fileName,int *width,int *height,bool isEps)
{
QCString bb = isEps ? QCString("%%PageBoundingBox:") : QCString("/MediaBox [");
@@ -765,10 +815,10 @@ DotRunner::DotRunner(const QCString &file,const QCString &path,
m_jobs.setAutoDelete(TRUE);
}
-void DotRunner::addJob(const char *format,const char *output)
+void DotRunner::addJob(const char *format,const char *output, const char *base)
{
QCString args = QCString("-T")+format+" -o \""+output+"\"";
- m_jobs.append(new DotConstString(args));
+ m_jobs.append(new DotConstString(args, base));
}
void DotRunner::addPostProcessing(const char *cmd,const char *args)
@@ -780,6 +830,7 @@ void DotRunner::addPostProcessing(const char *cmd,const char *args)
bool DotRunner::run()
{
int exitCode=0;
+ int width=0,height=0;
QCString dotArgs;
QListIterator<DotConstString> li(m_jobs);
@@ -792,9 +843,26 @@ bool DotRunner::run()
dotArgs+=' ';
dotArgs+=s->data();
}
- if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0)
+ if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ dotArgs=QCString("\"")+m_file.data()+"\"";
+ bool redo = FALSE;
+ for (li.toFirst();(s=li.current());++li)
+ {
+ if (s->pdfData())
+ {
+ if (!readBoundingBox(QCString(s->pdfData())+".pdf",&width,&height,FALSE)) goto error;
+ if ((width > MAX_LATEX_GRAPH_SIZE) || (height > MAX_LATEX_GRAPH_SIZE))
+ {
+ if (!resetPDFSize(width,height,s->pdfData())) goto error;
+ dotArgs+=' ';
+ dotArgs+=s->data();
+ redo = TRUE;
+ }
+ }
+ }
+ if (redo)
{
- goto error;
+ if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
}
}
else
@@ -802,9 +870,15 @@ bool DotRunner::run()
for (li.toFirst();(s=li.current());++li)
{
dotArgs=QCString("\"")+m_file.data()+"\" "+s->data();
- if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0)
+ if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ if (s->pdfData())
{
- goto error;
+ if (!readBoundingBox(QCString(s->pdfData())+".pdf",&width,&height,FALSE)) goto error;
+ if ((width > MAX_LATEX_GRAPH_SIZE) || (height > MAX_LATEX_GRAPH_SIZE))
+ {
+ if (!resetPDFSize(width,height,s->pdfData())) goto error;
+ if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ }
}
}
}
@@ -3150,7 +3224,7 @@ QCString DotClassGraph::writeGraph(FTextStream &out,
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE);
if (usePDFLatex)
{
- dotRun->addJob("pdf",absPdfName);
+ dotRun->addJob("pdf",absPdfName,absBaseName);
}
else
{
@@ -3508,7 +3582,7 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out,
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE);
if (usePDFLatex)
{
- dotRun->addJob("pdf",absPdfName);
+ dotRun->addJob("pdf",absPdfName,absBaseName);
}
else
{
@@ -3826,7 +3900,7 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE);
if (usePDFLatex)
{
- dotRun->addJob("pdf",absPdfName);
+ dotRun->addJob("pdf",absPdfName,absBaseName);
}
else
{
@@ -3992,7 +4066,7 @@ QCString DotDirDeps::writeGraph(FTextStream &out,
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE);
if (usePDFLatex)
{
- dotRun->addJob("pdf",absPdfName);
+ dotRun->addJob("pdf",absPdfName,absBaseName);
}
else
{
@@ -4170,7 +4244,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
{
if (Config_getBool(USE_PDFLATEX))
{
- dotRun.addJob("pdf",absOutFile+".pdf");
+ dotRun.addJob("pdf",absOutFile+".pdf",absOutFile);
}
else
{
@@ -4555,7 +4629,7 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t,
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE);
if (usePDFLatex)
{
- dotRun->addJob("pdf",absPdfName);
+ dotRun->addJob("pdf",absPdfName,absBaseName);
}
else
{
diff --git a/src/dot.h b/src/dot.h
index dce1a3a..ab6a316 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -42,6 +42,12 @@ class DotRunnerQueue;
enum GraphOutputFormat { GOF_BITMAP, GOF_EPS };
enum EmbeddedOutputFormat { EOF_Html, EOF_LaTeX, EOF_Rtf, EOF_DocBook };
+// the graphicx LaTeX has a limitation of maximum size of 16384
+// To be on the save side we take it a little bit smaller i.e. 150 inch * 72 dpi
+// It is anyway hard to view these size of images
+#define MAX_LATEX_GRAPH_INCH 150
+#define MAX_LATEX_GRAPH_SIZE (MAX_LATEX_GRAPH_INCH * 72)
+
/** Attributes of an edge of a dot graph */
struct EdgeInfo
{
@@ -338,11 +344,12 @@ class DotGroupCollaboration
class DotConstString
{
public:
- DotConstString() { m_str=0; }
- ~DotConstString() { delete[] m_str; }
- DotConstString(const QCString &s) : m_str(0) { set(s); }
- DotConstString(const DotConstString &s) : m_str(0) { set(s.data()); }
+ DotConstString() { m_str=0; m_pdfstr=0;}
+ ~DotConstString() { delete[] m_str; delete[] m_pdfstr;}
+ DotConstString(const QCString &s, const QCString &p = NULL) : m_str(0), m_pdfstr(0) { set(s); setpdf(p);}
+ DotConstString(const DotConstString &s) : m_str(0), m_pdfstr(0) { set(s.data()); }
const char *data() const { return m_str; }
+ const char *pdfData() const { return m_pdfstr; }
bool isEmpty() const { return m_str==0 || m_str[0]=='\0'; }
void set(const QCString &s)
{
@@ -354,9 +361,20 @@ class DotConstString
qstrcpy(m_str,s.data());
}
}
+ void setpdf(const QCString &p)
+ {
+ delete[] m_pdfstr;
+ m_pdfstr=0;
+ if (!p.isEmpty())
+ {
+ m_pdfstr=new char[p.length()+1];
+ qstrcpy(m_pdfstr,p.data());
+ }
+ }
private:
DotConstString &operator=(const DotConstString &);
char *m_str;
+ char *m_pdfstr;
};
/** Helper class to run dot from doxygen.
@@ -377,7 +395,7 @@ class DotRunner
/** Adds an additional job to the run.
* Performing multiple jobs one file can be faster.
*/
- void addJob(const char *format,const char *output);
+ void addJob(const char *format,const char *output, const char *base = NULL);
void addPostProcessing(const char *cmd,const char *args);
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 00826d6..263b59f 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -10965,7 +10965,7 @@ void parseInput()
/**************************************************************************
- * Check/create output directorties *
+ * Check/create output directories *
**************************************************************************/
QCString htmlOutput;
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 2cfe37a..e2df9be 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -1420,13 +1420,11 @@ bool FileDef::generateSourceFile() const
{
static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
static bool verbatimHeaders = Config_getBool(VERBATIM_HEADERS);
- QCString extension = name().right(4);
return !isReference() &&
(sourceBrowser ||
(verbatimHeaders && guessSection(name())==Entry::HEADER_SEC)
) &&
- extension!=".doc" && extension!=".txt" && extension!=".dox" &&
- extension!=".md" && name().right(9)!=".markdown";
+ !isDocumentationFile();
}
diff --git a/src/formula.cpp b/src/formula.cpp
index 6fe617d..9e48b2d 100644
--- a/src/formula.cpp
+++ b/src/formula.cpp
@@ -25,6 +25,7 @@
#include "util.h"
#include "message.h"
#include "config.h"
+#include "language.h"
#include "portable.h"
#include "index.h"
#include "doxygen.h"
@@ -96,8 +97,7 @@ void FormulaList::generateBitmaps(const char *path)
{
//printf("Running latex...\n");
//system("latex _formulas.tex </dev/null >/dev/null");
- QCString latexCmd = Config_getString(LATEX_CMD_NAME);
- if (latexCmd.isEmpty()) latexCmd="latex";
+ QCString latexCmd = theTranslator->latexCommandName();
portable_sysTimerStart();
if (portable_system(latexCmd,"_formulas.tex")!=0)
{
diff --git a/src/fortrancode.l b/src/fortrancode.l
index 501b492..14268cf 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -159,6 +159,9 @@ static char stringStartSymbol; // single or double quote
// declared from referenced names
static int bracketCount = 0;
+// signal when in type / class /procedure declaration
+static int inTypeDecl = 0;
+
static bool g_endComment;
static void endFontClass()
@@ -687,14 +690,14 @@ CHAR (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS}))
TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS}COMPLEX|DOUBLE{BS}PRECISION|{CHAR}|TYPE|CLASS|PROCEDURE)
INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")"
-ATTR_SPEC (IMPLICIT|ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|RECURSIVE|PURE|IMPURE|ELEMENTAL|VALUE|NOPASS|DEFERRED|CONTIGUOUS|VOLATILE)
+ATTR_SPEC (IMPLICIT|ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|(NON_)?RECURSIVE|PURE|IMPURE|ELEMENTAL|VALUE|NOPASS|DEFERRED|CONTIGUOUS|VOLATILE)
ACCESS_SPEC (PROTECTED|PRIVATE|PUBLIC)
/* Assume that attribute statements are almost the same as attributes. */
ATTR_STMT {ATTR_SPEC}|DIMENSION
FLOW (DO|SELECT|CASE|SELECT{BS}(CASE|TYPE)|WHERE|IF|THEN|ELSE|WHILE|FORALL|ELSEWHERE|ELSEIF|RETURN|CONTINUE|EXIT|GO{BS}TO)
COMMANDS (FORMAT|CONTAINS|MODULE{BS_}PROCEDURE|WRITE|READ|ALLOCATE|ALLOCATED|ASSOCIATED|PRESENT|DEALLOCATE|NULLIFY|SIZE|INQUIRE|OPEN|CLOSE|FLUSH|DATA|COMMON)
IGNORE (CALL)
-PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|IMPURE|PURE|ELEMENTAL)?
+PREFIX ((NON_)?RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,4}((NON_)?RECURSIVE|IMPURE|PURE|ELEMENTAL)?
/* | */
@@ -813,7 +816,8 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
unput(*yytext);
yy_pop_state();YY_FTN_RESET
}
-<Start>"import"{BS_} {
+<*>"import"{BS}/"\n" |
+<*>"import"{BS_} {
startFontClass("keywordtype");
codifyLines(yytext);
endFontClass();
@@ -825,6 +829,11 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
generateLink(*g_code, yytext);
g_insideBody=FALSE;
}
+<Import>("ONLY"|"NONE"|"ALL") {
+ startFontClass("keywordtype");
+ codifyLines(yytext);
+ endFontClass();
+ }
/*-------- fortran module -----------------------------------------*/
<Start>("block"{BS}"data"|"program"|"module"|"interface")/{BS_}|({COMMA}{ACCESS_SPEC})|\n { //
startScope();
@@ -836,14 +845,14 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
if (!qstricmp(yytext,"module")) currentModule="module";
}
<Start>("type")/{BS_}|({COMMA}({ACCESS_SPEC}|ABSTRACT|EXTENDS))|\n { //
- startScope();
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
+ startScope();
+ startFontClass("keyword");
+ codifyLines(yytext);
+ endFontClass();
yy_push_state(YY_START);
- BEGIN(ClassName);
- currentClass="class";
- }
+ BEGIN(ClassName);
+ currentClass="class";
+ }
<ClassName>{ID} {
if (currentModule == "module")
{
@@ -853,7 +862,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
generateLink(*g_code,yytext);
yy_pop_state();
}
-<ClassName>({ACCESS_SPEC}|ABSTRACT|EXTENDS)/[,:( ] { //| variable deklaration
+<ClassName>({ACCESS_SPEC}|ABSTRACT|EXTENDS)/[,:( ] { //| variable declaration
startFontClass("keyword");
g_code->codify(yytext);
endFontClass();
@@ -876,7 +885,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
codifyLines(yytext);
endFontClass();
}
-<Start>({PREFIX}{BS_})?{SUBPROG}{BS_} { // Fortran subroutine or function found
+<Start>({PREFIX}{BS_})?{SUBPROG}{BS_} { // Fortran subroutine or function found
startFontClass("keyword");
codifyLines(yytext);
endFontClass();
@@ -922,7 +931,18 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
endFontClass();
}
/*-------- variable declaration ----------------------------------*/
+<Start>^{BS}"real"/[,:( ] { // real is a bit tricky as it is a data type but also a function.
+ yy_push_state(YY_START);
+ BEGIN(Declaration);
+ startFontClass("keywordtype");
+ g_code->codify(yytext);
+ endFontClass();
+ }
<Start>{TYPE_SPEC}/[,:( ] {
+ QCString typ = yytext;
+ typ = removeRedundantWhiteSpace(typ.lower());
+ if (QString(typ).startsWith("real")) YY_FTN_REJECT;
+ if (typ == "type" || typ == "class" || typ == "procedure") inTypeDecl = 1;
yy_push_state(YY_START);
BEGIN(Declaration);
startFontClass("keywordtype");
@@ -934,7 +954,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
g_code->codify(yytext);
endFontClass();
}
-<Declaration>({TYPE_SPEC}|{ATTR_SPEC})/[,:( ] { //| variable deklaration
+<Declaration>({TYPE_SPEC}|{ATTR_SPEC})/[,:( ] { //| variable declaration
startFontClass("keywordtype");
g_code->codify(yytext);
endFontClass();
@@ -946,7 +966,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
g_code->codify(yytext);
endFontClass();
}
- else if (g_currentMemberDef && ((g_currentMemberDef->isFunction() && (g_currentMemberDef->typeString() != QCString("subroutine"))) ||
+ else if (g_currentMemberDef && ((g_currentMemberDef->isFunction() && (g_currentMemberDef->typeString() != QCString("subroutine") || inTypeDecl)) ||
g_currentMemberDef->isVariable()))
{
generateLink(*g_code, yytext);
@@ -956,22 +976,23 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
g_code->codify(yytext);
addLocalVar(yytext);
}
- }
-<Declaration>{BS}("=>"|"="){BS} { // Procedure binding
- BEGIN(DeclarationBinding);
- g_code->codify(yytext);
- }
-<DeclarationBinding>{ID} { // Type bound procedure link
+ }
+<Declaration>{BS}("=>"|"="){BS} { // Procedure binding
+ BEGIN(DeclarationBinding);
+ g_code->codify(yytext);
+ }
+<DeclarationBinding>{ID} { // Type bound procedure link
generateLink(*g_code, yytext);
yy_pop_state();
- }
-<Declaration>[(] { // start of array specification
+ }
+<Declaration>[(] { // start of array or type / class specification
bracketCount++;
g_code->codify(yytext);
}
<Declaration>[)] { // end array specification
bracketCount--;
+ if (!bracketCount) inTypeDecl = 0;
g_code->codify(yytext);
}
@@ -1175,14 +1196,16 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
/*-----------------------------------------------------------------------------*/
<*>\n {
- if (g_endComment)
- {
- g_endComment=FALSE;
- }
- else
- {
- codifyLines(yytext);
- }
+ if (g_endComment)
+ {
+ g_endComment=FALSE;
+ }
+ else
+ {
+ codifyLines(yytext);
+ // comment cannot extend over the end of a line so should always be terminatd at the end of the line.
+ if (g_currentFontClass && !strcmp(g_currentFontClass,"comment")) endFontClass();
+ }
g_contLineNr++;
YY_FTN_RESET
}
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index 85b6de9..774251b 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -198,6 +198,8 @@ static SymbolModifiers currentModifiers;
//! Holds program scope->symbol name->symbol modifiers.
static QMap<Entry*,QMap<QCString,SymbolModifiers> > modifiers;
+static Entry *global_scope = NULL;
+
//-----------------------------------------------------------------------------
static int yyread(char *buf,int max_size);
@@ -248,6 +250,7 @@ SUBPROG (subroutine|function)
B [ \t]
BS [ \t]*
BS_ [ \t]+
+BT_ ([ \t]+|[ \t]*"(")
COMMA {BS},{BS}
ARGS_L0 ("("[^)]*")")
ARGS_L1a [^()]*"("[^)]*")"[^)]*
@@ -271,7 +274,7 @@ ATTR_STMT {ATTR_SPEC}|DIMENSION|{ACCESS_SPEC}
EXTERNAL_STMT (EXTERNAL)
CONTAINS CONTAINS
-PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|IMPURE|PURE|ELEMENTAL)?
+PREFIX ((NON_)?RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,4}((NON_)?RECURSIVE|IMPURE|PURE|ELEMENTAL)?
SCOPENAME ({ID}{BS}"::"{BS})*
%option noyywrap
@@ -558,7 +561,18 @@ SCOPENAME ({ID}{BS}"::"{BS})*
if (!endScope(current_root))
yyterminate();
defaultProtection = Public;
- yy_pop_state();
+ if (global_scope)
+ {
+ if (global_scope != (Entry *) -1)
+ yy_push_state(Start);
+ else
+ yy_pop_state(); // cannot pop artrificial entry
+ }
+ else
+ {
+ yy_push_state(Start);
+ global_scope = (Entry *)-1; // signal that the global_scope has already been used.
+ }
}
<Module>{ID} {
addModule(yytext, TRUE);
@@ -602,7 +616,7 @@ abstract {
current->spec |= Entry::AbstractClass;
}
extends{ARGS} {
- QCString basename = extractFromParens(yytext);
+ QCString basename = extractFromParens(yytext).lower();
current->extends->append(new BaseInfo(basename, Public, Normal));
}
public {
@@ -667,7 +681,8 @@ private {
addCurrentEntry(1);
}
{BS}"=>"[^(\n|\!)]* { /* Specific bindings come after the ID. */
- last_entry->args = yytext;
+ QCString args = yytext;
+ last_entry->args = args.lower();
}
"\n" {
currentModifiers = SymbolModifiers();
@@ -773,8 +788,10 @@ private {
}
{ID} {
}
-^{BS}"type"{BS_}"is"/{BS_} { }
+^{BS}"type"{BS_}"is"/{BT_} { }
^{BS}"type"{BS}"=" { }
+^{BS}"class"{BS_}"is"/{BT_} { }
+^{BS}"class"{BS_}"default" { }
}
<AttributeList>{
{COMMA} {}
@@ -1098,7 +1115,6 @@ private {
yy_push_state(YY_START);
BEGIN(StrIgnore);
debugStr="*!";
- //fprintf(stderr,"start comment %d\n",yyLineNr);
}
}
}
@@ -1552,7 +1568,10 @@ const char* prepassFixedForm(const char* contents, int *hasContLine)
}
// fallthrough
default:
- if(column==6 && emptyLabel) { // continuation
+ if ((column < 6) && ((c - '0') >= 0) && ((c - '0') <= 9)) { // remove numbers, i.e. labels from first 5 positions.
+ newContents[j]=' ';
+ }
+ else if(column==6 && emptyLabel) { // continuation
if (!commented) fullCommentLine=FALSE;
if (c != '0') { // 0 not allowed as continuation character, see f95 standard paragraph 3.3.2.3
newContents[j]=' ';
@@ -2017,14 +2036,23 @@ static void startScope(Entry *scope)
*/
static bool endScope(Entry *scope, bool isGlobalRoot)
{
+ if (global_scope == scope)
+ {
+ global_scope = NULL;
+ return TRUE;
+ }
+ if (global_scope == (Entry *) -1)
+ {
+ return TRUE;
+ }
//cout<<"end scope: "<<scope->name<<endl;
if (current_root->parent() || isGlobalRoot)
{
current_root= current_root->parent(); /* end substructure */
}
- else
+ else // if (current_root != scope)
{
- fprintf(stderr,"parse error in end <scopename>");
+ fprintf(stderr,"parse error in end <scopename>\n");
scanner_abort();
return FALSE;
}
@@ -2558,6 +2586,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt, Fortra
yyFileName = fileName;
msg("Parsing file %s...\n",yyFileName.data());
+ global_scope = rt;
startScope(rt); // implies current_root = rt
initParser();
groupEnterFile(yyFileName,yyLineNr);
@@ -2579,7 +2608,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt, Fortra
fortranscannerYYlex();
groupLeaveFile(yyFileName,yyLineNr);
- endScope(current_root, TRUE); // TRUE - global root
+ if (global_scope && global_scope != (Entry *) -1) endScope(current_root, TRUE); // TRUE - global root
//debugCompounds(rt); //debug
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp
index b04da62..14c94a3 100644
--- a/src/ftvhelp.cpp
+++ b/src/ftvhelp.cpp
@@ -302,6 +302,10 @@ void FTVHelp::generateLink(FTextStream &t,FTVNode *n)
else
t << "\" target=\"_self\">";
}
+ else
+ {
+ t << ">";
+ }
t << convertToHtml(n->name);
t << "</a>";
if (!n->ref.isEmpty())
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 8b6d26c..6a9c142 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -126,21 +126,29 @@ static bool mustBeOutsideParagraph(DocNode *n)
return FALSE;
}
-static QString htmlAttribsToString(const HtmlAttribList &attribs)
+static QString htmlAttribsToString(const HtmlAttribList &attribs, const bool img_tag = FALSE)
{
QString result;
HtmlAttribListIterator li(attribs);
HtmlAttrib *att;
+ bool alt_set = FALSE;
+
for (li.toFirst();(att=li.current());++li)
{
if (!att->value.isEmpty()) // ignore attribute without values as they
- // are not XHTML compliant
+ // are not XHTML compliant, with the exception
+ // of the alt attribute with the img tag
{
result+=" ";
result+=att->name;
result+="=\""+convertToXML(att->value)+"\"";
+ if (att->name == "alt") alt_set = TRUE;
}
}
+ if (!alt_set && img_tag)
+ {
+ result+=" alt=\"\"";
+ }
return result;
}
@@ -1521,7 +1529,7 @@ void HtmlDocVisitor::visitPre(DocImage *img)
else
{
m_t << "<img src=\"" << correctURL(url,img->relPath()) << "\""
- << sizeAttribs << htmlAttribsToString(img->attribs())
+ << sizeAttribs << htmlAttribsToString(img->attribs(), TRUE)
<< "/>" << endl;
}
}
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index cc3e61d..740b2f5 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -375,7 +375,7 @@ static QCString substituteHtmlKeywords(const QCString &s,
mathJaxJs += "\n";
}
mathJaxJs += "</script>";
- mathJaxJs += "<script type=\"text/javascript\" async src=\"" + path + "MathJax.js\"></script>\n";
+ mathJaxJs += "<script type=\"text/javascript\" async=\"async\" src=\"" + path + "MathJax.js\"></script>\n";
}
// first substitute generic keywords
@@ -1428,13 +1428,7 @@ void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char *
t << " inherit " << inheritId;
}
t << "\">";
- switch(annoType)
- {
- case 0: t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break;
- case 1: t << "<td class=\"memItemLeft\" >"; break;
- case 2: t << "<td class=\"memItemLeft\" valign=\"top\">"; break;
- default: t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
- }
+ insertMemberAlignLeft(annoType, true);
}
void HtmlGenerator::endMemberItem()
@@ -1466,7 +1460,19 @@ void HtmlGenerator::insertMemberAlign(bool templ)
t << "&#160;</td><td class=\"" << className << "\" valign=\"bottom\">";
}
-void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId)
+void HtmlGenerator::insertMemberAlignLeft(int annoType, bool initTag)
+{
+ if (!initTag) t << "&#160;</td>";
+ switch(annoType)
+ {
+ case 0: t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break;
+ case 1: t << "<td class=\"memItemLeft\" >"; break;
+ case 2: t << "<td class=\"memItemLeft\" valign=\"top\">"; break;
+ default: t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
+ }
+}
+
+void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId, bool typ)
{
DBG_HTML(t << "<!-- startMemberDescription -->" << endl)
if (m_emptySection)
@@ -1479,7 +1485,10 @@ void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheri
{
t << " inherit " << inheritId;
}
- t << "\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">";
+ t << "\">";
+ t << "<td class=\"mdescLeft\">&#160;</td>";
+ if (typ) t << "<td class=\"mdescLeft\">&#160;</td>";
+ t << "<td class=\"mdescRight\">";;
}
void HtmlGenerator::endMemberDescription()
@@ -1505,7 +1514,7 @@ void HtmlGenerator::endMemberSections()
}
}
-void HtmlGenerator::startMemberHeader(const char *anchor)
+void HtmlGenerator::startMemberHeader(const char *anchor, int typ)
{
DBG_HTML(t << "<!-- startMemberHeader -->" << endl)
if (!m_emptySection)
@@ -1518,7 +1527,7 @@ void HtmlGenerator::startMemberHeader(const char *anchor)
t << "<table class=\"memberdecls\">" << endl;
m_emptySection=FALSE;
}
- t << "<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\">";
+ t << "<tr class=\"heading\"><td colspan=\"" << typ << "\"><h2 class=\"groupheader\">";
if (anchor)
{
t << "<a name=\"" << anchor << "\"></a>" << endl;
@@ -2354,7 +2363,7 @@ void HtmlGenerator::writeSearchPage()
if (cf.open(IO_WriteOnly))
{
FTextStream t(&cf);
- t << "<script language=\"php\">\n\n";
+ t << "<?php\n\n";
t << "$config = array(\n";
t << " 'PROJECT_NAME' => \"" << convertToHtml(projectName) << "\",\n";
t << " 'GENERATE_TREEVIEW' => " << (generateTreeView?"true":"false") << ",\n";
@@ -2372,7 +2381,7 @@ void HtmlGenerator::writeSearchPage()
t << " 'split_bar' => \"" << substitute(substitute(writeSplitBarAsString("search",""), "\"","\\\""), "\n","\\n") << "\",\n";
t << " 'logo' => \"" << substitute(substitute(writeLogoAsString(""), "\"","\\\""), "\n","\\n") << "\",\n";
t << ");\n\n";
- t << "</script>\n";
+ t << "?>\n";
}
ResourceMgr::instance().copyResource("search_functions.php",htmlOutput);
@@ -2403,10 +2412,10 @@ void HtmlGenerator::writeSearchPage()
t << "</div>" << endl;
}
- t << "<script language=\"php\">\n";
+ t << "<?php\n";
t << "require_once \"search_functions.php\";\n";
t << "main();\n";
- t << "</script>\n";
+ t << "?>\n";
// Write empty navigation path, to make footer connect properly
if (generateTreeView)
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 82f0c17..2d8d6e0 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -175,7 +175,7 @@ class HtmlGenerator : public OutputGenerator
void endMemberSections();
void startHeaderSection();
void endHeaderSection();
- void startMemberHeader(const char *);
+ void startMemberHeader(const char *, int);
void endMemberHeader();
void startMemberSubtitle();
void endMemberSubtitle();
@@ -200,7 +200,8 @@ class HtmlGenerator : public OutputGenerator
void endMemberGroup(bool);
void insertMemberAlign(bool);
- void startMemberDescription(const char *anchor,const char *inheritId);
+ void insertMemberAlignLeft(int,bool);
+ void startMemberDescription(const char *anchor,const char *inheritId, bool typ);
void endMemberDescription();
void startMemberDeclaration() {}
void endMemberDeclaration(const char *anchor,const char *inheritId);
diff --git a/src/index.cpp b/src/index.cpp
index 0f12ca4..3706bbf 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -1638,10 +1638,15 @@ static void writeAnnotatedClassList(OutputList &ol)
ol.endIndexList();
}
+inline bool isId1(int c)
+{
+ return (c<127 && c>31); // printable ASCII character
+}
+
static QCString letterToLabel(uint startLetter)
{
char s[11]; // max 0x12345678 + '\0'
- if (isId(startLetter)) // printable ASCII character
+ if (isId1(startLetter)) // printable ASCII character
{
s[0]=(char)startLetter;
s[1]=0;
diff --git a/src/languages.py b/src/languages.py
index 2b02b3e..5bb65cf 100755
--- a/src/languages.py
+++ b/src/languages.py
@@ -1,5 +1,5 @@
#
-# This file is an aid to generated the Languages rules file.
+# This file is an aid to generate the Languages rules file.
# usage:
# python languages.py > ..\winbuild\Languages.rules
#
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 5a67c15..86ceade 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -526,7 +526,19 @@ void LatexDocVisitor::visit(DocIncOperator *op)
void LatexDocVisitor::visit(DocFormula *f)
{
if (m_hide) return;
- m_t << f->text();
+ const char *p=f->text();
+ char c;
+ if (p)
+ {
+ while ((c=*p++))
+ {
+ switch (c)
+ {
+ case '\'': m_t << "\\text{'}"; break;
+ default: m_t << c; break;
+ }
+ }
+ }
}
void LatexDocVisitor::visit(DocIndexEntry *i)
@@ -927,7 +939,7 @@ static void writeStartTableCommand(FTextStream &t,const DocNode *n,int cols)
}
else
{
- t << "\\tabulinesep=1mm\n\\begin{longtabu} spread 0pt [c]{*{" << cols << "}{|X[-1]}|}\n";
+ t << "\\tabulinesep=1mm\n\\begin{longtabu}spread 0pt [c]{*{" << cols << "}{|X[-1]}|}\n";
}
//return isNested ? "TabularNC" : "TabularC";
}
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 1511dcb..7a2ea59 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -38,6 +38,7 @@
#include "filename.h"
#include "resourcemgr.h"
+static bool DoxyCodeOpen = FALSE;
//-------------------------------
LatexCodeGenerator::LatexCodeGenerator(FTextStream &t,const QCString &relPath,const QCString &sourceFileName)
@@ -77,8 +78,8 @@ void LatexCodeGenerator::codify(const char *str)
//char cs[5];
int spacesToNextTabStop;
static int tabSize = Config_getInt(TAB_SIZE);
- const int maxLineLen = 108;
- QCString result(4*maxLineLen+1); // worst case for 1 line of 4-byte chars
+ static char *result = NULL;
+ static int lresult = 0;
int i;
while ((c=*p))
{
@@ -86,9 +87,17 @@ void LatexCodeGenerator::codify(const char *str)
{
case 0x0c: p++; // remove ^L
break;
+ case ' ': m_t <<" ";
+ m_col++;
+ p++;
+ break;
+ case '^': m_t <<"\\string^";
+ m_col++;
+ p++;
+ break;
case '\t': spacesToNextTabStop =
tabSize - (m_col%tabSize);
- m_t << Doxygen::spaces.left(spacesToNextTabStop);
+ for (i = 0; i < spacesToNextTabStop; i++) m_t <<" ";
m_col+=spacesToNextTabStop;
p++;
break;
@@ -100,6 +109,11 @@ void LatexCodeGenerator::codify(const char *str)
#undef COPYCHAR
// helper macro to copy a single utf8 character, dealing with multibyte chars.
#define COPYCHAR() do { \
+ if (lresult < (i + 5)) \
+ { \
+ lresult += 512; \
+ result = (char *)realloc(result, lresult); \
+ } \
result[i++]=c; p++; \
if (c<0) /* multibyte utf-8 character */ \
{ \
@@ -116,30 +130,16 @@ void LatexCodeGenerator::codify(const char *str)
result[i++]=*p++; \
} \
} \
- m_col++; \
+ m_col++; \
} while(0)
- // gather characters until we find whitespace or are at
- // the end of a line
+ // gather characters until we find whitespace or another special character
COPYCHAR();
- if (m_col>=maxLineLen) // force line break
- {
- m_t << "\n ";
- m_col=0;
- }
- else // copy more characters
+ while ((c=*p) &&
+ c!=0x0c && c!='\t' && c!='\n' && c!=' ' && c!='^'
+ )
{
- while (m_col<maxLineLen && (c=*p) &&
- c!=0x0c && c!='\t' && c!='\n' && c!=' '
- )
- {
- COPYCHAR();
- }
- if (m_col>=maxLineLen) // force line break
- {
- m_t << "\n ";
- m_col=0;
- }
+ COPYCHAR();
}
result[i]=0; // add terminator
//if (m_prettyCode)
@@ -190,6 +190,11 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co
{
static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ if (!DoxyCodeOpen)
+ {
+ m_t << "\\DoxyCodeLine{";
+ DoxyCodeOpen = TRUE;
+ }
if (m_prettyCode)
{
QCString lineNumber;
@@ -223,10 +228,20 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co
void LatexCodeGenerator::startCodeLine(bool)
{
m_col=0;
+ if (!DoxyCodeOpen)
+ {
+ m_t << "\\DoxyCodeLine{";
+ DoxyCodeOpen = TRUE;
+ }
}
void LatexCodeGenerator::endCodeLine()
{
+ if (DoxyCodeOpen)
+ {
+ m_t << "}";
+ DoxyCodeOpen = FALSE;
+ }
codify("\n");
}
@@ -271,13 +286,15 @@ static void writeLatexMakefile()
exit(1);
}
// inserted by KONNO Akihisa <konno@researchers.jp> 2002-03-05
- QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ QCString latex_command = theTranslator->latexCommandName();
QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME);
// end insertion by KONNO Akihisa <konno@researchers.jp> 2002-03-05
FTextStream t(&file);
if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
{
- t << "all: refman.dvi" << endl
+ t << "LATEX_CMD=" << latex_command << endl
+ << endl
+ << "all: refman.dvi" << endl
<< endl
<< "ps: refman.ps" << endl
<< endl
@@ -294,7 +311,7 @@ static void writeLatexMakefile()
t << "\tps2pdf refman.ps refman.pdf" << endl << endl;
t << "refman.dvi: clean refman.tex doxygen.sty" << endl
<< "\techo \"Running latex...\"" << endl
- << "\t" << latex_command << " refman.tex" << endl
+ << "\t$(LATEX_CMD) refman.tex" << endl
<< "\techo \"Running makeindex...\"" << endl
<< "\t" << mkidx_command << " refman.idx" << endl;
if (generateBib)
@@ -302,19 +319,19 @@ static void writeLatexMakefile()
t << "\techo \"Running bibtex...\"" << endl;
t << "\tbibtex refman" << endl;
t << "\techo \"Rerunning latex....\"" << endl;
- t << "\t" << latex_command << " refman.tex" << endl;
+ t << "\t$(LATEX_CMD) refman.tex" << endl;
}
t << "\techo \"Rerunning latex....\"" << endl
- << "\t" << latex_command << " refman.tex" << endl
+ << "\t$(LATEX_CMD) refman.tex" << endl
<< "\tlatex_count=8 ; \\" << endl
<< "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl
<< "\t do \\" << endl
<< "\t echo \"Rerunning latex....\" ;\\" << endl
- << "\t " << latex_command << " refman.tex ;\\" << endl
+ << "\t $(LATEX_CMD) refman.tex ; \\" << endl
<< "\t latex_count=`expr $$latex_count - 1` ;\\" << endl
<< "\t done" << endl
<< "\t" << mkidx_command << " refman.idx" << endl
- << "\t" << latex_command << " refman.tex" << endl << endl
+ << "\t$(LATEX_CMD) refman.tex" << endl << endl
<< "refman_2on1.ps: refman.ps" << endl
<< "\tpsnup -2 refman.ps >refman_2on1.ps" << endl
<< endl
@@ -323,26 +340,28 @@ static void writeLatexMakefile()
}
else // use pdflatex for higher quality output
{
+ t << "LATEX_CMD=" << latex_command << endl
+ << endl;
t << "all: refman.pdf" << endl << endl
<< "pdf: refman.pdf" << endl << endl;
t << "refman.pdf: clean refman.tex" << endl;
- t << "\tpdflatex refman" << endl;
+ t << "\t$(LATEX_CMD) refman" << endl;
t << "\t" << mkidx_command << " refman.idx" << endl;
if (generateBib)
{
t << "\tbibtex refman" << endl;
- t << "\tpdflatex refman" << endl;
+ t << "\t$(LATEX_CMD) refman" << endl;
}
- t << "\tpdflatex refman" << endl
+ t << "\t$(LATEX_CMD) refman" << endl
<< "\tlatex_count=8 ; \\" << endl
<< "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl
<< "\t do \\" << endl
<< "\t echo \"Rerunning latex....\" ;\\" << endl
- << "\t pdflatex refman ;\\" << endl
+ << "\t $(LATEX_CMD) refman ;\\" << endl
<< "\t latex_count=`expr $$latex_count - 1` ;\\" << endl
<< "\t done" << endl
<< "\t" << mkidx_command << " refman.idx" << endl
- << "\tpdflatex refman" << endl << endl;
+ << "\t$(LATEX_CMD) refman" << endl << endl;
}
t << endl
@@ -356,7 +375,7 @@ static void writeMakeBat()
#if defined(_MSC_VER)
QCString dir=Config_getString(LATEX_OUTPUT);
QCString fileName=dir+"/make.bat";
- QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ QCString latex_command = theTranslator->latexCommandName();
QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME);
QFile file(fileName);
bool generateBib = !Doxygen::citeDict->isEmpty();
@@ -371,14 +390,15 @@ static void writeMakeBat()
t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\n\n";
if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
{
- t << latex_command << " refman.tex\n";
+ t << "set LATEX_CMD=" << latex_command << "\n";
+ t << "%LATEX_CMD% refman.tex\n";
t << "echo ----\n";
t << mkidx_command << " refman.idx\n";
if (generateBib)
{
t << "bibtex refman\n";
t << "echo ----\n";
- t << latex_command << " refman.tex\n";
+ t << "\t%LATEX_CMD% refman.tex\n";
}
t << "setlocal enabledelayedexpansion\n";
t << "set count=8\n";
@@ -390,28 +410,29 @@ static void writeMakeBat()
t << "set /a count-=1\n";
t << "if !count! EQU 0 goto :skip\n\n";
t << "echo ----\n";
- t << latex_command << " refman.tex\n";
+ t << "%LATEX_CMD% refman.tex\n";
t << "goto :repeat\n";
t << ":skip\n";
t << "endlocal\n";
t << mkidx_command << " refman.idx\n";
- t << latex_command << " refman.tex\n";
+ t << "%LATEX_CMD% refman.tex\n";
t << "dvips -o refman.ps refman.dvi\n";
t << "gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "
"-sOutputFile=refman.pdf -c save pop -f refman.ps\n";
}
else // use pdflatex
{
- t << "pdflatex refman\n";
+ t << "set LATEX_CMD=" << latex_command << "\n";
+ t << "%LATEX_CMD% refman\n";
t << "echo ----\n";
t << mkidx_command << " refman.idx\n";
if (generateBib)
{
t << "bibtex refman" << endl;
- t << "pdflatex refman" << endl;
+ t << "%LATEX_CMD% refman" << endl;
}
t << "echo ----\n";
- t << "pdflatex refman\n\n";
+ t << "%LATEX_CMD% refman\n\n";
t << "setlocal enabledelayedexpansion\n";
t << "set count=8\n";
t << ":repeat\n";
@@ -422,12 +443,12 @@ static void writeMakeBat()
t << "set /a count-=1\n";
t << "if !count! EQU 0 goto :skip\n\n";
t << "echo ----\n";
- t << "pdflatex refman\n";
+ t << "%LATEX_CMD% refman\n";
t << "goto :repeat\n";
t << ":skip\n";
t << "endlocal\n";
t << mkidx_command << " refman.idx\n";
- t << "pdflatex refman\n";
+ t << "%LATEX_CMD% refman\n";
t << "cd /D %Dir_Old%\n";
t << "set Dir_Old=\n";
}
@@ -472,8 +493,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
t << "% Packages required by doxygen\n"
"\\usepackage{fixltx2e}\n" // for \textsubscript
"\\usepackage{calc}\n"
- "\\usepackage{doxygen}\n"
- "\\usepackage[export]{adjustbox} % also loads graphicx\n";
+ "\\usepackage{doxygen}\n";
QStrList extraLatexStyle = Config_getList(LATEX_EXTRA_STYLESHEET);
for (uint i=0; i<extraLatexStyle.count(); ++i)
{
@@ -504,6 +524,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\\usepackage{textcomp}\n"
"\\usepackage[nointegrals]{wasysym}\n"
"\\usepackage[table]{xcolor}\n"
+ "\\usepackage{ifpdf,ifxetex}\n"
"\n";
// Language support
@@ -516,9 +537,13 @@ static void writeDefaultHeaderPart1(FTextStream &t)
}
// Define default fonts
- t << "% Font selection\n"
- "\\usepackage[T1]{fontenc}\n"
- "\\usepackage[scaled=.90]{helvet}\n"
+ t << "% Font selection\n";
+ QCString fontenc = theTranslator->latexFontenc();
+ if (!fontenc.isEmpty())
+ {
+ t << "\\usepackage[" << fontenc << "]{fontenc}\n";
+ }
+ t << "\\usepackage[scaled=.90]{helvet}\n"
"\\usepackage{courier}\n"
"\\usepackage{amssymb}\n"
"\\usepackage{sectsty}\n"
@@ -625,13 +650,46 @@ static void writeDefaultHeaderPart1(FTextStream &t)
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (pdfHyperlinks)
{
+ unsigned char minus[4]; // Superscript minus
+ char *pminus = (char *)minus;
+ unsigned char sup2[3]; // Superscript two
+ char *psup2 = (char *)sup2;
+ unsigned char sup3[3];
+ char *psup3 = (char *)sup3; // Superscript three
+ minus[0]= 0xE2;
+ minus[1]= 0x81;
+ minus[2]= 0xBB;
+ minus[3]= 0;
+ sup2[0]= 0xC2;
+ sup2[1]= 0xB2;
+ sup2[2]= 0;
+ sup3[0]= 0xC2;
+ sup3[1]= 0xB3;
+ sup3[2]= 0;
+
t << "% Hyperlinks (required, but should be loaded last)\n"
- "\\usepackage{ifpdf}\n"
"\\ifpdf\n"
" \\usepackage[pdftex,pagebackref=true]{hyperref}\n"
"\\else\n"
- " \\usepackage[ps2pdf,pagebackref=true]{hyperref}\n"
+ " \\ifxetex\n"
+ " \\usepackage[pagebackref=true]{hyperref}\n"
+ " \\else\n"
+ " \\usepackage[ps2pdf,pagebackref=true]{hyperref}\n"
+ " \\fi\n"
+ "\\fi\n"
+ "\\ifpdf\n"
+ " \\DeclareUnicodeCharacter{207B}{${}^{-}$}% Superscript minus\n"
+ " \\DeclareUnicodeCharacter{C2B2}{${}^{2}$}% Superscript two\n"
+ " \\DeclareUnicodeCharacter{C2B3}{${}^{3}$}% Superscript three\n"
+ "\\else\n"
+ " \\catcode`\\" << pminus << "=13% Superscript minus\n"
+ " \\def" << pminus << "{${}^{-}$}\n"
+ " \\catcode`\\" << psup2 << "=13% Superscript two\n"
+ " \\def" << psup2 << "{${}^{2}$}\n"
+ " \\catcode`\\"<<psup3<<"=13% Superscript three\n"
+ " \\def"<<psup3<<"{${}^{3}$}\n"
"\\fi\n"
+ "\n"
"\\hypersetup{%\n"
" colorlinks=true,%\n"
" linkcolor=blue,%\n"
@@ -652,12 +710,18 @@ static void writeDefaultHeaderPart1(FTextStream &t)
t << "\\usepackage{caption}\n"
<< "\\captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top}\n\n";
+ // prevent numbers overlap the titles in toc
+ t << "\\renewcommand{\\numberline}[1]{#1~}\n";
+
// End of preamble, now comes the document contents
t << "%===== C O N T E N T S =====\n"
"\n"
"\\begin{document}\n";
- if (theTranslator->idLanguage()=="greek")
- t << "\\selectlanguage{greek}\n";
+ QCString documentPre = theTranslator->latexDocumentPre();
+ if (!documentPre.isEmpty())
+ {
+ t << documentPre;
+ }
t << "\n";
// Front matter
@@ -748,10 +812,15 @@ static void writeDefaultFooter(FTextStream &t)
t << "\\newpage\n"
"\\phantomsection\n"
"\\clearemptydoublepage\n"
- "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trRTFGeneralIndex() << "}\n"
+ "\\addcontentsline{toc}{" << unit << "}{\\indexname}\n"
"\\printindex\n"
- "\n"
- "\\end{document}\n";
+ "\n";
+ QCString documentPost = theTranslator->latexDocumentPost();
+ if (!documentPost.isEmpty())
+ {
+ t << documentPost;
+ }
+ t << "\\end{document}\n";
}
void LatexGenerator::writeHeaderFile(QFile &f)
@@ -1505,7 +1574,7 @@ void LatexGenerator::endGroupHeader(int)
t << "}" << endl;
}
-void LatexGenerator::startMemberHeader(const char *)
+void LatexGenerator::startMemberHeader(const char *,int)
{
if (Config_getBool(COMPACT_LATEX))
{
@@ -1793,7 +1862,7 @@ void LatexGenerator::endMemberItem()
t << endl;
}
-void LatexGenerator::startMemberDescription(const char *,const char *)
+void LatexGenerator::startMemberDescription(const char *,const char *,bool)
{
if (!insideTabbing)
{
diff --git a/src/latexgen.h b/src/latexgen.h
index 430d250..469e411 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -169,7 +169,7 @@ class LatexGenerator : public OutputGenerator
void endMemberSections() {}
void startHeaderSection() {}
void endHeaderSection() {}
- void startMemberHeader(const char *);
+ void startMemberHeader(const char *,int);
void endMemberHeader();
void startMemberSubtitle() {}
void endMemberSubtitle() {}
@@ -194,6 +194,7 @@ class LatexGenerator : public OutputGenerator
void endMemberGroup(bool);
void insertMemberAlign(bool) {}
+ void insertMemberAlignLeft(int,bool){}
void writeRuler() { t << endl << endl; }
void writeAnchor(const char *fileName,const char *name);
@@ -225,7 +226,7 @@ class LatexGenerator : public OutputGenerator
void endCenter() { t << "\\end{center}" << endl; }
void startSmall() { t << "\\footnotesize "; }
void endSmall() { t << "\\normalsize "; }
- void startMemberDescription(const char *,const char *);
+ void startMemberDescription(const char *,const char *,bool);
void endMemberDescription();
void startMemberDeclaration() {}
void endMemberDeclaration(const char *,const char *) {}
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 17e6003..d23b2fe 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -283,7 +283,7 @@ void ManGenerator::endGroupHeader(int)
upperCase=FALSE;
}
-void ManGenerator::startMemberHeader(const char *)
+void ManGenerator::startMemberHeader(const char *,int)
{
if (!firstCol) t << endl;
t << ".SS \"";
@@ -619,9 +619,9 @@ void ManGenerator::startSection(const char *,const char *,SectionInfo::SectionTy
{
case SectionInfo::Page: startGroupHeader(FALSE); break;
case SectionInfo::Section: startGroupHeader(FALSE); break;
- case SectionInfo::Subsection: startMemberHeader(0); break;
- case SectionInfo::Subsubsection: startMemberHeader(0); break;
- case SectionInfo::Paragraph: startMemberHeader(0); break;
+ case SectionInfo::Subsection: startMemberHeader(0, -1); break;
+ case SectionInfo::Subsubsection: startMemberHeader(0, -1); break;
+ case SectionInfo::Paragraph: startMemberHeader(0, -1); break;
default: ASSERT(0); break;
}
}
diff --git a/src/mangen.h b/src/mangen.h
index b3b9f76..0413ffd 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -99,9 +99,10 @@ class ManGenerator : public OutputGenerator
void endMemberSections() {}
void startHeaderSection() {}
void endHeaderSection();
- void startMemberHeader(const char *);
+ void startMemberHeader(const char *,int);
void endMemberHeader();
void insertMemberAlign(bool) {}
+ void insertMemberAlignLeft(int,bool){}
void startMemberSubtitle() {}
void endMemberSubtitle() {}
//void writeListItem();
@@ -160,7 +161,7 @@ class ManGenerator : public OutputGenerator
void endCenter() {}
void startSmall() {}
void endSmall() {}
- void startMemberDescription(const char *,const char *) { t << "\n.RI \""; firstCol=FALSE; }
+ void startMemberDescription(const char *,const char *,bool) { t << "\n.RI \""; firstCol=FALSE; }
void endMemberDescription() { t << "\""; firstCol=FALSE; }
void startMemberDeclaration() {}
void endMemberDeclaration(const char *,const char *) {}
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 1cd06e5..f7526dc 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -240,7 +240,7 @@ static QCString isBlockCommand(const char *data,int offset,int size)
{
return "f]";
}
- else if (data[end]=='}')
+ else if (data[end]=='{')
{
return "f}";
}
@@ -483,6 +483,8 @@ static int processNmdash(GrowBuf &out,const char *data,int off,int size)
{
count++;
}
+ if (count==2 && off>=2 && qstrncmp(data-2,"<!",2)==0) return 0; // start HTML comment
+ if (count==2 && (data[2]=='>')) return 0; // end HTML comment
if (count==2 && (off<8 || qstrncmp(data-8,"operator",8)!=0)) // -- => ndash
{
out.addStr("&ndash;");
@@ -2061,7 +2063,7 @@ static int writeCodeBlock(GrowBuf &out,const char *data,int size,int refIndent)
}
// start searching for the end of the line start at offset \a i
-// keeping track of possible blocks that need to to skipped.
+// keeping track of possible blocks that need to be skipped.
static void findEndOfLine(GrowBuf &out,const char *data,int size,
int &pi,int&i,int &end)
{
@@ -2548,7 +2550,7 @@ QCString processMarkdown(const QCString &fileName,const int lineNr,Entry *e,cons
// finally process the inline markup (links, emphasis and code spans)
processInline(out,s,s.length());
out.addChar(0);
- Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n---------\n",qPrint(input),qPrint(out.get()));
+ Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n=========\n",qPrint(input),qPrint(out.get()));
return out.get();
}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index c9f9121..9be2ecb 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -101,7 +101,7 @@ static QCString addTemplateNames(const QCString &s,const QCString &n,const QCStr
// ol.endParameterName(last==FALSE)
// ...
// ol.startParameterType(first=FALSE)
-// ol.endParamtereType
+// ol.endParameterType
// ol.startParameterName
// ol.endParameterName(last==TRUE)
// ...
@@ -571,7 +571,7 @@ class MemberDefImpl
bool stat; // is it a static function?
bool proto; // is it a prototype;
bool docEnumValues; // is an enum with documented enum values.
- bool annScope; // member is part of an annoymous scope
+ bool annScope; // member is part of an anonymous scope
bool annUsed;
bool hasCallGraph;
bool hasCallerGraph;
@@ -3212,7 +3212,10 @@ QCString MemberDef::memberTypeName() const
void MemberDef::warnIfUndocumented()
{
- if (m_impl->memberGroup) return;
+ /*
+ * Removed bug_303020:
+ * if (m_impl->memberGroup) return;
+ */
ClassDef *cd = getClassDef();
NamespaceDef *nd = getNamespaceDef();
FileDef *fd = getFileDef();
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index c674760..d3eb0df 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -961,7 +961,7 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,
bool found=FALSE;
for (ni.toFirst();(nd=ni.current()) && !found;++ni)
{
- if (nd->isLinkable())
+ if (nd->isLinkable() && nd->hasDocumentation())
{
SrcLangExt lang = nd->getLanguage();
if (SrcLangExt_IDL==lang)
diff --git a/src/outputgen.h b/src/outputgen.h
index 68356b4..44d34b8 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -380,7 +380,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endMemberSections() = 0;
virtual void startHeaderSection() = 0;
virtual void endHeaderSection() = 0;
- virtual void startMemberHeader(const char *anchor) = 0;
+ virtual void startMemberHeader(const char *anchor, int typ) = 0;
virtual void endMemberHeader() = 0;
virtual void startMemberSubtitle() = 0;
virtual void endMemberSubtitle() = 0;
@@ -403,6 +403,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void startMemberGroup() = 0;
virtual void endMemberGroup(bool) = 0;
virtual void insertMemberAlign(bool) = 0;
+ virtual void insertMemberAlignLeft(int,bool) = 0;
virtual void startMemberDoc(const char *,const char *,
const char *,const char *,int,int,bool) = 0;
virtual void endMemberDoc(bool) = 0;
@@ -414,7 +415,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name) = 0;
virtual void writeEndAnnoItem(const char *name) = 0;
- virtual void startMemberDescription(const char *anchor,const char *inheritId) = 0;
+ virtual void startMemberDescription(const char *anchor,const char *inheritId, bool typ) = 0;
virtual void endMemberDescription() = 0;
virtual void startMemberDeclaration() = 0;
virtual void endMemberDeclaration(const char *anchor,const char *inheritId) = 0;
diff --git a/src/outputlist.h b/src/outputlist.h
index 0738ed1..2e89101 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -191,8 +191,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startHeaderSection); }
void endHeaderSection()
{ forall(&OutputGenerator::endHeaderSection); }
- void startMemberHeader(const char *anchor)
- { forall(&OutputGenerator::startMemberHeader,anchor); }
+ void startMemberHeader(const char *anchor, int typ = 2)
+ { forall(&OutputGenerator::startMemberHeader,anchor,typ); }
void endMemberHeader()
{ forall(&OutputGenerator::endMemberHeader); }
void startMemberSubtitle()
@@ -237,6 +237,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endMemberGroup,last); }
void insertMemberAlign(bool templ=FALSE)
{ forall(&OutputGenerator::insertMemberAlign,templ); }
+ void insertMemberAlignLeft(int typ=0, bool templ=FALSE)
+ { forall(&OutputGenerator::insertMemberAlignLeft,typ,templ); }
void writeRuler()
{ forall(&OutputGenerator::writeRuler); }
void writeAnchor(const char *fileName,const char *name)
@@ -306,8 +308,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startBold); }
void endBold()
{ forall(&OutputGenerator::endBold); }
- void startMemberDescription(const char *anchor,const char *inheritId=0)
- { forall(&OutputGenerator::startMemberDescription,anchor,inheritId); }
+ void startMemberDescription(const char *anchor,const char *inheritId=0, bool typ = false)
+ { forall(&OutputGenerator::startMemberDescription,anchor,inheritId, typ); }
void endMemberDescription()
{ forall(&OutputGenerator::endMemberDescription); }
void startMemberDeclaration()
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 9c21d41..5c9aef5 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -109,7 +109,7 @@ static QCString g_packageName;
//static bool g_hideClassDocs;
-static QCString g_defVal;
+static QGString g_defVal;
static int g_braceCount;
static bool g_lexInit = FALSE;
@@ -993,35 +993,49 @@ STARTDOCSYMS "##"
}
<FunctionParamDefVal>{
- "(" { // internal opening brace
+ "[" |
+ "(" { // internal opening brace, assumption is that we have correct code so braces do match
g_braceCount++;
g_defVal+=*yytext;
}
"," |
+ "]" |
")" {
if (g_braceCount==0) // end of default argument
{
if (current->argList->getLast())
{
- current->argList->getLast()->defval=g_defVal.stripWhiteSpace();
+ current->argList->getLast()->defval=QCString(g_defVal.data()).stripWhiteSpace();
}
- if (*yytext == ')')
+ if (*yytext != ',')
current->args = argListToString(current->argList);
BEGIN(FunctionParams);
}
else // continue
{
- if (*yytext == ')')g_braceCount--;
+ if (*yytext != ',')g_braceCount--;
g_defVal+=*yytext;
}
}
- . {
- g_defVal+=*yytext;
- }
+ "'" {
+ g_defVal+=*yytext;
+ g_copyString=&g_defVal;
+ g_stringContext=FunctionParamDefVal;
+ BEGIN( SingleQuoteString );
+ }
+ "\"" {
+ g_defVal+=*yytext;
+ g_copyString=&g_defVal;
+ g_stringContext=FunctionParamDefVal;
+ BEGIN( DoubleQuoteString );
+ }
\n {
g_defVal+=*yytext;
incLineNr();
}
+ . {
+ g_defVal+=*yytext;
+ }
}
@@ -1168,13 +1182,17 @@ STARTDOCSYMS "##"
current->program+=yytext;
BEGIN(TripleComment);
}
-
{TRISINGLEQUOTE} { // start of a comment block
initTriSingleQuoteBlock();
current->program+=yytext;
BEGIN(TripleComment);
}
-
+ {STARTDOCSYMS}[#]* { // start of a special comment
+ initSpecialBlock();
+ BEGIN(SpecialComment);
+ }
+ {POUNDCOMMENT} { // ignore comment with just one #
+ }
^{BB} {
current->program+=yytext;
//current->startLine = yyLineNr;
@@ -1187,7 +1205,6 @@ STARTDOCSYMS "##"
}
""/({NONEMPTY}|{EXPCHAR}) {
-
// Just pushback an empty class, and
// resume parsing the body.
newEntry();
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 70a4c78..e41700b 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -1626,7 +1626,7 @@ void RTFGenerator::endDescItem()
newParagraph();
}
-void RTFGenerator::startMemberDescription(const char *,const char *)
+void RTFGenerator::startMemberDescription(const char *,const char *,bool)
{
DBG_RTF(t << "{\\comment (startMemberDescription)}" << endl)
t << "{" << endl;
diff --git a/src/rtfgen.h b/src/rtfgen.h
index d8f6ca7..1eb7db0 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -103,7 +103,7 @@ class RTFGenerator : public OutputGenerator
void endMemberSections() {}
void startHeaderSection() {}
void endHeaderSection() {}
- void startMemberHeader(const char *) { startGroupHeader(FALSE); }
+ void startMemberHeader(const char *,int) { startGroupHeader(FALSE); }
void endMemberHeader() { endGroupHeader(FALSE); }
void startMemberSubtitle();
void endMemberSubtitle();
@@ -120,6 +120,7 @@ class RTFGenerator : public OutputGenerator
void startMemberTemplateParams() {}
void endMemberTemplateParams(const char *,const char *) {}
void insertMemberAlign(bool) {}
+ void insertMemberAlignLeft(int,bool){}
void writeRuler() { rtfwriteRuler_thin(); }
@@ -156,7 +157,7 @@ class RTFGenerator : public OutputGenerator
void startSmall() { t << "{\\sub "; }
void endSmall() { t << "}"; }
- void startMemberDescription(const char *,const char *);
+ void startMemberDescription(const char *,const char *,bool);
void endMemberDescription();
void startMemberDeclaration() {}
void endMemberDeclaration(const char *,const char *) {}
diff --git a/src/scanner.l b/src/scanner.l
index fd1568b..3609d32 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -755,6 +755,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
%x CopyHereDocEnd
%x RawString
%x RawGString
+%x CSString
%x IDLAttribute
%x IDLProp
@@ -2381,10 +2382,6 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
{
current->protection = Protected;
}
- else if (javaLike && qstrcmp(yytext,"internal")==0)
- {
- current->protection = Package;
- }
else if (javaLike && qstrcmp(yytext,"private")==0)
{
current->protection = Private;
@@ -3638,7 +3635,10 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->startColumn = yyColNr;
- current->type = "@"; // enum marker
+ if (!(current_root->spec&Entry::Enum))
+ {
+ current->type = "@"; // enum marker
+ }
current->args = current->args.simplifyWhiteSpace();
current->name = current->name.stripWhiteSpace();
current->section = Entry::VARIABLE_SEC;
@@ -6235,8 +6235,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<CSAccessorDecl>"add" { if (curlyCount==0) current->spec |= Entry::Addable; }
<CSAccessorDecl>"remove" { if (curlyCount==0) current->spec |= Entry::Removable; }
<CSAccessorDecl>"raise" { if (curlyCount==0) current->spec |= Entry::Raisable; }
-<CSAccessorDecl>. {}
+<CSAccessorDecl>"\"" { BEGIN(CSString);}
+<CSAccessorDecl>"." {}
<CSAccessorDecl>\n { lineCount(); }
+<CSString>"\"" { BEGIN(CSAccessorDecl);}
+<CSString>"//" {} // Otherwise the rule <*>"//" will kick in
+<CSString>"/*" {} // Otherwise the rule <*>"/*" will kick in
+<CSString>\n { lineCount(); }
+<CSString>"." {}
@@ -6611,6 +6617,22 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(SkipString);
}
}
+<*>\? {
+ if (insideCS)
+ {
+ if (current->type.isEmpty())
+ {
+ if (current->name.isEmpty())
+ current->name="?";
+ else
+ current->name+="?";
+ }
+ else
+ {
+ current->type+="?";
+ }
+ }
+ }
<*>.
<SkipComment>"//"|"/*"
<*>"/*" { lastCContext = YY_START ;
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index 6fb2432..6276eae 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -1180,6 +1180,7 @@ void writeJavascriptSearchIndex()
SearchIndexList *sl;
for (it.toFirst();(sl=it.current());++it) // for each letter
{
+ if ( sl->letter() == '"' ) t << QString( QChar( '\\' ) ).utf8();
t << QString( QChar( sl->letter() ) ).utf8();
}
t << "\"";
diff --git a/src/tclscanner.l b/src/tclscanner.l
index 791ecc4..56d2e3d 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -703,6 +703,7 @@ static void tcl_codify(const char *s,const char *str)
}
else
{
+ if (*(p-2)==0x1A) *(p-2) = '\0'; // remove ^Z
tcl.code->codify(sp);
done=TRUE;
}
@@ -3024,11 +3025,6 @@ void TclLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf,
}
tcl_inf("%s (%d,%d) %d %d\n",myStr.ascii(),startLine,endLine,isExampleBlock,inlineFragment);
//tcl_inf("%s\n"input.data());
- if (isExampleBlock)
- {
- tcl_codify(NULL,input);
- return;
- }
tcl_init();
tcl.collectXRefs = collectXRefs;
tcl.memberdef = memberDef;
@@ -3047,8 +3043,15 @@ tcl_inf("%s (%d,%d) %d %d\n",myStr.ascii(),startLine,endLine,isExampleBlock,inli
}
tcl.file_name = "";
tcl.this_parser = NULL;
- tcl.entry_main = tcl_entry_new();
- tcl_parse(myNs,myCls);
+ if (isExampleBlock)
+ {
+ tcl_codify(NULL,input);
+ }
+ else
+ {
+ tcl.entry_main = tcl_entry_new();
+ tcl_parse(myNs,myCls);
+ }
tcl.code->endCodeLine();
tcl.scan.clear();
tcl.ns.clear();
diff --git a/src/template.h b/src/template.h
index 98ae7ed..4602c53 100644
--- a/src/template.h
+++ b/src/template.h
@@ -368,7 +368,7 @@ class TemplateListIntf
/** Increase object's reference count */
virtual int addRef() = 0;
- /** Decreases object's referenc count, destroy object if 0 */
+ /** Decreases object's reference count, destroy object if 0 */
virtual int release() = 0;
};
@@ -417,7 +417,7 @@ class TemplateStructIntf
/** Increase object's reference count */
virtual int addRef() = 0;
- /** Decreases object's referenc count, destroy object if 0 */
+ /** Decreases object's reference count, destroy object if 0 */
virtual int release() = 0;
};
diff --git a/src/translator.h b/src/translator.h
index 7ee49cf..9da2317 100644
--- a/src/translator.h
+++ b/src/translator.h
@@ -19,6 +19,7 @@
#define TRANSLATOR_H
#include "classdef.h"
+#include "config.h"
#include "vhdldocgen.h"
/** Abstract base class for all translatable text fragments. */
@@ -42,6 +43,36 @@ class Translator
virtual QCString idLanguage() = 0;
virtual QCString latexLanguageSupportCommand() = 0;
+ /*!
+ * Sets the LaTeX font encoding to be used. The default is set to `T1`,
+ * in case another font encoding has to be used this can be specified with
+ * this routine. In case no font encoding is required the empty string
+ * can be returned.
+ */
+ virtual QCString latexFontenc() { return "T1"; }
+ /*!
+ * Sets the commands to be insered directly after the `\\begin{document}`
+ * in the LaTeX document.
+ */
+ virtual QCString latexDocumentPre() { return ""; }
+ /*!
+ * Sets the commands to be insered directly before the `\\end{document}`
+ * in the LaTeX document.
+ */
+ virtual QCString latexDocumentPost() { return ""; }
+ /*!
+ * Set the name to be used as latex command.
+ */
+ virtual QCString latexCommandName()
+ {
+ QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ if (latex_command.isEmpty()) latex_command = "latex";
+ if (Config_getBool(USE_PDFLATEX))
+ {
+ if (latex_command == "latex") latex_command = "pdflatex";
+ }
+ return latex_command;
+ }
// --- Language translation methods -------------------
diff --git a/src/translator_am.h b/src/translator_am.h
index 6f5e671..5b4c446 100644
--- a/src/translator_am.h
+++ b/src/translator_am.h
@@ -32,8 +32,8 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/* Used to get the command(s) for the language support. */
virtual QCString latexLanguageSupportCommand()
{
- return "<pre>\\usepackage[latin]{armtex}\n"
- "\\usepackage[armscii8]{inputenc}\n</pre>";
+ return "\\usepackage[latin]{armtex}\n"
+ "\\usepackage[armscii8]{inputenc}\n";
}
// --- Language translation methods -------------------
diff --git a/src/translator_cn.h b/src/translator_cn.h
index ec39e11..0e559c1 100644
--- a/src/translator_cn.h
+++ b/src/translator_cn.h
@@ -53,8 +53,20 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
*/
virtual QCString latexLanguageSupportCommand()
{
+ return "\\usepackage{CJKutf8}\n";
+ }
+ virtual QCString latexFontenc()
+ {
return "";
}
+ virtual QCString latexDocumentPre()
+ {
+ return "\\begin{CJK}{UTF8}{min}\n";
+ }
+ virtual QCString latexDocumentPost()
+ {
+ return "\\end{CJK}\n";
+ }
/*! used in the compound documentation before a list of related functions.
*/
@@ -100,7 +112,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
virtual QCString trMore()
{ return "更多..."; }
- /*! put in the class documention */
+ /*! put in the class documentation */
virtual QCString trListOfAllMembers()
{ return "所有成员列表"; }
diff --git a/src/translator_dk.h b/src/translator_dk.h
index e98cfa8..70e9032 100644
--- a/src/translator_dk.h
+++ b/src/translator_dk.h
@@ -116,8 +116,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
virtual QCString latexLanguageSupportCommand()
{
return
- "\\usepackage[danish]{babel}\n"
- "\\usepackage[T1]{fontenc}\n";
+ "\\usepackage[danish]{babel}\n";
}
// --- Language translation methods -------------------
diff --git a/src/translator_gr.h b/src/translator_gr.h
index 2b60f3d..6ed43db 100644
--- a/src/translator_gr.h
+++ b/src/translator_gr.h
@@ -59,8 +59,8 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
virtual QCString latexLanguageSupportCommand()
{
- //return "\\usepackage[greek,english]{babel}\n\\usepackage[iso-8859-7]{inputenc}\n";
- return "\\usepackage[greek,english]{babel}\n";
+ return "\\usepackage[greek,english]{babel}\n"
+ "\\usepackage{alphabeta}\n";
}
// --- Language translation methods -------------------
diff --git a/src/translator_je.h b/src/translator_je.h
index 835a516..d555421 100644
--- a/src/translator_je.h
+++ b/src/translator_je.h
@@ -36,7 +36,19 @@ class TranslatorJapaneseEn : public TranslatorEnglish
{ return "japanese-en"; }
virtual QCString latexLanguageSupportCommand()
{
- return "platex";
+ return "\\usepackage{CJKutf8}\n";
+ }
+ virtual QCString latexFontenc()
+ {
+ return "";
+ }
+ virtual QCString latexDocumentPre()
+ {
+ return "\\begin{CJK}{UTF8}{min}\n";
+ }
+ virtual QCString latexDocumentPost()
+ {
+ return "\\end{CJK}\n";
}
virtual QCString trRTFansicp()
{
diff --git a/src/translator_jp.h b/src/translator_jp.h
index b35a2b3..fc0d65d 100644
--- a/src/translator_jp.h
+++ b/src/translator_jp.h
@@ -77,8 +77,20 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
virtual QCString latexLanguageSupportCommand()
{
+ return "\\usepackage{CJKutf8}\n";
+ }
+ virtual QCString latexFontenc()
+ {
return "";
}
+ virtual QCString latexDocumentPre()
+ {
+ return "\\begin{CJK}{UTF8}{min}\n";
+ }
+ virtual QCString latexDocumentPost()
+ {
+ return "\\end{CJK}\n";
+ }
/*! used in the compound documentation before a list of related functions. */
virtual QCString trRelatedFunctions()
diff --git a/src/translator_ke.h b/src/translator_ke.h
index 525cf84..c9f488c 100644
--- a/src/translator_ke.h
+++ b/src/translator_ke.h
@@ -35,12 +35,22 @@ class TranslatorKoreanEn : public TranslatorEnglish
{ return "korean-en"; }
virtual QCString latexLanguageSupportCommand()
{
- return "\\usepackage{hfont}\n";
+ return "\\usepackage{kotex}\n";
}
virtual QCString trRTFansicp()
{
return "949";
}
+ virtual QCString latexCommandName()
+ {
+ QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ if (latex_command.isEmpty()) latex_command = "latex";
+ if (Config_getBool(USE_PDFLATEX))
+ {
+ if (latex_command == "latex") latex_command = "xelatex";
+ }
+ return latex_command;
+ }
/*! Used as ansicpg for RTF fcharset
* \see trRTFansicp() for a table of possible values.
diff --git a/src/translator_kr.h b/src/translator_kr.h
index c60d1ac..fb1c356 100644
--- a/src/translator_kr.h
+++ b/src/translator_kr.h
@@ -86,7 +86,17 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
// I'm not sure what this should be.
// When I figure it out, I'll update this.
// see http://www.ktug.or.kr/jsboard/read.php?table=operate&no=4422&page=1
- return "\\usepackage{hfont}\n";
+ return "\\usepackage{kotex}\n";
+ }
+ virtual QCString latexCommandName()
+ {
+ QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ if (latex_command.isEmpty()) latex_command = "latex";
+ if (Config_getBool(USE_PDFLATEX))
+ {
+ if (latex_command == "latex") latex_command = "xelatex";
+ }
+ return latex_command;
}
// --- Language translation methods -------------------
diff --git a/src/translator_lv.h b/src/translator_lv.h
index 2736bb0..bd579da 100644
--- a/src/translator_lv.h
+++ b/src/translator_lv.h
@@ -76,7 +76,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
*/
virtual QCString latexLanguageSupportCommand()
{
- return "\\usepackage[LV]{fontenc}\n"
+ return "\\usepackage[T2A]{fontenc}\n"
"\\usepackage[latvian]{babel}\n";
}
diff --git a/src/translator_no.h b/src/translator_no.h
index 58b596a..eccd952 100644
--- a/src/translator_no.h
+++ b/src/translator_no.h
@@ -72,8 +72,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
virtual QCString latexLanguageSupportCommand()
{
return
- "\\usepackage[norwegian]{babel}\n"
- "\\usepackage[T1]{fontenc}\n";
+ "\\usepackage[norsk]{babel}\n";
}
// --- Language translation methods -------------------
diff --git a/src/translator_pl.h b/src/translator_pl.h
index 421f407..e0ecc8f 100644
--- a/src/translator_pl.h
+++ b/src/translator_pl.h
@@ -44,8 +44,14 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
*/
QCString latexLanguageSupportCommand()
{
- return "\\usepackage{polski}\n"
- "\\usepackage[T1]{fontenc}\n";
+ return "\\usepackage[polish]{babel}\n"
+ "\\let\\lll\\undefined\n"; /* to overcome problems with the <<<
+ symbol as defined in the amssymb
+ package, and the Polish symbol
+ "Latin Small Letter L With Stroke"
+ &lstrok; or &#322; or &#x0142;
+ We take the amssymb symbol as leading.
+ */
}
// --- Language translation methods -------------------
diff --git a/src/translator_pt.h b/src/translator_pt.h
index 4251063..6bbe2bc 100644
--- a/src/translator_pt.h
+++ b/src/translator_pt.h
@@ -85,7 +85,10 @@ class TranslatorPortuguese : public TranslatorAdapter_1_8_15
* the empty string is returned in this implementation.
*/
virtual QCString latexLanguageSupportCommand()
- { return "Portuguese"; }
+ {
+ return
+ "\\usepackage[portuges]{babel}\n";
+ }
// --- Language translation methods -------------------
diff --git a/src/translator_sc.h b/src/translator_sc.h
index d2b3954..e8191df 100644
--- a/src/translator_sc.h
+++ b/src/translator_sc.h
@@ -71,6 +71,11 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
*/
virtual QCString latexLanguageSupportCommand()
{
+ return "\\usepackage[T2A]{fontenc}\n"
+ "\\usepackage[russian]{babel}\n";
+ }
+ virtual QCString latexFontenc()
+ {
return "";
}
diff --git a/src/translator_si.h b/src/translator_si.h
index 792053e..2dd7e5b 100644
--- a/src/translator_si.h
+++ b/src/translator_si.h
@@ -36,7 +36,7 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
*/
QCString latexLanguageSupportCommand()
{
- return "\\usepackage[slovene]{babel}\n\\usepackage[T1]{fontenc}\n";
+ return "\\usepackage[slovene]{babel}\n";
}
QCString trRelatedFunctions()
{ return "Povezane funkcije"; }
diff --git a/src/translator_tw.h b/src/translator_tw.h
index 77627bf..9e9092d 100644
--- a/src/translator_tw.h
+++ b/src/translator_tw.h
@@ -72,8 +72,20 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
*/
virtual QCString latexLanguageSupportCommand()
{
+ return "\\usepackage{CJKutf8}\n";
+ }
+ virtual QCString latexFontenc()
+ {
return "";
}
+ virtual QCString latexDocumentPre()
+ {
+ return "\\begin{CJK}{UTF8}{min}\n";
+ }
+ virtual QCString latexDocumentPost()
+ {
+ return "\\end{CJK}\n";
+ }
// --- Language translation methods -------------------
diff --git a/src/translator_vi.h b/src/translator_vi.h
index a0046b0..b391b0c 100644
--- a/src/translator_vi.h
+++ b/src/translator_vi.h
@@ -78,9 +78,23 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
*/
virtual QCString latexLanguageSupportCommand()
{
+ return
+ "\\usepackage[vietnamese]{babel}\n";
+ }
+ virtual QCString latexFontenc()
+ {
return "";
}
-
+ virtual QCString latexCommandName()
+ {
+ QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ if (latex_command.isEmpty()) latex_command = "latex";
+ if (Config_getBool(USE_PDFLATEX))
+ {
+ if (latex_command == "latex") latex_command = "xelatex";
+ }
+ return latex_command;
+ }
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
diff --git a/src/util.cpp b/src/util.cpp
index 8e936b5..ff0d0c6 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -323,7 +323,6 @@ int guessSection(const char *name)
n.right(4)==".c++" ||
n.right(5)==".java" ||
n.right(2)==".m" ||
- n.right(2)==".M" ||
n.right(3)==".mm" ||
n.right(3)==".ii" || // inline
n.right(4)==".ixx" ||
@@ -1856,7 +1855,11 @@ QCString removeRedundantWhiteSpace(const QCString &s)
case '&':
if (i>0 && isId(pc))
{
- *dst++=' ';
+ if (nc != '=')
+ // avoid splitting operator&=
+ {
+ *dst++=' ';
+ }
}
*dst++=c;
break;
@@ -4191,7 +4194,7 @@ bool getDefs(const QCString &scName,
//}
}
}
- //printf(" >Succes=%d\n",mdist<maxInheritanceDepth);
+ //printf(" >Success=%d\n",mdist<maxInheritanceDepth);
if (mdist<maxInheritanceDepth)
{
if (!md->isLinkable() || md->isStrongEnumValue())
@@ -7913,7 +7916,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
int start=0;
if (size>=2 &&
- ((inBuf.at(0)==-1 && inBuf.at(1)==-2) || // Litte endian BOM
+ ((inBuf.at(0)==-1 && inBuf.at(1)==-2) || // Little endian BOM
(inBuf.at(0)==-2 && inBuf.at(1)==-1) // big endian BOM
)
) // UCS-2 encoded file
@@ -8077,7 +8080,7 @@ QCString externalRef(const QCString &relPath,const QCString &ref,bool href)
return result;
}
-/** Writes the intensity only bitmap representated by \a data as an image to
+/** Writes the intensity only bitmap represented by \a data as an image to
* directory \a dir using the colors defined by HTML_COLORSTYLE_*.
*/
void writeColoredImgData(const char *dir,ColoredImgDataItem data[])
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index ce1f92b..618258f 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -94,7 +94,7 @@ static QCString g_exampleFile;
static QCString g_classScope;
-static QCString g_CurrScope;
+static bool g_CurrARCH = FALSE;
static FileDef * g_sourceFileDef;
static Definition * g_currentDefinition;
@@ -109,7 +109,7 @@ static int g_braceCount=0;
static void writeFont(const char *s,const char* text);
static void generateMemLink(CodeOutputInterface &ol,QCString &clName,QCString& memberName);
static bool writeColoredWord(QCString& word );
-static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool typeOnly=FALSE);
+static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool typeOnly=FALSE, const char *curr_class=0);
static void endFontClass();
static void startFontClass(const char *s);
//-------------------------------------------------------------------
@@ -291,7 +291,7 @@ static void writeWord(const char *word,const char* curr_class=0,bool classLink=F
}
else
{
- generateClassOrGlobalLink(*g_code,temp);
+ generateClassOrGlobalLink(*g_code,temp,FALSE,curr_class);
}
}
else
@@ -328,7 +328,7 @@ static void writeWord(const char *word,const char* curr_class=0,bool classLink=F
}
else
{
- generateClassOrGlobalLink(*g_code,temp);
+ generateClassOrGlobalLink(*g_code,temp,FALSE,curr_class);
}
}
else
@@ -383,7 +383,7 @@ static void codifyLines(const char *text,const char *cl=0,bool classlink=FALSE,b
if (comment)
writeFont("keyword",sp);
else
- writeWord(sp,cl,classlink);
+ writeWord(sp,cl,classlink);
done=TRUE;
}
}
@@ -510,7 +510,7 @@ static void generateMemLink(CodeOutputInterface &ol,QCString &clName,QCString& m
}// generateMemLink
-static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool /*typeOnly*/)
+static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool /*typeOnly*/, const char *curr_class)
{
QCString className=clName;
@@ -521,6 +521,11 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
//bool isLocal=FALSE;
className.stripPrefix("_");
cd = getClass(className.data());
+ if (!cd && curr_class)
+ {
+ if (QCString(curr_class).contains(QRegExp("::"+QCString(clName)+"$"))) cd = getClass(curr_class);
+ }
+
while (cd)
{
//className.stripPrefix("_");
@@ -759,7 +764,7 @@ DIGITSS [0-9]+|[0-9]+("#")*[0-9_a-fA-F\+\.\-]+("#")*
ALLTYPESMAP {B}*[_a-zA-Z0-9. ]+{BN}*
ALLTYPESMAP1 {BN}*[_a-zA-Z0-9.() ]+{BN}*
-ARCHITECTURE ^{B}*("architecture"){BN}+{FUNCNAME}{BN}+("of"){BN}+{FUNCNAME}
+ARCHITECTURE ^{B}*("architecture"){BN}+{FUNCNAME}{BN}+("of"){BN}+{FUNCNAME}{BN}+("is")
PROCESS ({BN}*{FUNCNAME}{BN}*[:]+{BN}*("process"){BN}*[(]*)|[^a-zA-Z]("process "|"process("){BN}*[ (]*|[^a-zA-Z]("process"){BN}+
END1 {B}*("end "){BN}+("if"|"case"|"loop"|"generate"|"for")
@@ -768,7 +773,7 @@ END3 {BN}*[^a-zA-Z]("end"){BN}+{FUNCNAME}{BN}*[;]
END4 {B}*("end"){BN}+"function"{BN}+{FUNCNAME}{BN}*[;]
ENDEFUNC {END3}|{END4}|{END2}
-KEYWORD ("new"|"event"|"break"|"case"|"end"|"loop"|"else"|"for"|"goto"|"if"|"return"|"generate"|"is"|"while"|"in")
+KEYWORD ("of"|"new"|"event"|"break"|"case"|"end"|"loop"|"else"|"for"|"goto"|"if"|"return"|"generate"|"is"|"while"|"in")
TYPEKW ^{B}*("type"|"subtype"|"constant"|"attribute"|"signal"|"variable","alias","configuration")
FUNC ^{B}*("function"|"procedure"){BN}*{FUNCNAME}{BN}*("(")
@@ -807,6 +812,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
%x ClassVar
%x ClassesName
%x Map
+%x End
%x Body
%%
@@ -1058,14 +1064,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
g_CurrClass.append(vhdlcodeYYtext);
g_CurrClass=g_CurrClass.stripWhiteSpace();
- if (!writeColoredWord(g_CurrScope))
- {
- generateClassOrGlobalLink(*g_code,vhdlcodeYYtext);
- }
- else
- {
- codifyLines(vhdlcodeYYtext,g_CurrClass.data());
- }
+ generateClassOrGlobalLink(*g_code,vhdlcodeYYtext);
BEGIN(Bases);
}
@@ -1284,6 +1283,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
//temp+=("-");
//temp+=VhdlDocGen::getIndexWord(vhdlcodeYYtext,3);
QCString temp = VhdlDocGen::getIndexWord(vhdlcodeYYtext,3);
+ g_CurrARCH = TRUE;
temp+="::";
temp+=VhdlDocGen::getIndexWord(vhdlcodeYYtext,1);
g_CurrClass=temp;
@@ -1291,7 +1291,6 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
codifyLines(vhdlcodeYYtext,temp.data(),TRUE);
//generateClassOrGlobalLink(*g_code,temp.data());
isPackageBody=FALSE;
- BEGIN(ClassName);
}
@@ -1371,6 +1370,41 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
+<Bases>"end"{BN}+"architecture"{BN}+{FUNCNAME} {
+ codifyLines(vhdlcodeYYtext,g_CurrClass.data(),TRUE);
+ g_CurrARCH = FALSE;
+ }
+<Bases>"end"{BN}+{FUNCNAME} {
+ if (g_CurrARCH)
+ {
+ codifyLines(vhdlcodeYYtext,g_CurrClass.data(),TRUE);
+ g_CurrARCH = FALSE;
+ }
+ else
+ REJECT;
+ }
+<Bases>"end" {
+ appStringLower(g_PrevString,vhdlcodeYYtext);
+ QCString temp(vhdlcodeYYtext);
+ temp=temp.stripWhiteSpace();
+
+ writeColoredWord(temp);
+ BEGIN(End);
+ }
+<End>{ID} {
+ appStringLower(g_PrevString,vhdlcodeYYtext);
+ QCString temp(vhdlcodeYYtext);
+ temp=temp.stripWhiteSpace();
+
+ if (!writeColoredWord(temp))
+ {
+ generateClassOrGlobalLink(*g_code,temp.data());
+ }
+ }
+<End>";" {
+ codifyLines(vhdlcodeYYtext);
+ BEGIN(Bases);
+ }
<Bases>{KEYWORD} { // found keyword
QCString qcs(vhdlcodeYYtext);
if (!writeColoredWord(qcs))
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index fd5e4d7..007c45f 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -2059,19 +2059,21 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
writeLink(mdef,ol);
ol.docify(" ");
- ol.insertMemberAlign();
if (mm==VhdlDocGen::GENERIC)
{
+ ol.insertMemberAlign();
ol.startBold();
VhdlDocGen::formatString(largs,ol,mdef);
ol.endBold();
}
else
{
+ ol.insertMemberAlignLeft(isAnonymous, false);
ol.docify(" ");
ol.startBold();
VhdlDocGen::formatString(ltype,ol,mdef);
ol.endBold();
+ ol.insertMemberAlign();
ol.docify(" ");
VhdlDocGen::formatString(largs,ol,mdef);
}
@@ -2226,11 +2228,11 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
ol.endMemberItem();
if (!mdef->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC) /* && !annMemb */)
{
- QCString s=mdef->briefDescription();
- ol.startMemberDescription(mdef->anchor());
+ QCString s=mdef->briefDescription();
+ ol.startMemberDescription(mdef->anchor(), NULL, mm == VhdlDocGen::PORT);
ol.generateDoc(mdef->briefFile(),mdef->briefLine(),
- mdef->getOuterScope()?mdef->getOuterScope():d,
- mdef,s.data(),TRUE,FALSE,0,TRUE,FALSE);
+ mdef->getOuterScope()?mdef->getOuterScope():d,
+ mdef,s.data(),TRUE,FALSE,0,TRUE,FALSE);
if (detailsVisible)
{
ol.pushGeneratorState();
@@ -2327,7 +2329,7 @@ void VhdlDocGen::writeVHDLDeclarations(MemberList* ml,OutputList &ol,
if (title)
{
- ol.startMemberHeader(title);
+ ol.startMemberHeader(title,type == VhdlDocGen::PORT ? 3 : 2);
ol.parseText(title);
ol.endMemberHeader();
ol.docify(" ");
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index 953cd6b..706e8db 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -80,9 +80,9 @@ static struct
int iDocLine;
} str_doc;
-static bool doxComment=FALSE; // doxygen comment ?
static QCString strComment;
static int iCodeLen;
+static const char *vhdlFileName = 0;
bool checkMultiComment(QCString& qcs,int line);
QList<Entry>* getEntryAtLine(const Entry* ce,int line);
@@ -99,59 +99,6 @@ Entry* getVhdlCompound()
return NULL;
}
-void startCodeBlock(int index)
-{
- int ll=strComment.length();
- if (!gBlock) gBlock = new Entry;
- iCodeLen=inputString.findRev(strComment.data())+ll;
- // fprintf(stderr,"\n startin code..%d %d %d\n",iCodeLen,num_chars,ll);
- gBlock->reset();
- int len=strComment.length();
- QCString name=strComment.right(len-index);//
- name=VhdlDocGen::getIndexWord(name.data(),1);
- if (!name)
- gBlock->name="misc"+ VhdlDocGen::getRecordNumber();
- else
- gBlock->name=name;
-
- gBlock->startLine=yyLineNr;
- gBlock->bodyLine=yyLineNr;
-
- strComment=strComment.left(index);
- VhdlDocGen::prepareComment(strComment);
- gBlock->brief+=strComment;
-}
-
-void makeInlineDoc(int endCode)
-{
- int len=endCode-iCodeLen;
- if (!gBlock) gBlock = new Entry;
- QCString par=inputString.mid(iCodeLen,len);
- //fprintf(stderr,"\n inline code: \n<%s>",par.data());
- gBlock->doc=par;
- gBlock->inbodyDocs=par;
- gBlock->section=Entry::VARIABLE_SEC;
- gBlock->spec=VhdlDocGen::MISCELLANEOUS;
- gBlock->fileName = yyFileName;
- gBlock->endBodyLine=yyLineNr-1;
- gBlock->lang=SrcLangExt_VHDL;
- Entry *temp=new Entry(*gBlock);
- Entry* compound=getVhdlCompound();
-
- if (compound)
- {
- compound->addSubEntry(temp);
- }
- else
- {
- temp->type="misc"; // global code like library ieee...
- VhdlParser::current_root->addSubEntry(temp);
- }
- strComment.resize(0);
- gBlock->reset();
-}// makeInlineDoc
-
-
bool isConstraintFile(const QCString &fileName,const QCString &ext)
{
return fileName.right(ext.length())==ext;
@@ -200,6 +147,7 @@ void VHDLLanguageScanner::parseInput(const char *fileName,const char *fileBuf,En
VhdlParser::current=new Entry();
VhdlParser::initEntry(VhdlParser::current);
groupEnterFile(fileName,yyLineNr);
+ vhdlFileName = fileName;
lineParse=new int[200]; // Dimitri: dangerous constant: should be bigger than largest token id in VhdlParserConstants.h
VhdlParserIF::parseVhdlfile(fileBuf,inLine);
@@ -213,6 +161,7 @@ void VHDLLanguageScanner::parseInput(const char *fileName,const char *fileBuf,En
yyFileName.resize(0);
libUse.clear();
VhdlDocGen::resetCodeVhdlParserState();
+ vhdlFileName = 0;
}
void VhdlParser::lineCount()
@@ -279,20 +228,6 @@ void VhdlParser::newEntry()
initEntry(current);
}
-bool checkInlineCode(QCString & doc)
-{
- int index=doc.find("\\code");
-
- if (index>0)
- {
- strComment+=doc;
- startCodeBlock(index);
- doxComment=TRUE;
- return true;
- }
- return false;
-}
-
void VhdlParser::handleFlowComment(const char* doc)
{
lineCount(doc);
@@ -310,7 +245,6 @@ void VhdlParser::handleFlowComment(const char* doc)
void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
{
int position=0;
- static bool isIn;
QCString doc;
doc.append(doc1);
// fprintf(stderr,"\n %s",doc.data());
@@ -322,22 +256,6 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
return;
}
- isIn=checkInlineCode(doc);
- bool isEndCode=doc.contains("\\endcode");
- // empty comment --!
- if (isEndCode)
- {
- int end=inputString.find(doc.data(),iCodeLen);
- makeInlineDoc(end);
- strComment.resize(0);
- isIn=false;
- }
- if (isIn)
- {
- isIn=false;
- return;
- }
-
VhdlDocGen::prepareComment(doc);
bool needsEntry=FALSE;
@@ -788,31 +706,12 @@ void VhdlParser::setMultCommentLine()
void VhdlParser::oneLineComment(QCString qcs)
{
- bool isEndCode=qcs.contains("\\endcode");
-
- int index = qcs.find("\\code");
- if (isEndCode)
- {
- int end = inputString.find(qcs.data(),iCodeLen);
- makeInlineDoc(end);
- }
- else if (index > 0)
- {
- // assert(false);
- strComment=qcs;
- startCodeBlock(index);
- strComment.resize(0);
- }
-
- if (!isEndCode && index==-1)
- {
int j=qcs.find("--!");
qcs=qcs.right(qcs.length()-3-j);
if (!checkMultiComment(qcs,iDocLine))
{
handleCommentBlock(qcs,TRUE);
}
- }
}
@@ -851,3 +750,7 @@ QList<Entry>* getEntryAtLine(const Entry* ce,int line)
return &lineEntry;
}
+const char *getVhdlFileName(void)
+{
+ return vhdlFileName;
+}
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 697a4d8..63fc8ad 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -175,7 +175,7 @@ static void writeCombineScript()
" <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"
+ " <!-- Load all doxygen generated xml files -->\n"
" <xsl:for-each select=\"doxygenindex/compound\">\n"
" <xsl:copy-of select=\"document( concat( @refid, '.xml' ) )/doxygen/*\" />\n"
" </xsl:for-each>\n"