diff options
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | src/classdef.cpp | 2 | ||||
-rw-r--r-- | src/cmdmapper.cpp | 3 | ||||
-rw-r--r-- | src/cmdmapper.h | 5 | ||||
-rw-r--r-- | src/docparser.cpp | 9 | ||||
-rw-r--r-- | src/docparser.h | 2 | ||||
-rw-r--r-- | src/doctokenizer.l | 2 | ||||
-rw-r--r-- | src/htmlentity.cpp | 4 | ||||
-rw-r--r-- | src/markdown.cpp | 10 | ||||
-rw-r--r-- | src/memberdef.cpp | 21 | ||||
-rw-r--r-- | src/portable_c.c | 4 | ||||
-rw-r--r-- | src/pre.l | 6 |
12 files changed, 49 insertions, 20 deletions
diff --git a/.travis.yml b/.travis.yml index bcfe2c8..9a9bdff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ before_install: - sudo add-apt-repository ppa:texlive-backports/ppa -y - sudo apt-get update -qq - sudo apt-get install -qq texlive texlive-extra-utils texlive-latex-extra libxml2-utils - - wget -qO- http://www.cmake.org/files/v3.1/cmake-3.1.0-Linux-x86_64.tar.gz | tar xvz script: - mkdir build diff --git a/src/classdef.cpp b/src/classdef.cpp index fa555ac..88f9a70 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -2603,7 +2603,7 @@ void ClassDef::setTypeConstraints(ArgumentList *al) void ClassDef::setTemplateArguments(ArgumentList *al) { if (al==0) return; - if (!m_impl->tempArgs) delete m_impl->tempArgs; // delete old list if needed + if (m_impl->tempArgs) delete m_impl->tempArgs; // delete old list if needed //printf("setting template args '%s' for '%s'\n",tempArgListToString(al,getLanguage()).data(),name().data()); m_impl->tempArgs=new ArgumentList; ArgumentListIterator ali(*al); diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp index 5c38b5a..6784b3e 100644 --- a/src/cmdmapper.cpp +++ b/src/cmdmapper.cpp @@ -115,6 +115,9 @@ CommandMap cmdMap[] = { "#", CMD_HASH }, { "%", CMD_PERCENT }, { "|", CMD_PIPE }, + { ".", CMD_PUNT }, + { "+", CMD_PLUS }, + { "-", CMD_MINUS }, { "::", CMD_DCOLON }, { "\"", CMD_QUOTE }, { "_internalref", CMD_INTERNALREF }, diff --git a/src/cmdmapper.h b/src/cmdmapper.h index 5a59f39..92c906a 100644 --- a/src/cmdmapper.h +++ b/src/cmdmapper.h @@ -130,7 +130,10 @@ enum CommandType CMD_MDASH = 100, CMD_STARTUML = 101, CMD_ENDUML = 102, - CMD_SETSCOPE = 103 + CMD_SETSCOPE = 103, + CMD_PUNT = 104, + CMD_PLUS = 105, + CMD_MINUS = 106 }; enum HtmlTagType diff --git a/src/docparser.cpp b/src/docparser.cpp index 13d1bfa..d425914 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -1367,6 +1367,15 @@ reparsetoken: case CMD_HASH: children.append(new DocSymbol(parent,DocSymbol::Sym_Hash)); break; + case CMD_PUNT: + children.append(new DocSymbol(parent,DocSymbol::Sym_Dot)); + break; + case CMD_PLUS: + children.append(new DocSymbol(parent,DocSymbol::Sym_Plus)); + break; + case CMD_MINUS: + children.append(new DocSymbol(parent,DocSymbol::Sym_Minus)); + break; case CMD_DCOLON: children.append(new DocSymbol(parent,DocSymbol::Sym_DoubleColon)); break; diff --git a/src/docparser.h b/src/docparser.h index fcd18a4..5af5e96 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -395,7 +395,7 @@ class DocSymbol : public DocNode /* doxygen commands mapped */ Sym_BSlash, Sym_At, Sym_Less, Sym_Greater, Sym_Amp, Sym_Dollar, Sym_Hash, Sym_DoubleColon, Sym_Percent, Sym_Pipe, - Sym_Quot, Sym_Minus + Sym_Quot, Sym_Minus, Sym_Plus, Sym_Dot }; enum PerlType { Perl_unknown = 0, Perl_string, Perl_char, Perl_symbol, Perl_umlaut, Perl_acute, Perl_grave, Perl_circ, Perl_slash, Perl_tilde, diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 8c58fb5..3169fc0 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -353,7 +353,7 @@ FILEMASK ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|{HFILEMASK} LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"){BLANK}+)? VERBATIM "verbatim"{BLANK}* SPCMD1 {CMD}([a-z_A-Z][a-z_A-Z0-9]*|{VERBATIM}|"--"|"---") -SPCMD2 {CMD}[\\@<>&$#%~".|] +SPCMD2 {CMD}[\\@<>&$#%~".+|-] SPCMD3 {CMD}form#[0-9]+ SPCMD4 {CMD}"::" INOUT "inout"|"in"|"out"|("in"{BLANK}*","{BLANK}*"out")|("out"{BLANK}*","{BLANK}*"in") diff --git a/src/htmlentity.cpp b/src/htmlentity.cpp index c4c601f..ff3c574 100644 --- a/src/htmlentity.cpp +++ b/src/htmlentity.cpp @@ -312,7 +312,9 @@ static struct htmlEntityInfo { SYM(Percent), "%", "%", "%", "%", "\\%", "%", "%", { "%", DocSymbol::Perl_char }}, { SYM(Pipe), "|", "|", "|", "|", "$|$", "|", "|", { "|", DocSymbol::Perl_char }}, { SYM(Quot), "\"", "\"", "\"", """, "\"", "\"", "\"", { "\"", DocSymbol::Perl_char }}, - { SYM(Minus), "-", "-", "-", "-", "-\\/", "-", "-", { "-", DocSymbol::Perl_char }} + { SYM(Minus), "-", "-", "-", "-", "-\\/", "-", "-", { "-", DocSymbol::Perl_char }}, + { SYM(Plus), "+", "+", "+", "+", "+", "+", "+", { "+", DocSymbol::Perl_char }}, + { SYM(Dot), ".", ".", ".", ".", ".", ".", ".", { ".", DocSymbol::Perl_char }} }; static const int g_numHtmlEntities = (int)(sizeof(g_htmlEntities)/ sizeof(*g_htmlEntities)); diff --git a/src/markdown.cpp b/src/markdown.cpp index 9ff139c..26acfbc 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -1017,8 +1017,8 @@ static int processSpecialCommand(GrowBuf &out, const char *data, int offset, int if (size>1 && data[0]=='\\') { char c=data[1]; - if (c=='[' || c==']' || c=='*' || c=='+' || c=='-' || - c=='!' || c=='(' || c==')' || c=='.' || c=='`' || c=='_') + if (c=='[' || c==']' || c=='*' || /* c=='+' || c=='-' || c=='.' || */ + c=='!' || c=='(' || c==')' || c=='`' || c=='_') { if (c=='-' && size>3 && data[2]=='-' && data[3]=='-') // \--- { @@ -1030,7 +1030,11 @@ static int processSpecialCommand(GrowBuf &out, const char *data, int offset, int out.addStr(&data[1],2); return 3; } - out.addStr(&data[1],1); + else if (c=='-') // \- + { + out.addChar(c); + } + out.addChar(data[1]); return 2; } } diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 9fcc2a2..a8e2692 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1418,6 +1418,7 @@ void MemberDef::writeDeclaration(OutputList &ol, // are explicitly grouped. if (!inGroup && m_impl->mtype==MemberType_EnumValue) return; + Definition *d=0; ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd; @@ -1444,19 +1445,21 @@ void MemberDef::writeDeclaration(OutputList &ol, // If there is no detailed description we need to write the anchor here. bool detailsVisible = isDetailedSectionLinkable(); - if (!detailsVisible) + bool writeAnchor = (inGroup || m_impl->group==0) && // only write anchors for member that have no details and are + !detailsVisible && !m_impl->annMemb; // rendered inside the group page or are not grouped at all + if (writeAnchor) { QCString doxyArgs=argsString(); - if (!m_impl->annMemb) + QCString doxyName=name(); + if (!cname.isEmpty()) { - QCString doxyName=name(); - if (!cname.isEmpty()) - { - doxyName.prepend(cdname+getLanguageSpecificSeparator(getLanguage())); - } - ol.startDoxyAnchor(cfname,cname,anchor(),doxyName,doxyArgs); + doxyName.prepend(cdname+getLanguageSpecificSeparator(getLanguage())); } + ol.startDoxyAnchor(cfname,cname,anchor(),doxyName,doxyArgs); + } + if (!detailsVisible) + { ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Latex); @@ -1775,7 +1778,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ol.endTypewriter(); } - if (!detailsVisible && !m_impl->annMemb) + if (writeAnchor) { ol.endDoxyAnchor(cfname,anchor()); } diff --git a/src/portable_c.c b/src/portable_c.c index 944c996..3a79741 100644 --- a/src/portable_c.c +++ b/src/portable_c.c @@ -1,9 +1,13 @@ #if (defined(__APPLE__) || defined(macintosh)) && !defined(DMG_BUILD) +#include <AvailabilityMacros.h> +// this hack doesn't seem to be needed on El Captain (10.11) +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11 // define this before including iconv.h to avoid a mapping of // iconv_open and friends to libicon_open (done by mac ports), // while the symbols without 'lib' are linked from /usr/lib/libiconv #define LIBICONV_PLUG #endif +#endif #include <iconv.h> // These functions are implemented in a C file, because there are different @@ -1659,6 +1659,7 @@ static void endCondSection() { CondCtx *ctx = g_condStack.pop(); g_skip=ctx->skip; + delete ctx; } //printf("endCondSection: skip=%d stack=%d\n",g_skip,g_condStack.count()); } @@ -1667,7 +1668,7 @@ static void forceEndCondSection() { while (!g_condStack.isEmpty()) { - g_condStack.pop(); + delete g_condStack.pop(); } g_skip=FALSE; } @@ -3010,8 +3011,8 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output) g_includeStack.clear(); g_expandedDict->setAutoDelete(FALSE); g_expandedDict->clear(); - g_condStack.clear(); g_condStack.setAutoDelete(TRUE); + g_condStack.clear(); //g_fileDefineDict->clear(); setFileName(fileName); @@ -3161,6 +3162,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output) if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label %s ",ctx->sectionId.data()); warn(fileName,ctx->lineNr,"Conditional section%sdoes not have " "a corresponding \\endcond command within this file.",sectionInfo.data()); + delete ctx; } // make sure we don't extend a \cond with missing \endcond over multiple files (see bug 624829) forceEndCondSection(); |