summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2012-02-25 15:18:56 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2012-02-25 15:18:56 (GMT)
commitcff8111ed33af6033bd188868964d92ea3503188 (patch)
tree2a7451abfd771d43ea2b3ac2443d94c3eb5cfee7 /src
parent34d4ace6d4037862b6d280f1d7534292c714bf59 (diff)
downloadDoxygen-cff8111ed33af6033bd188868964d92ea3503188.zip
Doxygen-cff8111ed33af6033bd188868964d92ea3503188.tar.gz
Doxygen-cff8111ed33af6033bd188868964d92ea3503188.tar.bz2
Release-1.8.0
Diffstat (limited to 'src')
-rw-r--r--src/commentcnv.l18
-rw-r--r--src/config.l8
-rw-r--r--src/docparser.cpp10
-rw-r--r--src/docparser.h2
-rw-r--r--src/doctokenizer.l10
-rw-r--r--src/dot.cpp17
-rw-r--r--src/doxygen.cpp8
-rw-r--r--src/entry.h2
-rw-r--r--src/fortrancode.l4
-rw-r--r--src/fortranscanner.l16
-rw-r--r--src/htmldocvisitor.cpp4
-rw-r--r--src/jquery_fx.js3
-rw-r--r--src/jquery_fx_js.h3
-rw-r--r--src/latexdocvisitor.cpp20
-rw-r--r--src/markdown.cpp2
-rw-r--r--src/navtree.js55
-rw-r--r--src/navtree_js.h55
-rw-r--r--src/pagedef.cpp10
-rw-r--r--src/pre.l8
-rw-r--r--src/pycode.l13
-rw-r--r--src/rtfdocvisitor.cpp20
-rw-r--r--src/rtfgen.cpp4
-rw-r--r--src/store.cpp2
-rw-r--r--src/svgpan.js4
-rw-r--r--src/svgpan_js.h4
-rw-r--r--src/vhdlcode.l4
-rw-r--r--src/vhdldocgen.cpp16
-rw-r--r--src/vhdldocgen.h2
28 files changed, 196 insertions, 128 deletions
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 1ae07c0..b031265 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -82,21 +82,22 @@ static void replaceCommentMarker(const char *s,int len)
{
const char *p=s;
char c;
- // copy blanks
+ // copy leading blanks
while ((c=*p) && (c==' ' || c=='\t' || c=='\n'))
{
ADDCHAR(c);
g_lineNr += c=='\n';
p++;
}
- // replace start of comment marker by spaces
+ // replace start of comment marker by blanks and the last character by a *
+ int blanks=0;
while ((c=*p) && (c=='/' || c=='!' || c=='#'))
{
- ADDCHAR(' ');
+ blanks++;
p++;
if (*p=='<') // comment-after-item marker
{
- ADDCHAR(' ');
+ blanks++;
p++;
}
if (c=='!') // end after first !
@@ -104,6 +105,15 @@ static void replaceCommentMarker(const char *s,int len)
break;
}
}
+ if (blanks>0)
+ {
+ while (blanks>1)
+ {
+ ADDCHAR(' ');
+ blanks--;
+ }
+ ADDCHAR('*');
+ }
// copy comment line to output
ADDARRAY(p,len-(p-s));
}
diff --git a/src/config.l b/src/config.l
index 2e23ea1..2988810 100644
--- a/src/config.l
+++ b/src/config.l
@@ -454,7 +454,7 @@ static QCString configStringRecode(
QCString outputEncoding = toEncoding;
if (inputEncoding.isEmpty() || outputEncoding.isEmpty() || inputEncoding==outputEncoding) return str;
int inputSize=str.length();
- size_t outputSize=inputSize*4+1;
+ int outputSize=inputSize*4+1;
QCString output(outputSize);
void *cd = portable_iconv_open(outputEncoding,inputEncoding);
if (cd==(void *)(-1))
@@ -463,13 +463,13 @@ static QCString configStringRecode(
inputEncoding.data(),outputEncoding.data());
exit(1);
}
- size_t iLeft=inputSize;
- size_t oLeft=outputSize;
+ size_t iLeft=(size_t)inputSize;
+ size_t oLeft=(size_t)outputSize;
const char *inputPtr = str.data();
char *outputPtr = output.data();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
- outputSize-=oLeft;
+ outputSize-=(int)oLeft;
output.resize(outputSize+1);
output.at(outputSize)='\0';
//printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data());
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 12b6e1c..20f365a 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -2275,7 +2275,7 @@ void DocInternalRef::parse()
//---------------------------------------------------------------------------
DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
- m_refToSection(FALSE), m_refToAnchor(FALSE)
+ m_refToSection(FALSE), m_refToAnchor(FALSE), m_isSubPage(FALSE)
{
m_parent = parent;
Definition *compound = 0;
@@ -2286,14 +2286,20 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
SectionInfo *sec = Doxygen::sectionDict[target];
if (sec) // ref to section or anchor
{
+ PageDef *pd = 0;
+ if (sec->type==SectionInfo::Page)
+ {
+ pd = Doxygen::pageSDict->find(target);
+ }
m_text = sec->title;
if (m_text.isEmpty()) m_text = sec->label;
m_ref = sec->ref;
m_file = stripKnownExtensions(sec->fileName);
- if (sec->type!=SectionInfo::Page) m_anchor = sec->label;
m_refToAnchor = sec->type==SectionInfo::Anchor;
m_refToSection = sec->type!=SectionInfo::Anchor;
+ m_isSubPage = pd && pd->hasParentPage();
+ if (sec->type!=SectionInfo::Page || m_isSubPage) m_anchor = sec->label;
//printf("m_text=%s,m_ref=%s,m_file=%s,m_refToAnchor=%d type=%d\n",
// m_text.data(),m_ref.data(),m_file.data(),m_refToAnchor,sec->type);
return;
diff --git a/src/docparser.h b/src/docparser.h
index bc42389..21a5a25 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -721,11 +721,13 @@ class DocRef : public CompAccept<DocRef>, public DocNode
bool hasLinkText() const { return !m_children.isEmpty(); }
bool refToAnchor() const { return m_refToAnchor; }
bool refToSection() const { return m_refToSection; }
+ bool isSubPage() const { return m_isSubPage; }
void accept(DocVisitor *v) { CompAccept<DocRef>::accept(this,v); }
private:
bool m_refToSection;
bool m_refToAnchor;
+ bool m_isSubPage;
QCString m_file;
QCString m_relPath;
QCString m_ref;
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index a183377..c1c6e19 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -525,7 +525,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
<St_Para>{SPCMD3} {
g_token->name = "form";
bool ok;
- g_token->id = QCString(yytext).right(yyleng-6).toInt(&ok);
+ g_token->id = QCString(yytext).right((int)yyleng-6).toInt(&ok);
ASSERT(ok);
return TK_COMMAND;
}
@@ -633,7 +633,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
<St_Para>{LNKWORD1}{FUNCARG}{CVSPEC}[^a-z_A-Z0-9] {
g_token->name = yytext;
g_token->name = g_token->name.left(g_token->name.length()-1);
- unput(yytext[yyleng-1]);
+ unput(yytext[(int)yyleng-1]);
return TK_LNKWORD;
}
/********* patterns for normal words ******************/
@@ -684,7 +684,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
}
else // found end of a paragraph
{
- g_token->indent=computeIndent(yytext,yyleng-1);
+ g_token->indent=computeIndent(yytext,(int)yyleng-1);
int i;
// put back the indentation (needed for list items)
for (i=0;i<g_token->indent;i++)
@@ -946,7 +946,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
}
<St_XRefItem2>[0-9]+"." {
QCString numStr=yytext;
- numStr=numStr.left(yyleng-1);
+ numStr=numStr.left((int)yyleng-1);
g_token->id=numStr.toInt();
return RetVal_OK;
}
@@ -956,7 +956,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
}
<St_Param>"\""[^\n\"]+"\"" {
g_token->name = yytext+1;
- g_token->name = g_token->name.left(yyleng-2);
+ g_token->name = g_token->name.left((int)yyleng-2);
return TK_WORD;
}
<St_Param>({PHPTYPE}{BLANK}*"|"{BLANK}*)*{PHPTYPE}{WS}+("&")?"$"{LABELID} {
diff --git a/src/dot.cpp b/src/dot.cpp
index 62d1831..b952ce2 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -250,7 +250,7 @@ static QCString replaceRef(const QCString &buf,const QCString relPath,
{
// search for href="...", store ... part in link
QCString href = "href";
- bool isXLink=FALSE;
+ //bool isXLink=FALSE;
int len = 6;
int indexS = buf.find("href=\""), indexE;
if (indexS>5 && buf.find("xlink:href=\"")!=-1) // XLink href (for SVG)
@@ -258,7 +258,7 @@ static QCString replaceRef(const QCString &buf,const QCString relPath,
indexS-=6;
len+=6;
href.prepend("xlink:");
- isXLink=TRUE;
+ //isXLink=TRUE;
}
if (indexS>=0 && (indexE=buf.find('"',indexS+len))!=-1)
{
@@ -1601,13 +1601,16 @@ void DotNode::writeBox(FTextStream &t,
// add names shown as relation to a dictionary, so we don't show
// them as attributes as well
QDict<void> arrowNames(17);
- QListIterator<EdgeInfo> li(*m_edgeInfo);
- EdgeInfo *ei;
- for (li.toFirst();(ei=li.current());++li)
+ if (m_edgeInfo)
{
- if (!ei->m_label.isEmpty())
+ QListIterator<EdgeInfo> li(*m_edgeInfo);
+ EdgeInfo *ei;
+ for (li.toFirst();(ei=li.current());++li)
{
- arrowNames.insert(ei->m_label,(void*)0x8);
+ if (!ei->m_label.isEmpty())
+ {
+ arrowNames.insert(ei->m_label,(void*)0x8);
+ }
}
}
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 98f076b..5614692 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -2729,7 +2729,7 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
//int indentDepth=0;
int si=scope.find('@');
//int anonyScopes = 0;
- bool added=FALSE;
+ //bool added=FALSE;
static bool inlineSimpleStructs = Config_getBool("INLINE_SIMPLE_STRUCTS");
if (si!=-1 && !inlineSimpleStructs) // anonymous scope or type
@@ -2754,7 +2754,7 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
root->protection,
isMemberOf ? Foreign : isRelated ? Related : Member
);
- added=TRUE;
+ //added=TRUE;
}
else // anonymous scope inside namespace or file => put variable in the global scope
{
@@ -2762,7 +2762,7 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
{
md=addVariableToFile(rootNav,mtype,pScope,name,TRUE,0);
}
- added=TRUE;
+ //added=TRUE;
}
}
}
@@ -9319,8 +9319,6 @@ static const char *getArg(int argc,char **argv,int &optind)
//----------------------------------------------------------------------------
-extern void commentScanTest();
-
void initDoxygen()
{
const char *lang = portable_getenv("LC_ALL");
diff --git a/src/entry.h b/src/entry.h
index 63ddc5a..d312cec 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -31,7 +31,7 @@ class FileDef;
class FileStorage;
class StorageIntf;
class ArgumentList;
-class ListItemInfo;
+struct ListItemInfo;
/*! \brief This class stores information about an inheritance relation
*/
diff --git a/src/fortrancode.l b/src/fortrancode.l
index f111e58..d7766f4 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -652,6 +652,7 @@ ARGS_L2 "("({ARGS_L0}|[^()]|{ARGS_L1a}|{ARGS_L1})*")"
ARGS {BS}({ARGS_L0}|{ARGS_L1}|{ARGS_L2})
NUM_TYPE (complex|integer|logical|real)
+LOG_OPER (\.and\.|\.eq\.|\.eqv\.|\.ge\.|\.gt\.|\.le\.|\.lt\.|\.ne\.|\.neqv\.|\.or\.|\.not\.)
KIND {ARGS}
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{ARGS})
@@ -979,6 +980,9 @@ IGNORE (CALL)
<*>. {
g_code->codify(yytext);
}
+<*>{LOG_OPER} { // Fortran logical comparison keywords
+ g_code->codify(yytext);
+ }
%%
/*@ ----------------------------------------------------------------------------
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index 036769a..0a11483 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -249,6 +249,7 @@ ARGS {BS}({ARGS_L0}|{ARGS_L1}|{ARGS_L2})
NOARGS {BS}"\n"
NUM_TYPE (complex|integer|logical|real)
+LOG_OPER (\.and\.|\.eq\.|\.eqv\.|\.ge\.|\.gt\.|\.le\.|\.lt\.|\.ne\.|\.neqv\.|\.or\.|\.not\.)
KIND {ARGS}
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{ARGS}|CLASS{ARGS}|PROCEDURE{ARGS}?)
@@ -1102,7 +1103,9 @@ private {
popBuffer();
}
}
- <*>. {
+<*>{LOG_OPER} { // Fortran logical comparison keywords
+ }
+<*>. {
//debugStr+=yytext;
//printf("I:%c\n", *yytext);
} // ignore remaining text
@@ -2070,16 +2073,16 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
current = subrCurrent.first(); // temporarily switch to the entry of the subroutine / function
if (docBlock.stripWhiteSpace().find("\\param") == 0)
{
- handleCommentBlock(doc,brief);
+ handleCommentBlock("\n\n"+doc,brief);
}
else if (docBlock.stripWhiteSpace().find("@param") == 0)
{
- handleCommentBlock(doc,brief);
+ handleCommentBlock("\n\n"+doc,brief);
}
else
{
int dir1 = modifiers[current_root][argName.lower()].direction;
- handleCommentBlock(QCString("@param ") + directionParam[dir1] + " " +
+ handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " +
argName + " " + doc,brief);
}
current=tmp_entry;
@@ -2122,8 +2125,9 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
{
isFixedForm = recognizeFixedForm(fileBuf);
- if (isFixedForm) {
- printf("Prepassing fixed form of %s\n", fileName);
+ if (isFixedForm)
+ {
+ msg("Prepassing fixed form of %s\n", fileName);
//printf("---strlen=%d\n", strlen(fileBuf));
//clock_t start=clock();
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 4c76be3..8e8cdbd 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -1374,7 +1374,9 @@ void HtmlDocVisitor::visitPre(DocRef *ref)
if (m_hide) return;
if (!ref->file().isEmpty())
{
- startLink(ref->ref(),ref->file(),ref->relPath(),ref->anchor());
+ // when ref->isSubPage()==TRUE we use ref->file() for HTML and
+ // ref->anchor() for LaTeX/RTF
+ startLink(ref->ref(),ref->file(),ref->relPath(),ref->isSubPage() ? 0 : ref->anchor());
}
if (!ref->hasLinkText()) filter(ref->targetTitle());
}
diff --git a/src/jquery_fx.js b/src/jquery_fx.js
index d373e6a..f3e326e 100644
--- a/src/jquery_fx.js
+++ b/src/jquery_fx.js
@@ -29,7 +29,8 @@ d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3)
0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;
if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,
a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
-;/*
+;
+/*
* jQuery UI Effects Highlight 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
diff --git a/src/jquery_fx_js.h b/src/jquery_fx_js.h
index 5917e69..e9ae22a 100644
--- a/src/jquery_fx_js.h
+++ b/src/jquery_fx_js.h
@@ -29,7 +29,8 @@
"0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;\n"
"if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,\n"
"a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);\n"
-";/*\n"
+";\n"
+"/*\n"
" * jQuery UI Effects Highlight 1.8.16\n"
" *\n"
" * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)\n"
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index e060da1..4c4dc86 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -1126,14 +1126,30 @@ void LatexDocVisitor::visitPost(DocLink *lnk)
void LatexDocVisitor::visitPre(DocRef *ref)
{
if (m_hide) return;
- if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor());
+ // when ref->isSubPage()==TRUE we use ref->file() for HTML and
+ // ref->anchor() for LaTeX/RTF
+ if (ref->isSubPage())
+ {
+ startLink(ref->ref(),0,ref->anchor());
+ }
+ else
+ {
+ if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor());
+ }
if (!ref->hasLinkText()) filter(ref->targetTitle());
}
void LatexDocVisitor::visitPost(DocRef *ref)
{
if (m_hide) return;
- if (!ref->file().isEmpty()) endLink(ref->ref(),ref->file(),ref->anchor());
+ if (ref->isSubPage())
+ {
+ endLink(ref->ref(),0,ref->anchor());
+ }
+ else
+ {
+ if (!ref->file().isEmpty()) endLink(ref->ref(),ref->file(),ref->anchor());
+ }
}
void LatexDocVisitor::visitPre(DocSecRefItem *)
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 16dbe6d..fb9ff9d 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -942,7 +942,7 @@ static int processSpecialCommand(GrowBuf &out, const char *data, int offset, int
static void processInline(GrowBuf &out,const char *data,int size)
{
int i=0, end=0;
- action_t action;
+ action_t action = 0;
while (i<size)
{
while (end<size && ((action=g_actions[(uchar)data[end]])==0)) end++;
diff --git a/src/navtree.js b/src/navtree.js
index 505ca61..cff8c10 100644
--- a/src/navtree.js
+++ b/src/navtree.js
@@ -125,10 +125,13 @@ function newNode(o, po, text, link, childrenData, lastNode)
var targetPage = stripPath(link.split('#')[0]);
a.href = srcPage!=targetPage ? url : '#';
a.onclick = function(){
- $('.item').removeClass('selected');
- $('.item').removeAttr('id');
- $(a).parent().parent().addClass('selected');
- $(a).parent().parent().attr('id','selected');
+ if (!$(a).parent().parent().hasClass('selected'))
+ {
+ $('.item').removeClass('selected');
+ $('.item').removeAttr('id');
+ $(a).parent().parent().addClass('selected');
+ $(a).parent().parent().attr('id','selected');
+ }
var pos, anchor = $(aname), docContent = $('#doc-content');
if (anchor.parent().attr('class')=='memItemLeft') {
pos = anchor.parent().position().top;
@@ -229,7 +232,7 @@ function highlightAnchor()
function showNode(o, node, index)
{
- if (node.childrenData && !node.expanded) {
+ if (node.childrenData /*&& !node.expanded*/) {
if (typeof(node.childrenData)==='string') {
var varName = node.childrenData;
getScript(node.relpath+varName,function(){
@@ -276,6 +279,7 @@ function showNode(o, node, index)
$(n.itemDiv).addClass('selected');
$(n.itemDiv).attr('id','selected');
}
+ showRoot();
}
}
}
@@ -293,6 +297,20 @@ function getNode(o, po)
}
}
+function navTo(o,root,hash,relpath)
+{
+ getScript(relpath+"navtreeindex",function(){
+ var navTreeIndex = eval('NAVTREEINDEX');
+ if (navTreeIndex) {
+ var nti = navTreeIndex[root+hash];
+ o.breadcrumbs = nti ? nti : navTreeIndex[root];
+ if (o.breadcrumbs==null) o.breadcrumbs = navTreeIndex["index.html"];
+ o.breadcrumbs.unshift(0);
+ showNode(o, o.node, 0);
+ }
+ },true);
+}
+
function initNavTree(toroot,relpath)
{
var o = new Object();
@@ -313,35 +331,22 @@ function initNavTree(toroot,relpath)
o.node.plus_img.width = 16;
o.node.plus_img.height = 22;
- getScript(relpath+"navtreeindex",function(){
- var navTreeIndex = eval('NAVTREEINDEX');
- if (navTreeIndex) {
- var nti = navTreeIndex[toroot+window.location.hash];
- o.breadcrumbs = nti ? nti : navTreeIndex[toroot];
- if (o.breadcrumbs==null) o.breadcrumbs = navTreeIndex["index.html"];
- o.breadcrumbs.unshift(0);
- showNode(o, o.node, 0);
- }
- },true);
+ navTo(o,toroot,window.location.hash,relpath);
$(window).bind('hashchange', function(){
if (window.location.hash && window.location.hash.length>1){
- highlightAnchor();
var a;
if ($(location).attr('hash')){
- var link=stripPath($(location).attr('pathname'))+':'+
- $(location).attr('hash').substring(1);
- a=$('.item a[class$=\""'+link+'"\"]');
+ var clslink=stripPath($(location).attr('pathname'))+':'+
+ $(location).attr('hash').substring(1);
+ a=$('.item a[class$=\""'+clslink+'"\"]');
}
- if (a && a.length){
+ if (a==null || !$(a).parent().parent().hasClass('selected')){
$('.item').removeClass('selected');
$('.item').removeAttr('id');
- a.parent().parent().addClass('selected');
- a.parent().parent().attr('id','selected');
- var anchor = $($(location).attr('hash'));
- var targetDiv = anchor.next();
- showRoot();
}
+ var link=stripPath($(location).attr('pathname'));
+ navTo(o,link,$(location).attr('hash'),relpath);
}
})
diff --git a/src/navtree_js.h b/src/navtree_js.h
index 746b39d..3eccef6 100644
--- a/src/navtree_js.h
+++ b/src/navtree_js.h
@@ -125,10 +125,13 @@
" var targetPage = stripPath(link.split('#')[0]);\n"
" a.href = srcPage!=targetPage ? url : '#';\n"
" a.onclick = function(){\n"
-" $('.item').removeClass('selected');\n"
-" $('.item').removeAttr('id');\n"
-" $(a).parent().parent().addClass('selected');\n"
-" $(a).parent().parent().attr('id','selected');\n"
+" if (!$(a).parent().parent().hasClass('selected'))\n"
+" {\n"
+" $('.item').removeClass('selected');\n"
+" $('.item').removeAttr('id');\n"
+" $(a).parent().parent().addClass('selected');\n"
+" $(a).parent().parent().attr('id','selected');\n"
+" }\n"
" var pos, anchor = $(aname), docContent = $('#doc-content');\n"
" if (anchor.parent().attr('class')=='memItemLeft') {\n"
" pos = anchor.parent().position().top;\n"
@@ -229,7 +232,7 @@
"\n"
"function showNode(o, node, index)\n"
"{\n"
-" if (node.childrenData && !node.expanded) {\n"
+" if (node.childrenData /*&& !node.expanded*/) {\n"
" if (typeof(node.childrenData)==='string') {\n"
" var varName = node.childrenData;\n"
" getScript(node.relpath+varName,function(){\n"
@@ -276,6 +279,7 @@
" $(n.itemDiv).addClass('selected');\n"
" $(n.itemDiv).attr('id','selected');\n"
" }\n"
+" showRoot();\n"
" }\n"
" }\n"
" }\n"
@@ -293,6 +297,20 @@
" }\n"
"}\n"
"\n"
+"function navTo(o,root,hash,relpath)\n"
+"{\n"
+" getScript(relpath+\"navtreeindex\",function(){\n"
+" var navTreeIndex = eval('NAVTREEINDEX');\n"
+" if (navTreeIndex) {\n"
+" var nti = navTreeIndex[root+hash];\n"
+" o.breadcrumbs = nti ? nti : navTreeIndex[root];\n"
+" if (o.breadcrumbs==null) o.breadcrumbs = navTreeIndex[\"index.html\"];\n"
+" o.breadcrumbs.unshift(0);\n"
+" showNode(o, o.node, 0);\n"
+" }\n"
+" },true);\n"
+"}\n"
+"\n"
"function initNavTree(toroot,relpath)\n"
"{\n"
" var o = new Object();\n"
@@ -313,35 +331,22 @@
" o.node.plus_img.width = 16;\n"
" o.node.plus_img.height = 22;\n"
"\n"
-" getScript(relpath+\"navtreeindex\",function(){\n"
-" var navTreeIndex = eval('NAVTREEINDEX');\n"
-" if (navTreeIndex) {\n"
-" var nti = navTreeIndex[toroot+window.location.hash];\n"
-" o.breadcrumbs = nti ? nti : navTreeIndex[toroot];\n"
-" if (o.breadcrumbs==null) o.breadcrumbs = navTreeIndex[\"index.html\"];\n"
-" o.breadcrumbs.unshift(0);\n"
-" showNode(o, o.node, 0);\n"
-" }\n"
-" },true);\n"
+" navTo(o,toroot,window.location.hash,relpath);\n"
"\n"
" $(window).bind('hashchange', function(){\n"
" if (window.location.hash && window.location.hash.length>1){\n"
-" highlightAnchor();\n"
" var a;\n"
" if ($(location).attr('hash')){\n"
-" var link=stripPath($(location).attr('pathname'))+':'+\n"
-" $(location).attr('hash').substring(1);\n"
-" a=$('.item a[class$=\\\"\"'+link+'\"\\\"]');\n"
+" var clslink=stripPath($(location).attr('pathname'))+':'+\n"
+" $(location).attr('hash').substring(1);\n"
+" a=$('.item a[class$=\\\"\"'+clslink+'\"\\\"]');\n"
" }\n"
-" if (a && a.length){\n"
+" if (a==null || !$(a).parent().parent().hasClass('selected')){\n"
" $('.item').removeClass('selected');\n"
" $('.item').removeAttr('id');\n"
-" a.parent().parent().addClass('selected');\n"
-" a.parent().parent().attr('id','selected');\n"
-" var anchor = $($(location).attr('hash'));\n"
-" var targetDiv = anchor.next();\n"
-" showRoot();\n"
" }\n"
+" var link=stripPath($(location).attr('pathname'));\n"
+" navTo(o,link,$(location).attr('hash'),relpath);\n"
" }\n"
" })\n"
"\n"
diff --git a/src/pagedef.cpp b/src/pagedef.cpp
index f280c81..7d7ac01 100644
--- a/src/pagedef.cpp
+++ b/src/pagedef.cpp
@@ -78,8 +78,6 @@ void PageDef::writeDocumentation(OutputList &ol)
//printf("PageDef::writeDocumentation: %s\n",getOutputFileBase().data());
- startFile(ol,getOutputFileBase(),pageName,title(),HLI_Pages,!generateTreeView);
-
ol.pushGeneratorState();
//1.{
@@ -95,6 +93,8 @@ void PageDef::writeDocumentation(OutputList &ol)
ol.enable(OutputGenerator::Html);
}
+ startFile(ol,getOutputFileBase(),pageName,title(),HLI_Pages,!generateTreeView);
+
if (!generateTreeView)
{
if (getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX"))
@@ -147,9 +147,6 @@ void PageDef::writeDocumentation(OutputList &ol)
writePageDocumentation(ol);
- ol.popGeneratorState();
- //1.}
-
if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX"))
{
ol.endContents();
@@ -160,6 +157,9 @@ void PageDef::writeDocumentation(OutputList &ol)
endFile(ol);
}
+ ol.popGeneratorState();
+ //1.}
+
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
bool found=FALSE;
diff --git a/src/pre.l b/src/pre.l
index 217ed80..9975934 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -2206,11 +2206,15 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(SkipString);
}
<SkipLine>.
-<SkipLine,SkipCommand,SkipCPPBlock,SkipString>"//"[^\n]* {
+<SkipString>"//"/[^\n]* {
+ }
+<SkipLine,SkipCommand,SkipCPPBlock>"//"[^\n]* {
g_lastCPPContext=YY_START;
BEGIN(RemoveCPPComment);
}
-<SkipLine,SkipCommand,SkipCPPBlock,SkipString>"/*"/[^\n]* {
+<SkipString>"/*"/[^\n]* {
+ }
+<SkipLine,SkipCommand,SkipCPPBlock>"/*"/[^\n]* {
g_lastCContext=YY_START;
BEGIN(RemoveCComment);
}
diff --git a/src/pycode.l b/src/pycode.l
index 6ddf2e0..e24c8f9 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -576,7 +576,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
ClassDef *cd=0,*lcd=0; /** Class def that we may find */
MemberDef *md=0; /** Member def that we may find */
- bool isLocal=FALSE;
+ //bool isLocal=FALSE;
if ((lcd=g_theVarContext.findVariable(className))==0) // not a local variable
{
@@ -611,7 +611,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
{
g_theCallContext.setClass(lcd);
}
- isLocal=TRUE;
+ //isLocal=TRUE;
//fprintf(stderr,"is a local variable cd=%p!\n",cd);
}
@@ -1426,19 +1426,14 @@ static void adjustScopesAndSuites(unsigned indentLength)
}
}
-void parsePythonCode(CodeOutputInterface &od,const char *className,
+void parsePythonCode(CodeOutputInterface &od,const char * /*className*/,
const QCString &s,bool exBlock, const char *exName,
- FileDef *fd,int startLine,int endLine,bool inlineFragment,
+ FileDef *fd,int startLine,int endLine,bool /*inlineFragment*/,
MemberDef *,bool)
{
//printf("***parseCode()\n");
- //--- some code to eliminate warnings---
- className = "";
- exBlock = FALSE;
- exName = "";
- inlineFragment = "";
//--------------------------------------
if (s.isEmpty()) return;
g_code = &od;
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index ceedb2d..4cde286 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -1185,7 +1185,16 @@ void RTFDocVisitor::visitPre(DocRef *ref)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocRef)}\n");
- if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor());
+ // when ref->isSubPage()==TRUE we use ref->file() for HTML and
+ // ref->anchor() for LaTeX/RTF
+ if (ref->isSubPage())
+ {
+ startLink(ref->ref(),0,ref->anchor());
+ }
+ else
+ {
+ if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor());
+ }
if (!ref->hasLinkText()) filter(ref->targetTitle());
}
@@ -1448,11 +1457,11 @@ void RTFDocVisitor::visitPost(DocParamList *pl)
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocParamList)}\n");
DocParamSect::Type parentType = DocParamSect::Unknown;
- DocParamSect *sect = 0;
+ //DocParamSect *sect = 0;
if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
{
parentType = ((DocParamSect*)pl->parent())->type();
- sect=(DocParamSect*)pl->parent();
+ //sect=(DocParamSect*)pl->parent();
}
bool useTable = parentType==DocParamSect::Param ||
parentType==DocParamSect::RetVal ||
@@ -1652,9 +1661,12 @@ void RTFDocVisitor::startLink(const QCString &ref,const QCString &file,const QCS
{
refName+=file;
}
- if (anchor)
+ if (!file.isEmpty() && anchor)
{
refName+='_';
+ }
+ if (anchor)
+ {
refName+=anchor;
}
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index b00fb46..90d6e4c 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -1713,7 +1713,7 @@ void RTFGenerator::docify(const char *str)
{
const unsigned char *p=(const unsigned char *)str;
unsigned char c;
- unsigned char pc='\0';
+ //unsigned char pc='\0';
while (*p)
{
//static bool MultiByte = FALSE;
@@ -1746,7 +1746,7 @@ void RTFGenerator::docify(const char *str)
t << (char)c;
}
}
- pc = c;
+ //pc = c;
m_omitParagraph = FALSE;
}
}
diff --git a/src/store.cpp b/src/store.cpp
index efa0718..b60520c 100644
--- a/src/store.cpp
+++ b/src/store.cpp
@@ -402,7 +402,7 @@ void Store::dumpBlock(portable_off_t s,portable_off_t e)
portable_fseek(m_file,s,SEEK_SET);
int size = (int)(e-s);
uchar *buf = new uchar[size];
- fread(buf,size,1,m_file);
+ (void)fread(buf,size,1,m_file);
int i,j;
for (i=0;i<size;i+=16)
{
diff --git a/src/svgpan.js b/src/svgpan.js
index a64c488..4218e79 100644
--- a/src/svgpan.js
+++ b/src/svgpan.js
@@ -304,13 +304,13 @@ function handlePrint(evt)
'xmlns:svg="http://www.w3.org/2000/svg" '+
'xmlns:xlink="http://www.w3.org/1999/xlink">');
d.write('<head><title>Print SVG</title></head>');
- d.write('<body style="margin: 0px; padding: 0px;" onload="window.print(); window.close();">');
+ d.write('<body style="margin: 0px; padding: 0px;" onload="window.print();">');
d.write('<div id="svg" style="width:'+windowWidth+'px; height:'+windowHeight+'px;">'+xs+'</div>');
d.write('</body>');
d.write('</html>');
d.close();
} catch(e) {
- alert('Print function not supported by this browser!');
+ alert('Failed to open popup window needed for printing!\n'+e.message);
}
}
diff --git a/src/svgpan_js.h b/src/svgpan_js.h
index 9978f21..ac996da 100644
--- a/src/svgpan_js.h
+++ b/src/svgpan_js.h
@@ -304,13 +304,13 @@
" 'xmlns:svg=\"http://www.w3.org/2000/svg\" '+\n"
" 'xmlns:xlink=\"http://www.w3.org/1999/xlink\">');\n"
" d.write('<head><title>Print SVG</title></head>');\n"
-" d.write('<body style=\"margin: 0px; padding: 0px;\" onload=\"window.print(); window.close();\">');\n"
+" d.write('<body style=\"margin: 0px; padding: 0px;\" onload=\"window.print();\">');\n"
" d.write('<div id=\"svg\" style=\"width:'+windowWidth+'px; height:'+windowHeight+'px;\">'+xs+'</div>');\n"
" d.write('</body>');\n"
" d.write('</html>');\n"
" d.close();\n"
" } catch(e) {\n"
-" alert('Print function not supported by this browser!');\n"
+" alert('Failed to open popup window needed for printing!\\n'+e.message);\n"
" }\n"
"}\n"
"\n"
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index c48078d..10b2018 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -618,12 +618,12 @@ static void codifyMapLines(char *text)
int wordCounter=0;
QCString ctemp;
//printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text);
- char *p=text,*sp=p;
+ char *p=text; //,*sp=p;
char c;
bool done=FALSE;
while (!done)
{
- sp=p;
+ //sp=p;
while ((c=*p++) && c!='\n' && c!=':' && c != ' ' && c != '(' && c!='\0' && c!='\t')
{
if (c!=0x9)
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 5af938f..f603c30 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -403,17 +403,17 @@ void VhdlDocGen::findAllPackages(const QCString& className,QDict<QCString>& qdic
MemberDef* VhdlDocGen::findFunction(const QList<Argument> &ql,
const QCString& funcname,
- const QCString& package, bool type)
+ const QCString& package, bool /*type*/)
{
MemberDef* mdef=0;
- int funcType;
+ //int funcType;
ClassDef *cdef=getClass(package.data());
if (cdef==0) return 0;
- if (type)
- funcType=VhdlDocGen::PROCEDURE;
- else
- funcType=VhdlDocGen::FUNCTION;
+ //if (type)
+ // funcType=VhdlDocGen::PROCEDURE;
+ //else
+ // funcType=VhdlDocGen::FUNCTION;
MemberList *mem=cdef->getMemberList(MemberList::pubMethods);
@@ -1194,7 +1194,7 @@ void VhdlDocGen::writeFuncProcDocu(
bool /*type*/)
{
if (al==0) return;
- bool sem=FALSE;
+ //bool sem=FALSE;
ol.enableAll();
ArgumentListIterator ali(*al);
@@ -1263,7 +1263,7 @@ void VhdlDocGen::writeFuncProcDocu(
}
ol.endParameterName(FALSE,FALSE,FALSE);
- sem=TRUE;
+ //sem=TRUE;
first=FALSE;
}
//ol.endParameterList();
diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h
index bb9a122..df53088 100644
--- a/src/vhdldocgen.h
+++ b/src/vhdldocgen.h
@@ -35,7 +35,7 @@ class FileStorage;
class EntryNav;
class ClassDef;
class MemberDef;
-class Argument;
+struct Argument;
// wrapper class for the vhdl parser
class MyParserVhdl