summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doxyfile4
-rw-r--r--INSTALL4
-rw-r--r--README4
-rwxr-xr-xconfigure2
-rw-r--r--doc/commands.doc29
-rw-r--r--doc/customize.doc11
-rw-r--r--doc/faq.doc2
-rw-r--r--doc/language.doc2
-rw-r--r--doc/translator_report.txt2
-rw-r--r--qtools/qarray.h12
-rw-r--r--qtools/qbuffer.cpp2
-rw-r--r--qtools/qdatastream.cpp2
-rw-r--r--qtools/qdir.cpp2
-rw-r--r--qtools/qfile_unix.cpp12
-rw-r--r--qtools/qfileinfo_unix.cpp6
-rw-r--r--qtools/qregexp.cpp10
-rw-r--r--qtools/qstring.cpp8
-rw-r--r--qtools/qtextcodec.cpp8
-rw-r--r--qtools/qtextstream.cpp8
-rw-r--r--qtools/qthread_unix.cpp15
-rw-r--r--qtools/qutfcodec.cpp6
-rw-r--r--src/cite.cpp82
-rw-r--r--src/classdef.cpp29
-rw-r--r--src/code.l2
-rw-r--r--src/commentcnv.l41
-rw-r--r--src/commentscan.l10
-rw-r--r--src/config.xml13
-rwxr-xr-xsrc/configgen.py3
-rw-r--r--src/configoptions.cpp10
-rw-r--r--src/definition.cpp18
-rw-r--r--src/definition.h10
-rw-r--r--src/diagram.cpp24
-rw-r--r--src/dirdef.cpp4
-rw-r--r--src/docparser.cpp2
-rw-r--r--src/docparser.h2
-rw-r--r--src/docsets.cpp3
-rw-r--r--src/docsets.h3
-rw-r--r--src/dot.cpp30
-rw-r--r--src/doxygen.cpp13
-rw-r--r--src/doxygen.css10
-rw-r--r--src/doxygen_css.h10
-rw-r--r--src/dynsections.js45
-rw-r--r--src/dynsections_js.h45
-rw-r--r--src/eclipsehelp.cpp1
-rw-r--r--src/eclipsehelp.h3
-rw-r--r--src/filedef.cpp14
-rw-r--r--src/fortranscanner.l32
-rw-r--r--src/ftvhelp.cpp6
-rw-r--r--src/ftvhelp.h2
-rw-r--r--src/groupdef.cpp2
-rw-r--r--src/header.html1
-rw-r--r--src/header_html.h1
-rw-r--r--src/htmldocvisitor.cpp38
-rw-r--r--src/htmlgen.cpp29
-rw-r--r--src/htmlgen.h13
-rw-r--r--src/htmlhelp.cpp8
-rw-r--r--src/htmlhelp.h3
-rw-r--r--src/index.cpp11
-rw-r--r--src/index.h9
-rw-r--r--src/latexgen.cpp3
-rw-r--r--src/latexgen.h11
-rw-r--r--src/layout.cpp3
-rw-r--r--src/layout_default.h1
-rw-r--r--src/layout_default.xml1
-rw-r--r--src/lodepng.cpp10
-rw-r--r--src/mangen.h5
-rw-r--r--src/memberdef.cpp203
-rw-r--r--src/memberdef.h2
-rw-r--r--src/namespacedef.cpp2
-rw-r--r--src/navtree.css2
-rw-r--r--src/navtree_css.h2
-rw-r--r--src/objcache.cpp4
-rw-r--r--src/outputgen.h2
-rw-r--r--src/outputlist.h4
-rw-r--r--src/pagedef.cpp2
-rw-r--r--src/portable.cpp5
-rw-r--r--src/pre.l81
-rw-r--r--src/pycode.l2
-rw-r--r--src/pyscanner.l4
-rw-r--r--src/qhp.cpp9
-rw-r--r--src/qhp.h3
-rw-r--r--src/rtfgen.cpp8
-rw-r--r--src/rtfgen.h2
-rw-r--r--src/scanner.l17
-rw-r--r--src/searchindex.cpp74
-rw-r--r--src/searchindex.h4
-rw-r--r--src/store.cpp6
-rw-r--r--src/tclscanner.l12
-rw-r--r--src/translator_dk.h2
-rw-r--r--src/translatordecoder.h2
-rw-r--r--src/util.cpp10
-rw-r--r--src/vhdlcode.l2
-rw-r--r--src/vhdldocgen.cpp803
-rw-r--r--src/vhdldocgen.h95
-rw-r--r--src/vhdlparser.y943
-rw-r--r--src/vhdlscanner.l2
96 files changed, 2261 insertions, 815 deletions
diff --git a/Doxyfile b/Doxyfile
index fe8d217..77b0522 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -224,7 +224,7 @@ USE_MATHJAX = NO
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
MATHJAX_EXTENSIONS =
SEARCHENGINE = YES
-SERVER_BASED_SEARCH = NO
+SERVER_BASED_SEARCH = YES
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
@@ -294,7 +294,7 @@ SKIP_FUNCTION_MACROS = YES
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES = qtools_docs/qtools.tag=../../qtools_docs/html
-GENERATE_TAGFILE =
+GENERATE_TAGFILE = doxygen.tag
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
diff --git a/INSTALL b/INSTALL
index 8f762fd..ff2992f 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
-DOXYGEN Version 1.8.2
+DOXYGEN Version 1.8.2-20120930
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
-Dimitri van Heesch (12 August 2012)
+Dimitri van Heesch (30 September 2012)
diff --git a/README b/README
index 7af60d2..139c0f6 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.8.2
+DOXYGEN Version 1.8.2_20120930
Please read INSTALL for compilation instructions.
@@ -26,4 +26,4 @@ forum.
Enjoy,
-Dimitri van Heesch (dimitri@stack.nl) (12 August 2012)
+Dimitri van Heesch (dimitri@stack.nl) (30 September 2012)
diff --git a/configure b/configure
index 4b0ee9e..8dd7960 100755
--- a/configure
+++ b/configure
@@ -20,7 +20,7 @@ doxygen_version_minor=8
doxygen_version_revision=2
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
-doxygen_version_mmn=NO
+doxygen_version_mmn=20120930
bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
diff --git a/doc/commands.doc b/doc/commands.doc
index 66eabd9..d922efe 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -55,6 +55,7 @@ documentation:
\refitem cmdclass \\class
\refitem cmdcode \\code
\refitem cmdcond \\cond
+\refitem cmdcondnot \\condnot
\refitem cmdcopybrief \\copybrief
\refitem cmdcopydetails \\copydetails
\refitem cmdcopydoc \\copydoc
@@ -1125,7 +1126,29 @@ class Implementation : public Intf
The output will be different depending on whether or not \c ENABLED_SECTIONS
contains \c TEST, or \c DEV
- \sa section \ref cmdendcond "\\endcond".
+ \sa section \ref cmdcondnot "\\condnot" and section \ref cmdendcond "\\endcond".
+
+<hr>
+\section cmdcondnot \\condnot <section-label>
+
+ \addindex \\condnot
+ Starts a conditional section that ends with a corresponding
+ \ref cmdendcond "\\endcond" command, which is typically found in
+ another comment block. The main purpose of this pair of
+ commands is to (conditionally) exclude part of a file from processing
+ (in older version of doxygen this could only be achieved using C preprocessor commands).
+
+ The section between \\condnot and \\endcond commands can be excluded by
+ adding its section label to the \ref cfg_enabled_sections "ENABLED_SECTIONS"
+ configuration option.
+
+ For conditional sections within a comment block one should
+ use a \ref cmdif "\\if" ... \ref cmdendif "\\endif" block.
+
+ Conditional sections can be nested. In this case a nested section will only
+ be shown if it and its containing section are included.
+
+ \sa section \ref cmdcond "\\cond" and section \ref cmdendcond "\\endcond".
<hr>
\section cmdcopyright \\copyright { copyright description }
@@ -1197,9 +1220,9 @@ contains \c TEST, or \c DEV
\section cmdendcond \\endcond
\addindex \\endcond
- Ends a conditional section that was started by \ref cmdcond "\\cond".
+ Ends a conditional section that was started by \ref cmdcond "\\cond" or \ref cmdcondnot "\\condnot".
- \sa section \ref cmdcond "\\cond".
+ \sa section \ref cmdcond "\\cond" and section \ref cmdcondnot "\\condnot".
<hr>
\section cmdendif \\endif
diff --git a/doc/customize.doc b/doc/customize.doc
index 610f8f4..b035826 100644
--- a/doc/customize.doc
+++ b/doc/customize.doc
@@ -109,12 +109,19 @@ This will create 3 files:
a HTML page. Also here special commands can be used. This file contain the
link to www.doxygen.org and the body and html end tags.
- customdoxygen.css is the default cascading style sheet
- used by doxygen.
+ used by doxygen. It is recommended only to look into this file and overrule
+ some settings you like by putting them in a separate stylesheet and
+ referencing that extra file
+ via \ref cfg_html_extra_stylesheet "HTML_EXTRA_STYLESHEET".
You should edit these files and then reference them from the config file.
- \ref cfg_html_header "HTML_HEADER" = \c header.html
- \ref cfg_html_footer "HTML_FOOTER" = \c footer.html
-- \ref cfg_html_stylesheet "HTML_STYLESHEET" = \c customdoxygen.css
+- \ref cfg_html_stylesheet "HTML_STYLESHEET" = \c customdoxygen.css <b>&larr;obsolete</b>
+
+\note it is not longer recommended to use HTML_STYLESHEET this way,
+as it make it difficult to upgrade to a newer version of doxygen. Use
+\ref cfg_html_extra_stylesheet "HTML_EXTRA_STYLESHEET" instead.
See the documentation of the \ref cfg_html_header "HTML_HEADER" tag
for more information about the possible meta commands you can use inside
diff --git a/doc/faq.doc b/doc/faq.doc
index 0475aa7..cc8a9a4 100644
--- a/doc/faq.doc
+++ b/doc/faq.doc
@@ -80,7 +80,7 @@ document either the class or namespace.
<li><b>How can I make doxygen ignore some code fragment?</b>
The new and easiest way is to add one comment block
-with a \ref cmdcond "\\cond" command at the start and one comment block
+with a \ref cmdcond "\\cond" or \ref cmdcondnot "\\condnot" command at the start and one comment block
with a \ref cmdendcond "\\endcond" command at the end of the piece of
code that should be ignored. This should be within the same file of course.
diff --git a/doc/language.doc b/doc/language.doc
index 83a0bfa..6052537 100644
--- a/doc/language.doc
+++ b/doc/language.doc
@@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other
than English (the default). The output language is chosen through the
configuration file (with default name and known as Doxyfile).
-Currently (version 1.8.1.2), 39 languages
+Currently (version 1.8.2), 39 languages
are supported (sorted alphabetically):
Afrikaans, Arabic, Armenian, Brazilian Portuguese, Catalan, Chinese,
Chinese Traditional, Croatian, Czech, Danish, Dutch, English,
diff --git a/doc/translator_report.txt b/doc/translator_report.txt
index 83f020a..a50ef27 100644
--- a/doc/translator_report.txt
+++ b/doc/translator_report.txt
@@ -1,4 +1,4 @@
-(1.8.1.2)
+(1.8.2)
Doxygen supports the following 39 languages (sorted alphabetically):
diff --git a/qtools/qarray.h b/qtools/qarray.h
index 90dcbb7..3d67fe9 100644
--- a/qtools/qarray.h
+++ b/qtools/qarray.h
@@ -55,19 +55,19 @@ protected:
public:
QArray() {}
- QArray( int size ) : QGArray(size*sizeof(type)) {}
+ QArray( int size ) : QGArray(size*(int)sizeof(type)) {}
QArray( const QArray<type> &a ) : QGArray(a) {}
~QArray() {}
QArray<type> &operator=(const QArray<type> &a)
{ return (QArray<type>&)QGArray::assign(a); }
type *data() const { return (type *)QGArray::data(); }
uint nrefs() const { return QGArray::nrefs(); }
- uint size() const { return QGArray::size()/sizeof(type); }
+ uint size() const { return QGArray::size()/(int)sizeof(type); }
uint count() const { return size(); }
bool isEmpty() const { return QGArray::size() == 0; }
bool isNull() const { return QGArray::data() == 0; }
- bool resize( uint size ) { return QGArray::resize(size*sizeof(type)); }
- bool truncate( uint pos ) { return QGArray::resize(pos*sizeof(type)); }
+ bool resize( uint size ) { return QGArray::resize(size*(int)sizeof(type)); }
+ bool truncate( uint pos ) { return QGArray::resize(pos*(int)sizeof(type)); }
bool fill( const type &d, int size = -1 )
{ return QGArray::fill((char*)&d,size,sizeof(type) ); }
void detach() { QGArray::detach(); }
@@ -94,9 +94,9 @@ public:
int bsearch( const type &d ) const
{ return QGArray::bsearch((const char*)&d,sizeof(type)); }
type& operator[]( int i ) const
- { return (type &)(*(type *)QGArray::at(i*sizeof(type))); }
+ { return (type &)(*(type *)QGArray::at(i*(int)sizeof(type))); }
type& at( uint i ) const
- { return (type &)(*(type *)QGArray::at(i*sizeof(type))); }
+ { return (type &)(*(type *)QGArray::at(i*(int)sizeof(type))); }
operator const type*() const { return (const type *)QGArray::data(); }
bool operator==( const QArray<type> &a ) const { return isEqual(a); }
bool operator!=( const QArray<type> &a ) const { return !isEqual(a); }
diff --git a/qtools/qbuffer.cpp b/qtools/qbuffer.cpp
index beed0ba..f68ef54 100644
--- a/qtools/qbuffer.cpp
+++ b/qtools/qbuffer.cpp
@@ -375,7 +375,7 @@ int QBuffer::readLine( char *p, uint maxlen )
break;
}
*p = '\0';
- ioIndex = d - a.data();
+ ioIndex = (int)(d - a.data());
return (uint)ioIndex - start;
}
diff --git a/qtools/qdatastream.cpp b/qtools/qdatastream.cpp
index 7f63cbf..8505dd4 100644
--- a/qtools/qdatastream.cpp
+++ b/qtools/qdatastream.cpp
@@ -412,7 +412,7 @@ static Q_INT32 read_int_ascii( QDataStream *s )
n++;
}
buf[n] = '\0';
- return atol( buf );
+ return (Q_INT32)atol( buf );
}
diff --git a/qtools/qdir.cpp b/qtools/qdir.cpp
index d0c1233..120abe7 100644
--- a/qtools/qdir.cpp
+++ b/qtools/qdir.cpp
@@ -1184,7 +1184,7 @@ int qt_cmp_si( const void *n1, const void *n2 )
if ( r == 0 ) {
// Enforce an order - the order the items appear in the array
- r = (char*)n1 - (char*)n2;
+ r = (int)((char*)n1 - (char*)n2);
}
if ( qt_cmp_si_sortSpec & QDir::Reversed )
diff --git a/qtools/qfile_unix.cpp b/qtools/qfile_unix.cpp
index fa53d13..0422fb4 100644
--- a/qtools/qfile_unix.cpp
+++ b/qtools/qfile_unix.cpp
@@ -403,7 +403,7 @@ uint QFile::size() const
} else {
STAT( QFile::encodeName(fn), &st );
}
- return st.st_size;
+ return (uint)st.st_size;
}
/*!
@@ -500,13 +500,13 @@ int QFile::readBlock( char *p, uint len )
if ( nread < (int)len ) {
if ( isRaw() ) { // raw file
- nread += READ( fd, p, len-nread );
+ nread += (int)READ( fd, p, len-nread );
if ( len && nread <= 0 ) {
nread = 0;
setStatus(IO_ReadError);
}
} else { // buffered file
- nread += fread( p, 1, len-nread, fh );
+ nread += (int)fread( p, 1, len-nread, fh );
if ( (uint)nread != len ) {
if ( ferror( fh ) || nread==0 )
setStatus(IO_ReadError);
@@ -552,9 +552,9 @@ int QFile::writeBlock( const char *p, uint len )
#endif
int nwritten; // number of bytes written
if ( isRaw() ) // raw file
- nwritten = WRITE( fd, p, len );
+ nwritten = (int)WRITE( fd, p, len );
else // buffered file
- nwritten = fwrite( p, 1, len, fh );
+ nwritten = (int)fwrite( p, 1, len, fh );
if ( nwritten != (int)len ) { // write error
if ( errno == ENOSPC ) // disk is full
setStatus( IO_ResourceError );
@@ -661,7 +661,7 @@ bool QFile::seek( int64 pos )
if (isOpen())
{
// TODO: support 64 bit size
- return fseek( fh, pos, SEEK_SET )!=-1;
+ return fseek( fh, (long)pos, SEEK_SET )!=-1;
}
return FALSE;
}
diff --git a/qtools/qfileinfo_unix.cpp b/qtools/qfileinfo_unix.cpp
index 5a8fe04..f2b438c 100644
--- a/qtools/qfileinfo_unix.cpp
+++ b/qtools/qfileinfo_unix.cpp
@@ -124,7 +124,7 @@ QString QFileInfo::readLink() const
char s[PATH_MAX+1];
if ( !isSymLink() )
return QString();
- int len = readlink( QFile::encodeName(fn).data(), s, PATH_MAX );
+ int len = (int)readlink( QFile::encodeName(fn).data(), s, PATH_MAX );
if ( len >= 0 ) {
s[len] = '\0';
r = QFile::decodeName(s);
@@ -297,7 +297,7 @@ QDateTime QFileInfo::lastModified() const
if ( !fic || !cache )
doStat();
if ( fic )
- dt.setTime_t( fic->st.st_mtime );
+ dt.setTime_t( (uint)fic->st.st_mtime );
return dt;
}
@@ -316,7 +316,7 @@ QDateTime QFileInfo::lastRead() const
if ( !fic || !cache )
doStat();
if ( fic )
- dt.setTime_t( fic->st.st_atime );
+ dt.setTime_t( (uint)fic->st.st_atime );
return dt;
}
diff --git a/qtools/qregexp.cpp b/qtools/qregexp.cpp
index 2b3770c..fcc8f11 100644
--- a/qtools/qregexp.cpp
+++ b/qtools/qregexp.cpp
@@ -525,7 +525,7 @@ static int matchstring( uint *rxd, const char *str, uint strlength,
while ( p >= first_p ) { // go backwards
int end = matchstring( d, p, pl, bol, cs );
if ( end >= 0 )
- return ( p - start ) + end;
+ return ( (int)(p - start) ) + end;
if ( !p )
return -1;
--p;
@@ -587,7 +587,7 @@ static int matchstring( uint *rxd, const char *str, uint strlength,
while ( p >= first_p ) { // go backwards
int end = matchstring( d, p, pl, bol, cs );
if ( end >= 0 )
- return ( p - start ) + end;
+ return ( (int)(p - start) ) + end;
if ( !p )
return -1;
--p;
@@ -600,7 +600,7 @@ static int matchstring( uint *rxd, const char *str, uint strlength,
return -1;
}
}
- return p - start;
+ return (int)(p - start);
}
@@ -1043,7 +1043,7 @@ void QRegExp::compile()
error = PatSyntax;
return;
}
- int ddiff = d - prev_d;
+ int ddiff = (int)(d - prev_d);
if ( *p == '+' ) { // convert to Kleene closure
if ( d + ddiff >= rxarray + maxlen ) {
error = PatOverflow; // pattern too long
@@ -1082,7 +1082,7 @@ void QRegExp::compile()
}
}
GEN( END );
- int len = d - rxarray;
+ int len = (int)(d - rxarray);
rxdata = new uint[ len ]; // copy from rxarray to rxdata
CHECK_PTR( rxdata );
memcpy( rxdata, rxarray, len*sizeof(uint) );
diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp
index 889e936..11187f6 100644
--- a/qtools/qstring.cpp
+++ b/qtools/qstring.cpp
@@ -13535,7 +13535,7 @@ QString &QString::insert( uint index, const QChar* s, uint len )
uint olen = length();
int nlen = olen + len;
- int df = s - d->unicode; // ### pointer subtraction, cast down to int
+ int df = (int)(s - d->unicode); // ### pointer subtraction, cast down to int
if ( df >= 0 && (uint)df < d->maxl ) {
// Part of me - take a copy.
QChar *tmp = QT_ALLOC_QCHAR_VEC( len );
@@ -13679,7 +13679,7 @@ QString &QString::replace( uint index, uint len, const QChar* s, uint slen )
real_detach();
memcpy( d->unicode+index, s, len*sizeof(QChar) );
} else {
- int df = s - d->unicode; // ### pointer subtraction, cast down to int
+ int df = (int)(s - d->unicode); // ### pointer subtraction, cast down to int
if ( df >= 0 && (uint)df < d->maxl ) {
// Part of me - take a copy.
QChar *tmp = QT_ALLOC_QCHAR_VEC( slen );
@@ -15017,7 +15017,7 @@ QDataStream &operator<<( QDataStream &s, const QString &str )
if ( ub || s.version() < 3 ) {
if ( QChar::networkOrdered() ==
(s.byteOrder()==QDataStream::BigEndian) ) {
- s.writeBytes( ub, sizeof(QChar)*str.length() );
+ s.writeBytes( ub, (int)sizeof(QChar)*str.length() );
} else {
static const uint auto_size = 1024;
char t[auto_size];
@@ -15034,7 +15034,7 @@ QDataStream &operator<<( QDataStream &s, const QString &str )
*c++ = ub[0];
ub+=sizeof(QChar);
}
- s.writeBytes( b, sizeof(QChar)*str.length() );
+ s.writeBytes( b, (int)sizeof(QChar)*str.length() );
if ( str.length()*sizeof(QChar) > auto_size )
delete [] b;
}
diff --git a/qtools/qtextcodec.cpp b/qtools/qtextcodec.cpp
index 4eb8ba5..bb8bff4 100644
--- a/qtools/qtextcodec.cpp
+++ b/qtools/qtextcodec.cpp
@@ -931,11 +931,11 @@ static int getByte(char* &cursor)
int byte = 0;
if ( *cursor ) {
if ( cursor[1] == 'x' )
- byte = strtol(cursor+2,&cursor,16);
+ byte = (int)strtol(cursor+2,&cursor,16);
else if ( cursor[1] == 'd' )
- byte = strtol(cursor+2,&cursor,10);
+ byte = (int)strtol(cursor+2,&cursor,10);
else
- byte = strtol(cursor+2,&cursor,8);
+ byte = (int)strtol(cursor+2,&cursor,8);
}
return byte&0xff;
}
@@ -1017,7 +1017,7 @@ public:
cursor[2]>='0' && cursor[2]<='9' &&
cursor[3]>='0' && cursor[3]<='9') {
- unicode = strtol(cursor+2,&cursor,16);
+ unicode = (int)strtol(cursor+2,&cursor,16);
} else if (*cursor==esc) {
diff --git a/qtools/qtextstream.cpp b/qtools/qtextstream.cpp
index b12f86d..21b455e 100644
--- a/qtools/qtextstream.cpp
+++ b/qtools/qtextstream.cpp
@@ -308,7 +308,7 @@ bool QStringBuffer::open( int m )
s->truncate( 0 );
}
if ( m & IO_Append ) { // append to end of buffer
- ioIndex = s->length()*sizeof(QChar);
+ ioIndex = s->length()*(int)sizeof(QChar);
} else {
ioIndex = 0;
}
@@ -331,7 +331,7 @@ void QStringBuffer::flush()
uint QStringBuffer::size() const
{
- return s ? s->length()*sizeof(QChar) : 0;
+ return s ? s->length()*(int)sizeof(QChar) : 0;
}
int QStringBuffer::at() const
@@ -916,7 +916,7 @@ QTextStream &QTextStream::writeBlock( const char* p, uint len )
QChar *u = new QChar[len];
for (uint i=0; i<len; i++)
u[i] = p[i];
- dev->writeBlock( (char*)u, len*sizeof(QChar) );
+ dev->writeBlock( (char*)u, len*(int)sizeof(QChar) );
delete [] u;
} else {
for (uint i=0; i<len; i++)
@@ -932,7 +932,7 @@ QTextStream &QTextStream::writeBlock( const QChar* p, uint len )
doUnicodeHeader = FALSE;
ts_putc( QChar::byteOrderMark );
}
- dev->writeBlock( (char*)p, sizeof(QChar)*len );
+ dev->writeBlock( (char*)p, (int)sizeof(QChar)*len );
} else {
for (uint i=0; i<len; i++)
ts_putc( p[i] );
diff --git a/qtools/qthread_unix.cpp b/qtools/qthread_unix.cpp
index 5a7b788..b536583 100644
--- a/qtools/qthread_unix.cpp
+++ b/qtools/qthread_unix.cpp
@@ -52,6 +52,7 @@
#include <sys/types.h>
#include <sys/sysctl.h>
#endif
+#include <signal.h>
#include <unistd.h>
#include <stdio.h>
@@ -118,6 +119,13 @@ void QThread::start()
QMutexLocker locker(&d->mutex);
if (d->running) return;
+ // Block the SIGINT signal. The threads will inherit the signal mask.
+ // This will avoid them catching SIGINT instead of this thread.
+ sigset_t sigset, oldset;
+ sigemptyset(&sigset);
+ sigaddset(&sigset, SIGINT);
+ pthread_sigmask(SIG_BLOCK, &sigset, &oldset);
+
d->running = TRUE;
d->finished = FALSE;
@@ -142,6 +150,11 @@ void QThread::start()
d->finished = FALSE;
d->thread_id = 0;
}
+ else
+ {
+ // Restore the old signal mask only for this thread.
+ pthread_sigmask(SIG_SETMASK, &oldset, NULL);
+ }
}
void QThread::terminate()
@@ -182,7 +195,7 @@ int QThread::idealThreadCount()
int cores = -1;
#if defined(_OS_MAC_)
// Mac OS X
- cores = MPProcessorsScheduled();
+ cores = (int)MPProcessorsScheduled();
#elif defined(_OS_HPUX_)
// HP-UX
struct pst_dynamic psd;
diff --git a/qtools/qutfcodec.cpp b/qtools/qutfcodec.cpp
index b0caa76..c7094ad 100644
--- a/qtools/qutfcodec.cpp
+++ b/qtools/qutfcodec.cpp
@@ -65,7 +65,7 @@ QCString QUtf8Codec::fromUnicode(const QString& uc, int& len_in_out) const
*cursor++ = 0x80 | (ch.cell()&0x3f);
}
}
- len_in_out = cursor - (uchar*)rstr.data();
+ len_in_out = (int)(cursor - (uchar*)rstr.data());
rstr.truncate(len_in_out);
return rstr;
}
@@ -201,13 +201,13 @@ public:
QCString fromUnicode(const QString& uc, int& len_in_out)
{
if ( headerdone ) {
- len_in_out = uc.length()*sizeof(QChar);
+ len_in_out = uc.length()*(int)sizeof(QChar);
QCString d(len_in_out);
memcpy(d.data(),uc.unicode(),len_in_out);
return d;
} else {
headerdone = TRUE;
- len_in_out = (1+uc.length())*sizeof(QChar);
+ len_in_out = (1+uc.length())*(int)sizeof(QChar);
QCString d(len_in_out);
memcpy(d.data(),&QChar::byteOrderMark,sizeof(QChar));
memcpy(d.data()+sizeof(QChar),uc.unicode(),uc.length()*sizeof(QChar));
diff --git a/src/cite.cpp b/src/cite.cpp
index 96e88ae..5612eb4 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -45,7 +45,7 @@ CiteDict::CiteDict(int size) : m_entries(size, FALSE)
m_entries.setAutoDelete(TRUE);
}
-static QCString getListOfBibFiles(const QCString &sep,bool stripExtension)
+static QCString getListOfBibFiles(const QCString &sep,bool namesOnly)
{
QCString result;
QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
@@ -54,17 +54,24 @@ static QCString getListOfBibFiles(const QCString &sep,bool stripExtension)
{
int i;
QCString bibFile = bibdata;
- if (stripExtension && bibFile.right(4)==".bib")
+ if (namesOnly && bibFile.right(4)==".bib") // strip extension
{
bibFile = bibFile.left(bibFile.length()-4);
}
- if (stripExtension && (i=bibFile.findRev('/'))!=-1)
+ if ((i=bibFile.findRev('/'))!=-1) // strip path
{
bibFile = bibFile.mid(i+1);
}
if (!bibFile.isEmpty())
{
- result+=bibFile;
+ if (namesOnly) // bare names
+ {
+ result+=bibFile;
+ }
+ else // add quotes for paths with spaces
+ {
+ result+="\""+bibFile+"\"";
+ }
bibdata = citeDataList.next();
if (bibdata)
{
@@ -162,12 +169,52 @@ void CiteDict::generatePage() const
f.writeBlock(bstData, bstData.length());
f.close();
- // 4. run bib2xhtml perl script on the generated file which will insert the
+ // 4. for html we just copy the bib files to the output so that
+ // bibtex can find them without path (bibtex doesn't support path's
+ // with spaces!)
+ QList<QCString> tempFiles;
+ tempFiles.setAutoDelete(TRUE);
+ QDir thisDir;
+ if (Config_getBool("GENERATE_HTML"))
+ {
+ // copy bib files to the latex output dir
+ QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
+ QCString bibOutputDir = outputDir+"/";
+ QFileInfo fo(bibOutputDir);
+ const char *bibdata = citeDataList.first();
+ while (bibdata)
+ {
+ QCString bibFile = bibdata;
+ if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
+ QFileInfo fi(bibFile);
+ if (fi.exists() && fi.dirPath(TRUE)!=fo.absFilePath())
+ {
+ if (!bibFile.isEmpty())
+ {
+ QCString destFile=bibOutputDir+fi.fileName().data();
+ copyFile(bibFile,destFile);
+ tempFiles.append(new QCString(destFile));
+ }
+ }
+ else if (!fi.exists())
+ {
+ err("Error: bib file %s not found!\n",bibFile.data());
+ }
+ bibdata = citeDataList.next();
+ }
+ }
+
+ QCString oldDir = convertToQCString(QDir::currentDirPath());
+ QDir::setCurrent(outputDir);
+
+ // 5. run bib2xhtml perl script on the generated file which will insert the
// bibliography in citelist.doc
- portable_system("perl",bib2xhtmlFile+" "+getListOfBibFiles(" ",FALSE)+" "+
- citeListFile);
+ portable_system("perl","\""+bib2xhtmlFile+"\" "+getListOfBibFiles(" ",FALSE)+" \""+
+ citeListFile+"\"");
- // 5. read back the file
+ QDir::setCurrent(oldDir);
+
+ // 6. read back the file
f.setName(citeListFile);
if (!f.open(IO_ReadOnly))
{
@@ -212,11 +259,11 @@ void CiteDict::generatePage() const
}
//printf("doc=[%s]\n",doc.data());
- // 6. add it as a page
+ // 7. add it as a page
addRelatedPage(CiteConsts::fileName,
theTranslator->trCiteReferences(),doc,0,CiteConsts::fileName,1,0,0,0);
- // 7. for latex we just copy the bib files to the output and let
+ // 8. for latex we just copy the bib files to the output and let
// latex do this work.
if (Config_getBool("GENERATE_LATEX"))
{
@@ -244,11 +291,14 @@ void CiteDict::generatePage() const
}
}
- // 8. Remove temporary files
- QDir thisDir;
- thisDir.remove(citeListFile);
- thisDir.remove(doxygenBstFile);
- thisDir.remove(bib2xhtmlFile);
-
+ // 9. Remove temporary files
+ //thisDir.remove(citeListFile);
+ //thisDir.remove(doxygenBstFile);
+ //thisDir.remove(bib2xhtmlFile);
+ //while (!tempFiles.isEmpty())
+ //{
+ // QCString *s=tempFiles.take();
+ // thisDir.remove(*s);
+ //}
}
diff --git a/src/classdef.cpp b/src/classdef.cpp
index bf95dbb..3dd562e 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -1507,6 +1507,7 @@ void ClassDef::writeSummaryLinks(OutputList &ol)
for (li.toFirst();li.current();++li)
{
ol.writeSummaryLink(0,li.current()->data(),li.current()->data(),first);
+ first=FALSE;
}
}
if (!first)
@@ -2997,6 +2998,7 @@ void ClassDef::addUsedClass(ClassDef *cd,const char *accessName,
Protection prot)
{
static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
+ static bool umlLook = Config_getBool("UML_LOOK");
if (prot==Private && !extractPrivate) return;
//printf("%s::addUsedClass(%s,%s)\n",name().data(),cd->name().data(),accessName);
if (m_impl->usesImplClassDict==0)
@@ -3012,13 +3014,25 @@ void ClassDef::addUsedClass(ClassDef *cd,const char *accessName,
//printf("Adding used class %s to class %s via accessor %s\n",
// cd->name().data(),name().data(),accessName);
}
- ucd->addAccessor(accessName);
+ QCString acc = accessName;
+ if (umlLook)
+ {
+ switch(prot)
+ {
+ case Public: acc.prepend("+"); break;
+ case Private: acc.prepend("-"); break;
+ case Protected: acc.prepend("#"); break;
+ case Package: acc.prepend("~"); break;
+ }
+ }
+ ucd->addAccessor(acc);
}
void ClassDef::addUsedByClass(ClassDef *cd,const char *accessName,
Protection prot)
{
static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
+ static bool umlLook = Config_getBool("UML_LOOK");
if (prot==Private && !extractPrivate) return;
//printf("%s::addUsedByClass(%s,%s)\n",name().data(),cd->name().data(),accessName);
if (m_impl->usedByImplClassDict==0)
@@ -3034,7 +3048,18 @@ void ClassDef::addUsedByClass(ClassDef *cd,const char *accessName,
//printf("Adding used by class %s to class %s\n",
// cd->name().data(),name().data());
}
- ucd->addAccessor(accessName);
+ QCString acc = accessName;
+ if (umlLook)
+ {
+ switch(prot)
+ {
+ case Public: acc.prepend("+"); break;
+ case Private: acc.prepend("-"); break;
+ case Protected: acc.prepend("#"); break;
+ case Package: acc.prepend("~"); break;
+ }
+ }
+ ucd->addAccessor(acc);
}
diff --git a/src/code.l b/src/code.l
index d365c7c..9930f8a 100644
--- a/src/code.l
+++ b/src/code.l
@@ -565,7 +565,7 @@ static void codifyLines(const char *text)
{
g_yyLineNr++;
//*(p-1)='\0';
- int l = p-sp-1;
+ int l = (int)(p-sp-1);
char *tmp = (char*)malloc(l+1);
memcpy(tmp,sp,l);
tmp[l]='\0';
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 6da02db..e9fc74b 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -41,6 +41,12 @@
#define ADDCHAR(c) g_outBuf->addChar(c)
#define ADDARRAY(a,s) g_outBuf->addArray(a,s)
+enum GuardType
+{
+ Guard_Cond,
+ Guard_CondNot
+};
+
struct CondCtx
{
CondCtx(int line,QCString id,bool b)
@@ -77,6 +83,7 @@ static bool g_lastEscaped;
static int g_lastBlockContext;
static bool g_pythonDocString;
+static GuardType guardType; // kind of guard for conditional section
static SrcLangExt g_lang;
@@ -118,7 +125,7 @@ static void replaceCommentMarker(const char *s,int len)
ADDCHAR(' ');
}
// copy comment line to output
- ADDARRAY(p,len-(p-s));
+ ADDARRAY(p,len-(int)(p-s));
}
static inline int computeIndent(const char *s)
@@ -172,14 +179,29 @@ static inline void copyToOutput(const char *s,int len)
static void startCondSection(const char *sectId)
{
g_condStack.push(new CondCtx(g_lineNr,sectId,g_skip));
- if (Config_getList("ENABLED_SECTIONS").find(sectId)!=-1)
+ if (guardType == Guard_Cond)
{
- //printf("*** Section is enabled!\n");
+ if (Config_getList("ENABLED_SECTIONS").find(sectId)!=-1)
+ {
+ //printf("*** Section is enabled!\n");
+ }
+ else
+ {
+ //printf("*** Section is disabled!\n");
+ g_skip=TRUE;
+ }
}
- else
+ else if (guardType == Guard_CondNot)
{
- //printf("*** Section is disabled!\n");
- g_skip=TRUE;
+ if (Config_getList("ENABLED_SECTIONS").find(sectId)!=-1)
+ {
+ //printf("*** Section is disabled!\n");
+ g_skip=TRUE;
+ }
+ else
+ {
+ //printf("*** Section is enabled!\n");
+ }
}
}
@@ -660,6 +682,12 @@ void replaceComment(int offset);
}
<CComment,ReadLine>[\\@]"cond"[ \t]+ { // conditional section
g_condCtx = YY_START;
+ guardType = Guard_Cond;
+ BEGIN(CondLine);
+ }
+<CComment,ReadLine>[\\@]"condnot"[ \t]+ { // conditional section
+ g_condCtx = YY_START;
+ guardType = Guard_CondNot;
BEGIN(CondLine);
}
<CComment,ReadLine>[\\@]"endcond"/[^a-z_A-Z0-9] { // end of conditional section
@@ -700,6 +728,7 @@ void replaceComment(int offset);
<CondLine>[ \t]*
<CComment,ReadLine>[\\@]"cond"[ \t\r]*/\n |
<CondLine>. { // forgot section id?
+ guardType = Guard_Cond;
if (YY_START!=CondLine) g_condCtx=YY_START;
bool oldSkip=g_skip;
startCondSection(" "); // fake section id causing the section to be hidden unconditionally
diff --git a/src/commentscan.l b/src/commentscan.l
index 2d814eb..21f6f1c 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -1044,9 +1044,9 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
// rule matched.
// for flex 2.5.33+ we should use YY_CURRENT_BUFFER_LVALUE
#if YY_FLEX_MINOR_VERSION>=5 && YY_FLEX_SUBMINOR_VERSION>=33
- inputPosition=prevPosition + yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ inputPosition=prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);
#else
- inputPosition=prevPosition + yy_bp - yy_current_buffer->yy_ch_buf;
+ inputPosition=prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf);
#endif
yyterminate();
}
@@ -1106,9 +1106,9 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
parseMore=TRUE;
needNewEntry = TRUE;
#if YY_FLEX_MINOR_VERSION>=5 && YY_FLEX_SUBMINOR_VERSION>=33
- inputPosition=prevPosition + yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + strlen(yytext);
+ inputPosition=prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + strlen(yytext);
#else
- inputPosition=prevPosition + yy_bp - yy_current_buffer->yy_ch_buf + strlen(yytext);
+ inputPosition=prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf) + strlen(yytext);
#endif
yyterminate();
}
@@ -2848,7 +2848,7 @@ static int findExistingGroup(int &groupId,const MemberGroupInfo *info)
)
{
//printf("Found it!\n");
- return di.currentKey(); // put the item in this group
+ return (int)di.currentKey(); // put the item in this group
}
}
groupId++; // start new group
diff --git a/src/config.xml b/src/config.xml
index e0caa16..410f732 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -284,11 +284,11 @@ Doxygen will parse them like normal C++ but will assume all classes use public
instead of private inheritance when no explicit protection keyword is present.
' defval='0'/>
<option type='bool' id='IDL_PROPERTY_SUPPORT' docs='
-For Microsoft&apos;s IDL there are propget and propput attributes to indicate
-getter and setter methods for a property. Setting this option to YES (the
-default) will make doxygen replace the get and set methods by a property in
-the documentation. This will only work if the methods are indeed getting or
-setting a simple type. If this is not the case, or you want to show the
+For Microsoft&apos;s IDL there are propget and propput attributes to indicate
+getter and setter methods for a property. Setting this option to YES (the
+default) will make doxygen replace the get and set methods by a property in
+the documentation. This will only work if the methods are indeed getting or
+setting a simple type. If this is not the case, or you want to show the
methods anyway, you should set this option to NO.
' defval='1'/>
<option type='bool' id='DISTRIBUTE_GROUP_DOC' docs='
@@ -561,7 +561,8 @@ containing the references data. This must be a list of .bib files. The
requires the bibtex tool to be installed. See also
http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
-feature you need bibtex and perl available in the search path.
+feature you need bibtex and perl available in the search path. Do not use
+file names with spaces, bibtex cannot handle them.
' defval=''/>
</group>
<group name='Messages' docs='configuration options related to warning and progress messages'>
diff --git a/src/configgen.py b/src/configgen.py
index d02eafd..5af201f 100755
--- a/src/configgen.py
+++ b/src/configgen.py
@@ -12,6 +12,7 @@
# input used in their production; they are not affected by this license.
#
import xml.dom.minidom
+import sys
from xml.dom import minidom, Node
def addValues(var,node):
@@ -110,7 +111,7 @@ def parseGroups(node):
def main():
- doc = xml.dom.minidom.parse("config.xml")
+ doc = xml.dom.minidom.parse(sys.argv[1])
elem = doc.documentElement
print "/* WARNING: This file is generated!"
print " * Do not edit this file, but edit config.xml instead and run"
diff --git a/src/configoptions.cpp b/src/configoptions.cpp
index 62caf46..99e4798 100644
--- a/src/configoptions.cpp
+++ b/src/configoptions.cpp
@@ -400,7 +400,12 @@ void addConfigOptions(Config *cfg)
//----
cb = cfg->addBool(
"IDL_PROPERTY_SUPPORT",
- "For Microsoft's IDL there are propget and propput attributes to indicate getter and setter methods for a property. Setting this option to YES (the default) will make doxygen replace the get and set methods by a property in the documentation. This will only work if the methods are indeed getting or setting a simple type. If this is not the case, or you want to show the methods anyway, you should set this option to NO.",
+ "For Microsoft's IDL there are propget and propput attributes to indicate\n"
+ "getter and setter methods for a property. Setting this option to YES (the\n"
+ "default) will make doxygen replace the get and set methods by a property in\n"
+ "the documentation. This will only work if the methods are indeed getting or\n"
+ "setting a simple type. If this is not the case, or you want to show the\n"
+ "methods anyway, you should set this option to NO.",
TRUE
);
//----
@@ -801,7 +806,8 @@ void addConfigOptions(Config *cfg)
"requires the bibtex tool to be installed. See also\n"
"http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style\n"
"of the bibliography can be controlled using LATEX_BIB_STYLE. To use this\n"
- "feature you need bibtex and perl available in the search path."
+ "feature you need bibtex and perl available in the search path. Do not use\n"
+ "file names with spaces, bibtex cannot handle them."
);
cl->setWidgetType(ConfigList::File);
//---------------------------------------------------------------------------
diff --git a/src/definition.cpp b/src/definition.cpp
index c4d3a6e..1e60730 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -691,7 +691,7 @@ void Definition::setInbodyDocumentation(const char *d,const char *inbodyFile,int
* The line actually containing the bracket is returned via endLine.
* Note that for VHDL code the bracket search is not done.
*/
-static bool readCodeFragment(const char *fileName,
+bool readCodeFragment(const char *fileName,
int &startLine,int &endLine,QCString &result)
{
static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
@@ -1546,7 +1546,7 @@ void Definition::writeToc(OutputList &ol)
ol.writeString("<ul>");
SDict<SectionInfo>::Iterator li(*sectionDict);
SectionInfo *si;
- int level=1;
+ int level=1,l;
char cs[2];
cs[1]='\0';
bool inLi[5]={ FALSE, FALSE, FALSE, FALSE };
@@ -1561,13 +1561,19 @@ void Definition::writeToc(OutputList &ol)
int nextLevel = (int)si->type;
if (nextLevel>level)
{
- ol.writeString("<ul>");
+ for (l=level;l<nextLevel;l++)
+ {
+ ol.writeString("<ul>");
+ }
}
else if (nextLevel<level)
{
- if (inLi[level]) ol.writeString("</li>\n");
- inLi[level]=FALSE;
- ol.writeString("</ul>\n");
+ for (l=level;l>nextLevel;l--)
+ {
+ if (inLi[l]) ol.writeString("</li>\n");
+ inLi[l]=FALSE;
+ ol.writeString("</ul>\n");
+ }
}
cs[0]='0'+nextLevel;
if (inLi[nextLevel]) ol.writeString("</li>\n");
diff --git a/src/definition.h b/src/definition.h
index 563fb61..ed447fe 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -38,6 +38,8 @@ struct SectionInfo;
class Definition;
class DefinitionImpl;
+
+
/** Data associated with a detailed description. */
struct DocInfo
{
@@ -382,4 +384,12 @@ class DefinitionListIterator : public QListIterator<Definition>
~DefinitionListIterator() {}
};
+/** Reads a fragment from file \a fileName starting with line \a startLine
+ * and ending with line \a endLine. The result is returned as a string
+ * via \a result. The function returns TRUE if successful and FALSE
+ * in case of an error.
+ */
+bool readCodeFragment(const char *fileName,
+ int &startLine,int &endLine,
+ QCString &result);
#endif
diff --git a/src/diagram.cpp b/src/diagram.cpp
index b675b8d..67f63a0 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -606,7 +606,7 @@ void TreeDiagram::drawBoxes(FTextStream &t,Image *image,
while (dr && !done)
{
int x=0,y=0;
- float xf=0.0,yf=0.0;
+ float xf=0.0f,yf=0.0f;
DiagramItem *di=dr->first();
if (di->isInList()) // put boxes in a list
{
@@ -623,8 +623,8 @@ void TreeDiagram::drawBoxes(FTextStream &t,Image *image,
}
else
{
- if (doBase) yf += 1.0;
- else yf -= 1.0;
+ if (doBase) yf += 1.0f;
+ else yf -= 1.0f;
}
}
else
@@ -736,7 +736,7 @@ void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
if (di->isInList()) // row consists of list connectors
{
int x=0,y=0,ys=0;
- float xf=0.0,yf=0.0,ysf=0.0;
+ float xf=0.0f,yf=0.0f,ysf=0.0f;
while (di)
{
DiagramItem *pi=di->parentItem();
@@ -808,12 +808,12 @@ void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
if (doBase)
{
ysf = di->yPos()/(float)gridHeight+superRows-1;
- yf = ysf + 0.5;
+ yf = ysf + 0.5f;
}
else
{
- ysf = (float)superRows-0.25-di->yPos()/(float)gridHeight;
- yf = ysf - 0.25;
+ ysf = (float)superRows-0.25f-di->yPos()/(float)gridHeight;
+ yf = ysf - 0.25f;
}
}
while (di!=last) // more children to add
@@ -841,12 +841,12 @@ void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
if (doBase)
{
t << "1 " << xf << " " << yf << " hedge\n";
- yf += 1.0;
+ yf += 1.0f;
}
else
{
t << "0 " << xf << " " << yf << " hedge\n";
- yf -= 1.0;
+ yf -= 1.0f;
}
}
di=dr->next();
@@ -1092,9 +1092,9 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
uint estWidth = cols*(20+QMAX(baseMaxLabelWidth,superMaxLabelWidth));
//printf("Estimated size %d x %d\n",estWidth,estHeight);
- const float pageWidth = 14.0; // estimated page width in cm.
- // Somewhat lower to deal with estimation
- // errors.
+ const float pageWidth = 14.0f; // estimated page width in cm.
+ // Somewhat lower to deal with estimation
+ // errors.
// compute the image height in centimeters based on the estimates
float realHeight = QMIN(rows,12); // real height in cm
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index ad403f0..e45aff9 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -34,7 +34,7 @@ DirDef::DirDef(const char *path) : Definition(path,1,path)
}
setLocalName(m_shortName);
m_dispName = fullPathNames ? stripFromPath(path) : m_shortName;
- if (m_dispName.at(m_dispName.length()-1)=='/')
+ if (m_dispName.length()>0 && m_dispName.at(m_dispName.length()-1)=='/')
{ // strip trailing /
m_dispName = m_dispName.left(m_dispName.length()-1);
}
@@ -648,7 +648,7 @@ DirDef *DirDef::mergeDirectoryInTree(const QCString &path)
while ((i=path.find('/',p))!=-1)
{
QCString part=path.left(i+1);
- if (!matchPath(part,Config_getList("STRIP_FROM_PATH")) && part!="/")
+ if (!matchPath(part,Config_getList("STRIP_FROM_PATH")) && (part!="/" && part!="//"))
{
dir=createNewDir(part);
}
diff --git a/src/docparser.cpp b/src/docparser.cpp
index e7a6261..02153f6 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -43,6 +43,7 @@
#include "portable.h"
#include "cite.h"
#include "arguments.h"
+#include "vhdldocgen.h"
// debug off
#define DBG(x) do {} while(0)
@@ -5399,6 +5400,7 @@ int DocPara::handleCommand(const QCString &cmdName)
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Msc,g_isExample,g_exampleName));
if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: msc section ended without end marker");
doctokenizerYYsetStatePara();
+ VhdlDocGen::createFlowChart(g_memberDef);
}
break;
case CMD_ENDCODE:
diff --git a/src/docparser.h b/src/docparser.h
index e1a630e..2fe68af 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -504,7 +504,7 @@ class DocIndexEntry : public DocNode
{
public:
DocIndexEntry(DocNode *parent,Definition *scope,MemberDef *md)
- : m_scope(scope), m_member(md) { m_parent = parent; }
+ : m_scope(scope), m_member(md){ m_parent = parent; }
Kind kind() const { return Kind_IndexEntry; }
int parse();
Definition *scope() const { return m_scope; }
diff --git a/src/docsets.cpp b/src/docsets.cpp
index e851383..2f0770b 100644
--- a/src/docsets.cpp
+++ b/src/docsets.cpp
@@ -263,7 +263,8 @@ void DocSets::addContentsItem(bool isDir,
}
}
-void DocSets::addIndexItem(Definition *context,MemberDef *md,const char *)
+void DocSets::addIndexItem(Definition *context,MemberDef *md,
+ const char *,const char *)
{
if (md==0 && context==0) return;
diff --git a/src/docsets.h b/src/docsets.h
index 799e289..8cf1d3d 100644
--- a/src/docsets.h
+++ b/src/docsets.h
@@ -49,7 +49,8 @@ class DocSets : public IndexIntf
bool addToNavIndex,
Definition *def
);
- void addIndexItem(Definition *context,MemberDef *md,const char *title);
+ void addIndexItem(Definition *context,MemberDef *md,
+ const char *sectionAnchor,const char *title);
void addIndexFile(const char *name);
void addImageFile(const char *) {}
void addStyleSheetFile(const char *) {}
diff --git a/src/dot.cpp b/src/dot.cpp
index 39bc844..adad589 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -1408,7 +1408,6 @@ bool DotManager::run()
return TRUE;
}
-
//--------------------------------------------------------------------
@@ -1682,6 +1681,18 @@ static void writeBoxMemberList(FTextStream &t,
}
}
+static QCString stripProtectionPrefix(const QCString &s)
+{
+ if (!s.isEmpty() && (s[0]=='-' || s[0]=='+' || s[0]=='~' || s[0]=='#'))
+ {
+ return s.mid(1);
+ }
+ else
+ {
+ return s;
+ }
+}
+
void DotNode::writeBox(FTextStream &t,
GraphType gt,
GraphOutputFormat /*format*/,
@@ -1698,18 +1709,29 @@ void DotNode::writeBox(FTextStream &t,
if (m_classDef && umlLook && (gt==Inheritance || gt==Collaboration))
{
- // add names shown as relation to a dictionary, so we don't show
+ // add names shown as relations to a dictionary, so we don't show
// them as attributes as well
QDict<void> arrowNames(17);
if (m_edgeInfo)
{
+ // for each edge
QListIterator<EdgeInfo> li(*m_edgeInfo);
EdgeInfo *ei;
for (li.toFirst();(ei=li.current());++li)
{
- if (!ei->m_label.isEmpty())
+ if (!ei->m_label.isEmpty()) // labels joined by \n
{
- arrowNames.insert(ei->m_label,(void*)0x8);
+ int li=ei->m_label.find('\n');
+ int p=0;
+ QCString lab;
+ while ((li=ei->m_label.find('\n',p))!=-1)
+ {
+ lab = stripProtectionPrefix(ei->m_label.mid(p,li-p));
+ arrowNames.insert(lab,(void*)0x8);
+ p=li+1;
+ }
+ lab = stripProtectionPrefix(ei->m_label.right(ei->m_label.length()-p));
+ arrowNames.insert(lab,(void*)0x8);
}
}
}
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index afb2205..4397e77 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -4542,9 +4542,18 @@ static bool findClassRelation(
{
baseClass=new ClassDef(root->fileName,root->startLine,
baseClassName,ClassDef::Class);
- Doxygen::classSDict->append(baseClassName,baseClass);
+ //Doxygen::classSDict->append(baseClassName,baseClass);
if (isArtificial) baseClass->setArtificial(TRUE);
baseClass->setLanguage(root->lang);
+ int si = baseClassName.findRev("::");
+ if (si!=-1) // class is nested
+ {
+ Definition *sd = findScopeFromQualifiedName(Doxygen::globalScope,baseClassName.left(si));
+ if (sd==0 || sd==Doxygen::globalScope) // outer scope not found
+ {
+ baseClass->setArtificial(TRUE); // see bug678139
+ }
+ }
}
}
if (biName.right(2)=="-p")
@@ -7430,7 +7439,6 @@ static void buildCompleteMemberLists()
static void generateFileSources()
{
- if (documentedHtmlFiles==0) return;
if (Doxygen::inputNameList->count()>0)
{
FileNameListIterator fnli(*Doxygen::inputNameList);
@@ -9869,6 +9877,7 @@ static void stopDoxygen(int)
{
thisDir.remove(Doxygen::objDBFileName);
}
+ killpg(0,SIGINT);
exit(1);
}
#endif
diff --git a/src/doxygen.css b/src/doxygen.css
index ec994dd..de6fd81 100644
--- a/src/doxygen.css
+++ b/src/doxygen.css
@@ -1,4 +1,4 @@
-/* The standard CSS for doxygen */
+/* The standard CSS for doxygen $doxygenversion */
body, table, div, p, dl {
font: 400 14px/19px Roboto,sans-serif;
@@ -791,6 +791,14 @@ table.fieldtable {
width: 100%;
}
+.fieldtable td.fielddoc p:first-child {
+ margin-top: 2px;
+}
+
+.fieldtable td.fielddoc p:last-child {
+ margin-bottom: 2px;
+}
+
.fieldtable tr:last-child td {
border-bottom: none;
}
diff --git a/src/doxygen_css.h b/src/doxygen_css.h
index cb8d69f..64a9f25 100644
--- a/src/doxygen_css.h
+++ b/src/doxygen_css.h
@@ -1,4 +1,4 @@
-"/* The standard CSS for doxygen */\n"
+"/* The standard CSS for doxygen $doxygenversion */\n"
"\n"
"body, table, div, p, dl {\n"
" font: 400 14px/19px Roboto,sans-serif;\n"
@@ -791,6 +791,14 @@
" width: 100%;\n"
"}\n"
"\n"
+".fieldtable td.fielddoc p:first-child {\n"
+" margin-top: 2px;\n"
+"} \n"
+" \n"
+".fieldtable td.fielddoc p:last-child {\n"
+" margin-bottom: 2px;\n"
+"}\n"
+"\n"
".fieldtable tr:last-child td {\n"
" border-bottom: none;\n"
"}\n"
diff --git a/src/dynsections.js b/src/dynsections.js
index 116542f..ed092c7 100644
--- a/src/dynsections.js
+++ b/src/dynsections.js
@@ -44,24 +44,43 @@ function toggleLevel(level)
});
updateStripes();
}
-function toggleFolder(id)
+
+function toggleFolder(id)
{
- var n = $('[id^=row_'+id+']');
- var i = $('[id^=img_'+id+']');
- var a = $('[id^=arr_'+id+']');
- var c = n.slice(1);
- if (c.filter(':first').is(':visible')===true) {
- i.attr('src','ftv2folderclosed.png');
- a.attr('src','ftv2pnode.png');
- c.hide();
- } else {
- i.attr('src','ftv2folderopen.png');
- a.attr('src','ftv2mnode.png');
- c.show();
+ //The clicked row
+ var currentRow = $('#row_'+id);
+ var currentRowImages = currentRow.find("img");
+
+ //All rows after the clicked row
+ var rows = currentRow.nextAll("tr");
+
+ //Only match elements AFTER this one (can't hide elements before)
+ var childRows = rows.filter(function() {
+ var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
+ return this.id.match(re);
+ });
+
+ //First row is visible we are HIDING
+ if (childRows.filter(':first').is(':visible')===true) {
+ currentRowImages.filter("[id^=arr]").attr('src', 'ftv2pnode.png');
+ currentRowImages.filter("[id^=img]").attr('src', 'ftv2folderclosed.png');
+ rows.filter("[id^=row_"+id+"]").hide();
+ } else { //We are SHOWING
+ //All sub images
+ var childImages = childRows.find("img");
+ var childImg = childImages.filter("[id^=img]");
+ var childArr = childImages.filter("[id^=arr]");
+
+ currentRow.find("[id^=arr]").attr('src', 'ftv2mnode.png'); //open row
+ currentRow.find("[id^=img]").attr('src', 'ftv2folderopen.png'); //open row
+ childImg.attr('src','ftv2folderclosed.png'); //children closed
+ childArr.attr('src','ftv2pnode.png'); //children closed
+ childRows.show(); //show all children
}
updateStripes();
}
+
function toggleInherit(id)
{
var rows = $('tr.inherit.'+id);
diff --git a/src/dynsections_js.h b/src/dynsections_js.h
index c2f5767..c2fba04 100644
--- a/src/dynsections_js.h
+++ b/src/dynsections_js.h
@@ -44,24 +44,43 @@
" });\n"
" updateStripes();\n"
"}\n"
-"function toggleFolder(id) \n"
+"\n"
+"function toggleFolder(id)\n"
"{\n"
-" var n = $('[id^=row_'+id+']');\n"
-" var i = $('[id^=img_'+id+']');\n"
-" var a = $('[id^=arr_'+id+']');\n"
-" var c = n.slice(1);\n"
-" if (c.filter(':first').is(':visible')===true) {\n"
-" i.attr('src','ftv2folderclosed.png');\n"
-" a.attr('src','ftv2pnode.png');\n"
-" c.hide();\n"
-" } else {\n"
-" i.attr('src','ftv2folderopen.png');\n"
-" a.attr('src','ftv2mnode.png');\n"
-" c.show();\n"
+" //The clicked row\n"
+" var currentRow = $('#row_'+id);\n"
+" var currentRowImages = currentRow.find(\"img\");\n"
+"\n"
+" //All rows after the clicked row\n"
+" var rows = currentRow.nextAll(\"tr\");\n"
+"\n"
+" //Only match elements AFTER this one (can't hide elements before)\n"
+" var childRows = rows.filter(function() {\n"
+" var re = new RegExp('^row_'+id+'\\\\d+_$', \"i\"); //only one sub\n"
+" return this.id.match(re);\n"
+" });\n"
+"\n"
+" //First row is visible we are HIDING\n"
+" if (childRows.filter(':first').is(':visible')===true) {\n"
+" currentRowImages.filter(\"[id^=arr]\").attr('src', 'ftv2pnode.png');\n"
+" currentRowImages.filter(\"[id^=img]\").attr('src', 'ftv2folderclosed.png');\n"
+" rows.filter(\"[id^=row_\"+id+\"]\").hide();\n"
+" } else { //We are SHOWING\n"
+" //All sub images\n"
+" var childImages = childRows.find(\"img\");\n"
+" var childImg = childImages.filter(\"[id^=img]\");\n"
+" var childArr = childImages.filter(\"[id^=arr]\");\n"
+"\n"
+" currentRow.find(\"[id^=arr]\").attr('src', 'ftv2mnode.png'); //open row\n"
+" currentRow.find(\"[id^=img]\").attr('src', 'ftv2folderopen.png'); //open row\n"
+" childImg.attr('src','ftv2folderclosed.png'); //children closed\n"
+" childArr.attr('src','ftv2pnode.png'); //children closed\n"
+" childRows.show(); //show all children\n"
" }\n"
" updateStripes();\n"
"}\n"
"\n"
+"\n"
"function toggleInherit(id)\n"
"{\n"
" var rows = $('tr.inherit.'+id);\n"
diff --git a/src/eclipsehelp.cpp b/src/eclipsehelp.cpp
index 71db4ab..7a4052d 100644
--- a/src/eclipsehelp.cpp
+++ b/src/eclipsehelp.cpp
@@ -189,6 +189,7 @@ void EclipseHelp::addContentsItem(
void EclipseHelp::addIndexItem(
Definition * /* context */,
MemberDef * /* md */,
+ const char * /* sectionAnchor */,
const char * /* title */)
{
}
diff --git a/src/eclipsehelp.h b/src/eclipsehelp.h
index 2531a9f..489aa98 100644
--- a/src/eclipsehelp.h
+++ b/src/eclipsehelp.h
@@ -52,7 +52,8 @@ class EclipseHelp : public IndexIntf
virtual void addContentsItem(bool isDir, const char *name, const char *ref,
const char *file, const char *anchor,bool separateIndex,bool addToNavIndex,
Definition *def);
- virtual void addIndexItem(Definition *context,MemberDef *md,const char *title);
+ virtual void addIndexItem(Definition *context,MemberDef *md,
+ const char *sectionAnchor,const char *title);
virtual void addIndexFile(const char *name);
virtual void addImageFile(const char *name);
virtual void addStyleSheetFile(const char *name);
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 41d564d..a2040ca 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -807,7 +807,7 @@ void FileDef::writeSource(OutputList &ol)
{
startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible,
!generateTreeView,
- !isDocFile && genSourceFile ? 0 : getOutputFileBase());
+ !isDocFile && genSourceFile ? QCString() : getOutputFileBase());
if (!generateTreeView)
{
getDirDef()->writeNavigationPath(ol);
@@ -820,7 +820,7 @@ void FileDef::writeSource(OutputList &ol)
else
{
startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible,FALSE,
- !isDocFile && genSourceFile ? 0 : getOutputFileBase());
+ !isDocFile && genSourceFile ? QCString() : getOutputFileBase());
startTitle(ol,getSourceFileBase());
ol.parseText(title);
endTitle(ol,getSourceFileBase(),0);
@@ -1173,13 +1173,15 @@ bool FileDef::isIncluded(const QCString &name) const
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() &&
- (Config_getBool("SOURCE_BROWSER") ||
- (Config_getBool("VERBATIM_HEADERS") && guessSection(name())==Entry::HEADER_SEC)
+ (sourceBrowser ||
+ (verbatimHeaders && guessSection(name())==Entry::HEADER_SEC)
) &&
extension!=".doc" && extension!=".txt" && extension!=".dox" &&
- extension!=".md" && extension!=".markdown";
+ extension!=".md" && name().right(9)!=".markdown";
}
@@ -1526,7 +1528,7 @@ void FileDef::acquireFileVersion()
}
const int bufSize=1024;
char buf[bufSize];
- int numRead = fread(buf,1,bufSize,f);
+ int numRead = (int)fread(buf,1,bufSize,f);
portable_pclose(f);
if (numRead>0 && !(fileVersion=QCString(buf,numRead).stripWhiteSpace()).isEmpty())
{
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index e214217..938d182 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -220,7 +220,7 @@ static void newLine();
//-----------------------------------------------------------------------------
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
-#define YY_USER_ACTION yyColNr+=yyleng;
+#define YY_USER_ACTION yyColNr+=(int)yyleng;
//-----------------------------------------------------------------------------
%}
@@ -312,8 +312,8 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
//fprintf(stderr, "---%s", yytext);
- int indexStart = getAmpersandAtTheStart(yytext, yyleng);
- int indexEnd = getAmpOrExclAtTheEnd(yytext, yyleng);
+ int indexStart = getAmpersandAtTheStart(yytext, (int)yyleng);
+ int indexEnd = getAmpOrExclAtTheEnd(yytext, (int)yyleng);
if (indexEnd>=0 && yytext[indexEnd]!='&') //we are only interested in amp
indexEnd=-1;
@@ -362,7 +362,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
initializer+=yytext;
}
<String>\"|\' { // string ends with next quote without previous backspace
- if (yytext[0]!=stringStartSymbol) { yyColNr -= yyleng; REJECT; } // single vs double quote
+ if (yytext[0]!=stringStartSymbol) { yyColNr -= (int)yyleng; REJECT; } // single vs double quote
if (yy_top_state() == Initialization
|| yy_top_state() == ArrayInitializer)
initializer+=yytext;
@@ -373,7 +373,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
initializer+=yytext;
}
<*>\"|\' { /* string starts */
- if (YY_START == StrIgnore) { yyColNr -= yyleng; REJECT; }; // ignore in simple comments
+ if (YY_START == StrIgnore) { yyColNr -= (int)yyleng; REJECT; }; // ignore in simple comments
yy_push_state(YY_START);
if (yy_top_state() == Initialization
|| yy_top_state() == ArrayInitializer)
@@ -384,7 +384,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
/*------ ignore simple comment (not documentation comments) */
-<*>"!"/[^<>\n] { if (YY_START == String) { yyColNr -= yyleng; REJECT; } // "!" is ignored in strings
+<*>"!"/[^<>\n] { if (YY_START == String) { yyColNr -= (int)yyleng; REJECT; } // "!" is ignored in strings
// skip comment line (without docu comments "!>" "!<" )
/* ignore further "!" and ignore comments in Strings */
if ((YY_START != StrIgnore) && (YY_START != String))
@@ -709,7 +709,7 @@ private {
}
else
{
- yyColNr -= yyleng;
+ yyColNr -= (int)yyleng;
REJECT;
}
}
@@ -733,10 +733,10 @@ private {
{BS} {}
{ATTR_SPEC}. { /* update current modifierswhen it is an ATTR_SPEC and not a variable name */
/* bug_625519 */
- QChar chr = yytext[yyleng-1];
+ QChar chr = yytext[(int)yyleng-1];
if (chr.isLetter() || chr.isDigit() || (chr == '_'))
{
- yyColNr -= yyleng;
+ yyColNr -= (int)yyleng;
REJECT;
}
else
@@ -744,7 +744,7 @@ private {
QCString tmp = yytext;
tmp = tmp.left(tmp.length() - 1);
yyColNr -= 1;
- unput(yytext[yyleng-1]);
+ unput(yytext[(int)yyleng-1]);
currentModifiers |= (tmp);
}
}
@@ -853,12 +853,12 @@ private {
attr += yytext;
modifiers[current_root][name.lower()] |= attr;
}
-<Variable>{COMMA} { //printf("COMMA: %d<=..<=%d\n", yyColNr-yyleng, yyColNr);
+<Variable>{COMMA} { //printf("COMMA: %d<=..<=%d\n", yyColNr-(int)yyleng, yyColNr);
// locate !< comment
- updateVariablePrepassComment(yyColNr-yyleng, yyColNr);
+ updateVariablePrepassComment(yyColNr-(int)yyleng, yyColNr);
}
<Variable>{BS}"=" { yy_push_state(YY_START);
- initializer="";
+ initializer="=";
initializerScope = initializerArrayScope = 0;
BEGIN(Initialization);
}
@@ -904,7 +904,7 @@ private {
}
<Initialization>{COMMA} { if (initializerScope == 0)
{
- updateVariablePrepassComment(yyColNr-yyleng, yyColNr);
+ updateVariablePrepassComment(yyColNr-(int)yyleng, yyColNr);
yy_pop_state(); // end initialization
if (v_type == V_VARIABLE) last_entry->initializer= initializer;
}
@@ -979,7 +979,7 @@ private {
BEGIN(SubprogBody);
}
<Parameterlist>{COMMA}|{BS} { current->args += yytext;
- CommentInPrepass *c = locatePrepassComment(yyColNr-yyleng, yyColNr);
+ CommentInPrepass *c = locatePrepassComment(yyColNr-(int)yyleng, yyColNr);
if (c!=NULL) {
if(current->argList->count()>0) {
current->argList->at(current->argList->count()-1)->docs = c->str;
@@ -1029,7 +1029,7 @@ private {
else
{
/* handle out of place !< comment as a normal comment */
- if (YY_START == String) { yyColNr -= yyleng; REJECT; } // "!" is ignored in strings
+ if (YY_START == String) { yyColNr -= (int)yyleng; REJECT; } // "!" is ignored in strings
// skip comment line (without docu comments "!>" "!<" )
/* ignore further "!" and ignore comments in Strings */
if ((YY_START != StrIgnore) && (YY_START != String))
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp
index 190f3e5..c41ab07 100644
--- a/src/ftvhelp.cpp
+++ b/src/ftvhelp.cpp
@@ -1296,7 +1296,11 @@ void FTVHelp::generateTreeViewScripts()
if (f.open(IO_WriteOnly))
{
FTextStream t(&f);
- t << replaceColorMarkers(navtree_css);
+ t << substitute(
+ replaceColorMarkers(navtree_css),
+ "$width",
+ QCString().setNum(Config_getInt("TREEVIEW_WIDTH"))+"px"
+ );
}
}
}
diff --git a/src/ftvhelp.h b/src/ftvhelp.h
index d28b506..be60a60 100644
--- a/src/ftvhelp.h
+++ b/src/ftvhelp.h
@@ -53,7 +53,7 @@ class FTVHelp : public IndexIntf
bool separateIndex,
bool addToNavIndex,
Definition *def);
- void addIndexItem(Definition *,MemberDef *,const char *) {}
+ void addIndexItem(Definition *,MemberDef *,const char *,const char *) {}
void addIndexFile(const char *) {}
void addImageFile(const char *) {}
void addStyleSheetFile(const char *) {}
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 4f688f1..da35641 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -948,7 +948,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
}
- Doxygen::indexList.addIndexItem(this,0,title);
+ Doxygen::indexList.addIndexItem(this,0,0,title);
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
diff --git a/src/header.html b/src/header.html
index 78730af..0a0194b 100644
--- a/src/header.html
+++ b/src/header.html
@@ -3,6 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen $doxygenversion"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
diff --git a/src/header_html.h b/src/header_html.h
index b8a5d81..505960a 100644
--- a/src/header_html.h
+++ b/src/header_html.h
@@ -3,6 +3,7 @@
"<head>\n"
"<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n"
"<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n"
+"<meta name=\"generator\" content=\"Doxygen $doxygenversion\"/>\n"
"<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->\n"
"<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->\n"
"<link href=\"$relpath$tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 9ef5f5b..63cda59 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -29,7 +29,7 @@
#include "parserintf.h"
#include "msc.h"
#include "util.h"
-
+#include "vhdldocgen.h"
static const int NUM_HTML_LIST_TYPES = 4;
static const char types[][NUM_HTML_LIST_TYPES] = {"1", "a", "i", "A"};
@@ -476,13 +476,38 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
break;
case DocVerbatim::Msc:
{
+ forceEndParagraph(s);
+
+#if 0 // TODO: this should get its own command and not hijack the \msc
+ // command. This should also work for Latex and RTF output (or at
+ // least produce valid output there.
+ static bool optimizeForVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ if (optimizeForVhdl)
+ {
+ if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator
+ {
+ QCString fname=FlowNode::convertNameToFileName();
+ m_t << "<div align=\"left\">" << endl;
+ m_t << "<p>";
+ m_t << "flowchart:" ;
+ m_t << "<a href=\"";
+ m_t << fname.data();
+ m_t << ".svg\">";
+ m_t << VhdlDocGen::getFlowMember()->name().data();
+ m_t << "</a><br><br>";
+ m_t << s->text().data();
+ m_t << "</p>";
+ VhdlDocGen::setFlowMember(NULL);
+ }
+ }
+#endif
static int mscindex = 1;
QCString baseName(4096);
baseName.sprintf("%s%d",
(Config_getString("HTML_OUTPUT")+"/inline_mscgraph_").data(),
mscindex++
- );
+ );
QFile file(baseName+".msc");
if (!file.open(IO_WriteOnly))
{
@@ -491,17 +516,16 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
QCString text = "msc {";
text+=s->text();
text+="}";
+
file.writeBlock( text, text.length() );
file.close();
- forceEndParagraph(s);
m_t << "<div align=\"center\">" << endl;
writeMscFile(baseName+".msc",s->relPath(),s->context());
- m_t << "</div>" << endl;
- forceStartParagraph(s);
-
if (Config_getBool("DOT_CLEANUP")) file.remove();
}
+ m_t << "</div>" << endl;
+ forceStartParagraph(s);
break;
}
}
@@ -702,7 +726,7 @@ void HtmlDocVisitor::visit(DocIndexEntry *e)
// e->scope() ? e->scope()->name().data() : "<null>",
// e->member() ? e->member()->name().data() : "<null>"
// );
- Doxygen::indexList.addIndexItem(e->scope(),e->member(),e->entry());
+ Doxygen::indexList.addIndexItem(e->scope(),e->member(),anchor,e->entry());
}
void HtmlDocVisitor::visit(DocSimpleSectSep *)
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 93e5f3c..1c612ac 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -117,10 +117,10 @@ static unsigned char tab_a_png[36] =
// normal tab background luma
static unsigned char tab_b_png[36] =
{
- 221, 231, 238, 236, 233, 230, 228, 225, 224,
- 221, 220, 218, 217, 216, 215, 214, 213, 212,
- 212, 194, 195, 196, 197, 198, 199, 200, 201,
- 202, 204, 206, 208, 210, 214, 216, 203, 185
+ 218, 228, 235, 233, 230, 227, 225, 222, 221,
+ 218, 217, 215, 214, 213, 212, 211, 210, 209,
+ 209, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 207, 209, 211, 213, 217, 219, 206, 188
};
// hovering tab background luma
@@ -907,7 +907,7 @@ QCString substitute(const char *s,const char *src,const char *dst)
{
int count;
for (count=0, p=s; (q=strstr(p,src))!=0; p=q+srcLen) count++;
- resLen = p-s+strlen(p)+count*(dstLen-srcLen);
+ resLen = (int)(p-s)+strlen(p)+count*(dstLen-srcLen);
}
else // result has same size as s
{
@@ -939,7 +939,7 @@ QCString clearBlock(const char *s,const char *begin,const char *end)
int resLen = 0;
for (p=s; (q=strstr(p,begin))!=0; p=q+endLen)
{
- resLen+=q-p;
+ resLen+=(int)(q-p);
p=q+beginLen;
if ((q=strstr(p,end))==0)
{
@@ -1500,6 +1500,7 @@ void HtmlGenerator::writeSearchData(const char *dir)
{
FTextStream t(&f);
QCString searchCss = replaceColorMarkers(search_styleSheet);
+ searchCss = substitute(searchCss,"$doxygenversion",versionString);
if (Config_getBool("DISABLE_INDEX"))
{
// move up the search box if there are no tabs
@@ -1513,29 +1514,21 @@ void HtmlGenerator::writeSearchData(const char *dir)
void HtmlGenerator::writeStyleSheetFile(QFile &file)
{
FTextStream t(&file);
- t << replaceColorMarkers(defaultStyleSheet);
+ t << replaceColorMarkers(substitute(defaultStyleSheet,"$doxygenversion",versionString));
}
void HtmlGenerator::writeHeaderFile(QFile &file, const char * /*cssname*/)
{
FTextStream t(&file);
+ t << "<!-- HTML header for doxygen " << versionString << "-->" << endl;
QCString contents(defaultHtmlHeader);
t << contents;
-
-// QString relPathStr = "$relpath$";
-
-// QCString id(file.name().utf8());
-// if (id.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension)
-// {
-// id=id.left(id.length()-Doxygen::htmlFileExtension.length());
-// }
-
-// t << substitute(defaultHtmlHeader, "$stylesheet", cssname);
}
void HtmlGenerator::writeFooterFile(QFile &file)
{
FTextStream t(&file);
+ t << "<!-- HTML footer for doxygen " << versionString << "-->" << endl;
QCString contents(defaultHtmlFooter);
t << contents;
}
@@ -1675,7 +1668,7 @@ void HtmlGenerator::writeStyleInfo(int part)
//t << "H1 { text-align: center; border-width: thin none thin none;" << endl;
//t << " border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }" << endl;
- t << replaceColorMarkers(defaultStyleSheet);
+ t << replaceColorMarkers(substitute(defaultStyleSheet,"$doxygenversion",versionString));
endPlainFile();
Doxygen::indexList.addStyleSheetFile("doxygen.css");
}
diff --git a/src/htmlgen.h b/src/htmlgen.h
index a28aa8b..b520c9e 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -262,16 +262,21 @@ class HtmlGenerator : public OutputGenerator
void endContents();
void writeNonBreakableSpace(int);
- void startDescTable()
- { t << "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">" << endl; }
+ void startDescTable(const char *title)
+ //{ t << "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">" << endl; }
+ { t << "<table class=\"fieldtable\">" << endl
+ << "<tr><th colspan=\"2\">" << title << "</th></tr>";
+ }
void endDescTable()
{ t << "</table>" << endl; }
void startDescTableTitle()
- { t << "<tr><td valign=\"top\"><em>"; }
+ //{ t << "<tr><td valign=\"top\"><em>"; }
+ { t << "<tr><td class=\"fieldname\"><em>"; }
void endDescTableTitle()
{ t << "</em>&nbsp;</td>"; }
void startDescTableData()
- { t << "<td>" << endl; }
+ //{ t << "<td>" << endl; }
+ { t << "<td class=\"fielddoc\">" << endl; }
void endDescTableData()
{ t << "</td></tr>" << endl; }
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index 744e86f..3df3774 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -621,7 +621,7 @@ QCString HtmlHelp::recode(const QCString &s)
char *oPtr = output.data();
if (!portable_iconv(m_fromUtf8,&iPtr,&iLeft,&oPtr,&oLeft))
{
- oSize -= oLeft;
+ oSize -= (int)oLeft;
output.resize(oSize+1);
output.at(oSize)='\0';
return output;
@@ -692,7 +692,7 @@ void HtmlHelp::addContentsItem(bool isDir,
void HtmlHelp::addIndexItem(Definition *context,MemberDef *md,
- const char *word)
+ const char *sectionAnchor,const char *word)
{
if (md)
{
@@ -712,14 +712,14 @@ void HtmlHelp::addIndexItem(Definition *context,MemberDef *md,
QCString level2 = md->name();
QCString contRef = separateMemberPages ? cfname : cfiname;
QCString memRef = cfname;
- QCString anchor = md->anchor();
+ QCString anchor = sectionAnchor ? QCString(sectionAnchor) : md->anchor();
index->addItem(level1,level2,contRef,anchor,TRUE,FALSE);
index->addItem(level2,level1,memRef,anchor,TRUE,TRUE);
}
else if (context)
{
QCString level1 = word ? QCString(word) : context->name();
- index->addItem(level1,0,context->getOutputFileBase(),0,TRUE,FALSE);
+ index->addItem(level1,0,context->getOutputFileBase(),sectionAnchor,TRUE,FALSE);
}
}
diff --git a/src/htmlhelp.h b/src/htmlhelp.h
index 524f8f1..8c0d317 100644
--- a/src/htmlhelp.h
+++ b/src/htmlhelp.h
@@ -79,7 +79,8 @@ class HtmlHelp : public IndexIntf
bool separateIndex,
bool addToNavIndex,
Definition *def);
- void addIndexItem(Definition *context,MemberDef *md,const char *title);
+ void addIndexItem(Definition *context,MemberDef *md,
+ const char *sectionAnchor, const char *title);
void addIndexFile(const char *name);
void addImageFile(const char *);
void addStyleSheetFile(const char *) {}
diff --git a/src/index.cpp b/src/index.cpp
index 0e5294f..6424e44 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -1442,12 +1442,13 @@ static void writeNamespaceTree(NamespaceSDict *nsDict,FTVHelp *ftv,
{
bool hasChildren = containsVisibleChild(nd,showClasses);
-
+ bool isLinkable = nd->isLinkableInProject();
+
QCString ref;
QCString file;
- if (nd->isLinkableInProject())
+ if (isLinkable)
{
- ref = nd->getReference();
+ ref = nd->getReference();
file = nd->getOutputFileBase();
if (nd->getLanguage()==SrcLangExt_VHDL) // UGLY HACK
{
@@ -1455,7 +1456,7 @@ static void writeNamespaceTree(NamespaceSDict *nsDict,FTVHelp *ftv,
}
}
- if (nd->isLinkable() || hasChildren)
+ if (isLinkable || hasChildren)
{
ftv->addContentsItem(hasChildren,nd->localName(),ref,file,0,FALSE,TRUE,nd);
@@ -3970,7 +3971,7 @@ static void writeIndex(OutputList &ol)
{
Doxygen::indexList.addContentsItem(Doxygen::mainPage->hasSubPages(),title,0,indexName,0,Doxygen::mainPage->hasSubPages(),TRUE);
}
- if (Doxygen::mainPage->hasSubPages())
+ if (Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections())
{
writePages(Doxygen::mainPage,0);
}
diff --git a/src/index.h b/src/index.h
index 8eb93ce..122a9bb 100644
--- a/src/index.h
+++ b/src/index.h
@@ -39,7 +39,8 @@ class IndexIntf
virtual void addContentsItem(bool isDir, const char *name, const char *ref,
const char *file, const char *anchor, bool separateIndex,
bool addToNavIndex,Definition *def) = 0;
- virtual void addIndexItem(Definition *context,MemberDef *md,const char *title) = 0;
+ virtual void addIndexItem(Definition *context,MemberDef *md,
+ const char *sectionAnchor,const char *title) = 0;
virtual void addIndexFile(const char *name) = 0;
virtual void addImageFile(const char *name) = 0;
virtual void addStyleSheetFile(const char *name) = 0;
@@ -139,9 +140,9 @@ class IndexList : public IndexIntf
Definition *def=0)
{ if (m_enabled) foreach<bool,const char *,const char *,const char *,const char*,bool,bool,Definition *>
(&IndexIntf::addContentsItem,isDir,name,ref,file,anchor,separateIndex,addToNavIndex,def); }
- void addIndexItem(Definition *context,MemberDef *md,const char *title=0)
- { if (m_enabled) foreach<Definition *,MemberDef *>
- (&IndexIntf::addIndexItem,context,md,title); }
+ void addIndexItem(Definition *context,MemberDef *md,const char *sectionAnchor=0,const char *title=0)
+ { if (m_enabled) foreach<Definition *,MemberDef *,const char *,const char *>
+ (&IndexIntf::addIndexItem,context,md,sectionAnchor,title); }
void addIndexFile(const char *name)
{ if (m_enabled) foreach<const char *>(&IndexIntf::addIndexFile,name); }
void addImageFile(const char *name)
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index a0188c8..d57764e 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -954,6 +954,7 @@ static void writeDefaultFooter(FTextStream &t)
void LatexGenerator::writeHeaderFile(QFile &f)
{
FTextStream t(&f);
+ t << "% Latex header for doxygen " << versionString << endl;
writeDefaultHeaderPart1(t);
t << "Your title here";
writeDefaultHeaderPart2(t);
@@ -964,12 +965,14 @@ void LatexGenerator::writeHeaderFile(QFile &f)
void LatexGenerator::writeFooterFile(QFile &f)
{
FTextStream t(&f);
+ t << "% Latex footer for doxygen " << versionString << endl;
writeDefaultFooter(t);
}
void LatexGenerator::writeStyleSheetFile(QFile &f)
{
FTextStream t(&f);
+ t << "% stylesheet for doxygen " << versionString << endl;
writeDefaultStyleSheetPart1(t);
QCString &projectName = Config_getString("PROJECT_NAME");
diff --git a/src/latexgen.h b/src/latexgen.h
index f2cc193..1fe92dd 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -198,10 +198,15 @@ class LatexGenerator : public OutputGenerator
void endContents() {}
void writeNonBreakableSpace(int);
- void startDescTable()
- { t << "\\begin{description}" << endl; }
+ void startDescTable(const char *title)
+ { startSimpleSect(EnumValues,0,0,title);
+ startDescForItem();
+ t << "\\begin{description}" << endl; }
void endDescTable()
- { t << "\\end{description}" << endl; }
+ { t << "\\end{description}" << endl;
+ endDescForItem();
+ endSimpleSect();
+ }
void startDescTableTitle()
{ t << "\\item[{\\em " << endl; }
void endDescTableTitle()
diff --git a/src/layout.cpp b/src/layout.cpp
index fa4ab42..adfb4e8 100644
--- a/src/layout.cpp
+++ b/src/layout.cpp
@@ -22,6 +22,7 @@
#include "vhdldocgen.h"
#include "util.h"
#include "doxygen.h"
+#include "version.h"
#include <assert.h>
#include <qxml.h>
@@ -1372,7 +1373,7 @@ void writeDefaultLayoutFile(const char *fileName)
return;
}
QTextStream t(&f);
- t << layout_default;
+ t << substitute(layout_default,"$doxygenversion",versionString);
}
//----------------------------------------------------------------------------------
diff --git a/src/layout_default.h b/src/layout_default.h
index 0950a94..d2dfce6 100644
--- a/src/layout_default.h
+++ b/src/layout_default.h
@@ -1,4 +1,5 @@
"<doxygenlayout version=\"1.0\">\n"
+" <!-- Generated by doxygen $doxygenversion -->\n"
" <!-- Navigation index tabs for HTML output -->\n"
" <navindex>\n"
" <tab type=\"mainpage\" visible=\"yes\" title=\"\"/>\n"
diff --git a/src/layout_default.xml b/src/layout_default.xml
index 7127664..b0bbec4 100644
--- a/src/layout_default.xml
+++ b/src/layout_default.xml
@@ -1,4 +1,5 @@
<doxygenlayout version="1.0">
+ <!-- Generated by doxygen $doxygenversion -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
diff --git a/src/lodepng.cpp b/src/lodepng.cpp
index 638dbf4..df8378e 100644
--- a/src/lodepng.cpp
+++ b/src/lodepng.cpp
@@ -1765,13 +1765,13 @@ static unsigned Crc32_crc_table[256];
/*Make the table for a fast CRC.*/
static void Crc32_make_crc_table(void)
{
- unsigned c, k, n;
+ unsigned int c, k, n;
for(n = 0; n < 256; n++)
{
c = n;
for(k = 0; k < 8; k++)
{
- if(c & 1) c = 0xedb88320L ^ (c >> 1);
+ if(c & 1) c = (unsigned int)(0xedb88320L ^ (c >> 1));
else c = c >> 1;
}
Crc32_crc_table[n] = c;
@@ -1782,9 +1782,9 @@ static void Crc32_make_crc_table(void)
/*Update a running CRC with the bytes buf[0..len-1]--the CRC should be
initialized to all 1's, and the transmitted value is the 1's complement of the
final running CRC (see the crc() routine below).*/
-static unsigned Crc32_update_crc(const unsigned char* buf, unsigned crc, size_t len)
+static unsigned Crc32_update_crc(const unsigned char* buf, unsigned int crc, size_t len)
{
- unsigned c = crc;
+ unsigned int c = crc;
size_t n;
if(!Crc32_crc_table_computed) Crc32_make_crc_table();
@@ -1798,7 +1798,7 @@ static unsigned Crc32_update_crc(const unsigned char* buf, unsigned crc, size_t
/*Return the CRC of the bytes buf[0..len-1].*/
static unsigned Crc32_crc(const unsigned char* buf, size_t len)
{
- return Crc32_update_crc(buf, 0xffffffffL, len) ^ 0xffffffffL;
+ return Crc32_update_crc(buf, 0xffffffffu, len) ^ 0xffffffffu;
}
/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/src/mangen.h b/src/mangen.h
index e2d0965..a4af56c 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -195,8 +195,9 @@ class ManGenerator : public OutputGenerator
void endContents() {}
void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) t << " "; }
- void startDescTable() {}
- void endDescTable() {}
+ void startDescTable(const char *t)
+ { startSimpleSect(EnumValues,0,0,t); startDescForItem(); }
+ void endDescTable() { endDescForItem(); endSimpleSect(); }
void startDescTableTitle() { startItemListItem(); startBold(); startEmphasis(); endItemListItem(); }
void endDescTableTitle() { endEmphasis(); endBold(); }
void startDescTableData() { t << endl; firstCol=TRUE; }
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index f9cae59..fe55168 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -499,6 +499,8 @@ class MemberDefImpl
// FALSE => block is put before declaration.
ClassDef *category;
MemberDef *categoryRelation;
+
+ bool tagDataWritten;
};
MemberDefImpl::MemberDefImpl() :
@@ -627,6 +629,7 @@ void MemberDefImpl::init(Definition *def,
hasDocumentedReturnType = FALSE;
docProvider = 0;
isDMember = def->getDefFileName().right(2).lower()==".d";
+ tagDataWritten = FALSE;
}
@@ -1336,7 +1339,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
bool inGroup,ClassDef *inheritedFrom,const char *inheritId
)
{
- //printf("%s MemberDef::writeDeclaration() inGroup=%d\n",name().data(),inGroup);
+ //printf("%s MemberDef::writeDeclaration() inGroup=%d\n",qualifiedName().data(),inGroup);
// hide enum value, since they appear already as part of the enum, unless they
// are explicitly grouped.
@@ -1350,60 +1353,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
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;
- // write tag file information of this member
- if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !isReference())
- {
- Doxygen::tagFile << " <member kind=\"";
- switch (m_impl->mtype)
- {
- case Define: Doxygen::tagFile << "define"; break;
- case EnumValue: Doxygen::tagFile << "enumvalue"; break;
- case Property: Doxygen::tagFile << "property"; break;
- case Event: Doxygen::tagFile << "event"; break;
- case Variable: Doxygen::tagFile << "variable"; break;
- case Typedef: Doxygen::tagFile << "typedef"; break;
- case Enumeration: Doxygen::tagFile << "enumeration"; break;
- case Function: Doxygen::tagFile << "function"; break;
- case Signal: Doxygen::tagFile << "signal"; break;
- //case Prototype: Doxygen::tagFile << "prototype"; break;
- case Friend: Doxygen::tagFile << "friend"; break;
- case DCOP: Doxygen::tagFile << "dcop"; break;
- case Slot: Doxygen::tagFile << "slot"; break;
- }
- if (m_impl->prot!=Public)
- {
- Doxygen::tagFile << "\" protection=\"";
- if (m_impl->prot==Protected) Doxygen::tagFile << "protected";
- else if (m_impl->prot==Package) Doxygen::tagFile << "package";
- else /* Private */ Doxygen::tagFile << "private";
- }
- if (m_impl->virt!=Normal)
- {
- Doxygen::tagFile << "\" virtualness=\"";
- if (m_impl->virt==Virtual) Doxygen::tagFile << "virtual";
- else /* Pure */ Doxygen::tagFile << "pure";
- }
- if (isStatic())
- {
- Doxygen::tagFile << "\" static=\"yes";
- }
- Doxygen::tagFile << "\">" << endl;
- Doxygen::tagFile << " <type>" << convertToXML(typeString()) << "</type>" << endl;
- Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
- Doxygen::tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
- Doxygen::tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
- Doxygen::tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
- writeDocAnchorsToTagFile();
- Doxygen::tagFile << " </member>" << endl;
- }
-
- // write search index info
- if (Doxygen::searchIndex && isLinkableInProject())
- {
- Doxygen::searchIndex->setCurrentDoc(this,anchor(),FALSE);
- Doxygen::searchIndex->addWord(localName(),TRUE);
- Doxygen::searchIndex->addWord(qualifiedName(),FALSE);
- }
+ _writeTagData();
QCString cname = d->name();
QCString cdname = d->displayName();
@@ -2262,9 +2212,9 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container,
{
if (first)
{
- ol.startSimpleSect(BaseOutputDocInterface::EnumValues,0,0,theTranslator->trEnumerationValues()+": ");
- ol.startDescForItem();
- ol.startDescTable();
+ //ol.startSimpleSect(BaseOutputDocInterface::EnumValues,0,0,theTranslator->trEnumerationValues()+": ");
+ //ol.startDescForItem();
+ ol.startDescTable(theTranslator->trEnumerationValues());
}
ol.addIndexItem(fmd->name(),ciname);
@@ -2294,9 +2244,14 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container,
//ol.newParagraph();
ol.startDescTableData();
- if (!fmd->briefDescription().isEmpty())
+ bool hasBrief = !fmd->briefDescription().isEmpty();
+ bool hasDetails = !fmd->documentation().isEmpty();
+
+ if (hasBrief)
{
- ol.parseDoc(fmd->briefFile(),fmd->briefLine(),getOuterScope()?getOuterScope():container,fmd,fmd->briefDescription(),TRUE,FALSE);
+ ol.parseDoc(fmd->briefFile(),fmd->briefLine(),
+ getOuterScope()?getOuterScope():container,
+ fmd,fmd->briefDescription(),TRUE,FALSE);
}
// FIXME:PARA
//if (!fmd->briefDescription().isEmpty() &&
@@ -2304,9 +2259,11 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container,
//{
// ol.newParagraph();
//}
- if (!fmd->documentation().isEmpty())
+ if (hasDetails)
{
- ol.parseDoc(fmd->docFile(),fmd->docLine(),getOuterScope()?getOuterScope():container,fmd,fmd->documentation()+"\n",TRUE,FALSE);
+ ol.parseDoc(fmd->docFile(),fmd->docLine(),
+ getOuterScope()?getOuterScope():container,
+ fmd,fmd->documentation()+"\n",TRUE,FALSE);
}
ol.endDescTableData();
}
@@ -2317,9 +2274,9 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container,
{
//ol.endItemList();
ol.endDescTable();
- ol.endDescForItem();
- ol.endSimpleSect();
- ol.writeChar('\n');
+ //ol.endDescForItem();
+ //ol.endSimpleSect();
+ //ol.writeChar('\n');
}
}
}
@@ -2430,7 +2387,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.left(i));
vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.right(ldef.length()-i-l));
-
+
found=TRUE;
}
}
@@ -3376,6 +3333,81 @@ Specifier MemberDef::virtualness(int count) const
return v;
}
+void MemberDef::_writeTagData()
+{
+ if (m_impl->tagDataWritten) return;
+ static bool generateTagFile = !Config_getString("GENERATE_TAGFILE").isEmpty();
+ // write tag file information of this member
+ if (generateTagFile && isLinkableInProject())
+ {
+ Doxygen::tagFile << " <member kind=\"";
+ switch (m_impl->mtype)
+ {
+ case Define: Doxygen::tagFile << "define"; break;
+ case EnumValue: Doxygen::tagFile << "enumvalue"; break;
+ case Property: Doxygen::tagFile << "property"; break;
+ case Event: Doxygen::tagFile << "event"; break;
+ case Variable: Doxygen::tagFile << "variable"; break;
+ case Typedef: Doxygen::tagFile << "typedef"; break;
+ case Enumeration: Doxygen::tagFile << "enumeration"; break;
+ case Function: Doxygen::tagFile << "function"; break;
+ case Signal: Doxygen::tagFile << "signal"; break;
+ case Friend: Doxygen::tagFile << "friend"; break;
+ case DCOP: Doxygen::tagFile << "dcop"; break;
+ case Slot: Doxygen::tagFile << "slot"; break;
+ }
+ if (m_impl->prot!=Public)
+ {
+ Doxygen::tagFile << "\" protection=\"";
+ if (m_impl->prot==Protected) Doxygen::tagFile << "protected";
+ else if (m_impl->prot==Package) Doxygen::tagFile << "package";
+ else /* Private */ Doxygen::tagFile << "private";
+ }
+ if (m_impl->virt!=Normal)
+ {
+ Doxygen::tagFile << "\" virtualness=\"";
+ if (m_impl->virt==Virtual) Doxygen::tagFile << "virtual";
+ else /* Pure */ Doxygen::tagFile << "pure";
+ }
+ if (isStatic())
+ {
+ Doxygen::tagFile << "\" static=\"yes";
+ }
+ Doxygen::tagFile << "\">" << endl;
+ Doxygen::tagFile << " <type>" << convertToXML(typeString()) << "</type>" << endl;
+ Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
+ Doxygen::tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
+ Doxygen::tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
+ Doxygen::tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
+ writeDocAnchorsToTagFile();
+ Doxygen::tagFile << " </member>" << endl;
+ _addToSearchIndex();
+ }
+ MemberList *fmdl=m_impl->enumFields;
+ if (fmdl)
+ {
+ MemberListIterator mli(*fmdl);
+ MemberDef *fmd;
+ for (mli.toFirst();(fmd=mli.current());++mli)
+ {
+ if (!fmd->isReference())
+ {
+ if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ {
+ Doxygen::tagFile << " <member kind=\"enumvalue\">" << endl;
+ Doxygen::tagFile << " <name>" << convertToXML(fmd->name()) << "</name>" << endl;
+ Doxygen::tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
+ Doxygen::tagFile << " <anchor>" << convertToXML(fmd->anchor()) << "</anchor>" << endl;
+ Doxygen::tagFile << " <arglist>" << convertToXML(fmd->argsString()) << "</arglist>" << endl;
+ Doxygen::tagFile << " </member>" << endl;
+ fmd->_addToSearchIndex();
+ }
+ }
+ }
+ }
+ m_impl->tagDataWritten=TRUE;
+}
+
void MemberDef::_computeIsConstructor()
{
KEEP_RESIDENT_DURING_CALL;
@@ -3503,15 +3535,7 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
{
if (isLinkableInProject() || hasDocumentedEnumValues())
{
- if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !isReference())
- {
- Doxygen::tagFile << " <member kind=\"enumeration\">" << endl;
- Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
- Doxygen::tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
- Doxygen::tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
- Doxygen::tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
- Doxygen::tagFile << " </member>" << endl;
- }
+ _writeTagData();
writeLink(typeDecl,cd,nd,fd,gd);
}
else
@@ -3558,15 +3582,7 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
if (fmd->hasDocumentation()) // enum value has docs
{
- if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !fmd->isReference())
- {
- Doxygen::tagFile << " <member kind=\"enumvalue\">" << endl;
- Doxygen::tagFile << " <name>" << convertToXML(fmd->name()) << "</name>" << endl;
- Doxygen::tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
- Doxygen::tagFile << " <anchor>" << convertToXML(fmd->anchor()) << "</anchor>" << endl;
- Doxygen::tagFile << " <arglist>" << convertToXML(fmd->argsString()) << "</arglist>" << endl;
- Doxygen::tagFile << " </member>" << endl;
- }
+ fmd->_writeTagData();
fmd->writeLink(typeDecl,cd,nd,fd,gd);
}
else // no docs for this enum value
@@ -4759,6 +4775,7 @@ void MemberDef::flushToDisk() const
marshalBool (Doxygen::symbolStorage,m_impl->docsForDefinition);
marshalObjPointer (Doxygen::symbolStorage,m_impl->category);
marshalObjPointer (Doxygen::symbolStorage,m_impl->categoryRelation);
+ marshalBool (Doxygen::symbolStorage,m_impl->tagDataWritten);
marshalUInt(Doxygen::symbolStorage,END_MARKER);
// function doesn't modify the object conceptually but compiler doesn't know this.
@@ -4862,6 +4879,7 @@ void MemberDef::loadFromDisk() const
m_impl->docsForDefinition = unmarshalBool (Doxygen::symbolStorage);
m_impl->category = (ClassDef*)unmarshalObjPointer (Doxygen::symbolStorage);
m_impl->categoryRelation = (MemberDef*)unmarshalObjPointer (Doxygen::symbolStorage);
+ m_impl->tagDataWritten = unmarshalBool (Doxygen::symbolStorage);
marker = unmarshalUInt(Doxygen::symbolStorage);
assert(marker==END_MARKER);
@@ -4956,6 +4974,23 @@ QCString MemberDef::displayName(bool) const
return Definition::name();
}
+void MemberDef::_addToSearchIndex()
+{
+ // write search index info
+ if (Doxygen::searchIndex && isLinkableInProject())
+ {
+ Doxygen::searchIndex->setCurrentDoc(this,anchor(),FALSE);
+ QCString ln=localName(),qn=qualifiedName();
+ Doxygen::searchIndex->addWord(ln,TRUE);
+ if (ln!=qn)
+ {
+ Doxygen::searchIndex->addWord(qn,TRUE);
+ }
+ }
+}
+
+
+
//----------------
static void transferArgumentDocumentation(ArgumentList *decAl,ArgumentList *defAl)
diff --git a/src/memberdef.h b/src/memberdef.h
index 8850035..e1db828 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -397,6 +397,8 @@ class MemberDef : public Definition
const QCString &cfname,const QCString &ciname,
const QCString &cname);
void _writeCategoryRelation(OutputList &ol);
+ void _writeTagData();
+ void _addToSearchIndex();
static int s_indentLevel;
// disable copying of member defs
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 2512502..0bb63a7 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -878,7 +878,7 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,bool loca
name = nd->displayName();
}
ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,name);
- if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !nd->isReference())
+ if (!Config_getString("GENERATE_TAGFILE").isEmpty() && nd->isLinkableInProject())
{
Doxygen::tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
}
diff --git a/src/navtree.css b/src/navtree.css
index eb2aa70..a2ae30a 100644
--- a/src/navtree.css
+++ b/src/navtree.css
@@ -86,7 +86,7 @@
display:block;
position: absolute;
left: 0px;
- width: 300px;
+ width: $width;
}
.ui-resizable .ui-resizable-handle {
diff --git a/src/navtree_css.h b/src/navtree_css.h
index 00a889f..6e42061 100644
--- a/src/navtree_css.h
+++ b/src/navtree_css.h
@@ -86,7 +86,7 @@
" display:block;\n"
" position: absolute;\n"
" left: 0px;\n"
-" width: 300px;\n"
+" width: $width;\n"
"}\n"
"\n"
".ui-resizable .ui-resizable-handle {\n"
diff --git a/src/objcache.cpp b/src/objcache.cpp
index a08d649..4258397 100644
--- a/src/objcache.cpp
+++ b/src/objcache.cpp
@@ -184,7 +184,7 @@ unsigned int ObjCache::hash(void *addr)
key ^= (key >> 15);
key += ~(key << 27);
key ^= (key >> 31);
- return key & (m_size-1);
+ return (unsigned int)(key & (m_size-1));
}
else
{
@@ -196,7 +196,7 @@ unsigned int ObjCache::hash(void *addr)
key ^= (key >> 6);
key += ~(key << 11);
key ^= (key >> 16);
- return key & (m_size-1);
+ return (unsigned int)(key & (m_size-1));
}
}
diff --git a/src/outputgen.h b/src/outputgen.h
index e9e1d25..be9c208 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -245,7 +245,7 @@ class BaseOutputDocInterface : public CodeOutputInterface
virtual void addIndexItem(const char *s1,const char *s2) = 0;
virtual void writeNonBreakableSpace(int) = 0;
- virtual void startDescTable() = 0;
+ virtual void startDescTable(const char *title) = 0;
virtual void endDescTable() = 0;
virtual void startDescTableTitle() = 0;
virtual void endDescTableTitle() = 0;
diff --git a/src/outputlist.h b/src/outputlist.h
index 72662a5..784b16b 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -363,8 +363,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endContents); }
void writeNonBreakableSpace(int num)
{ forall(&OutputGenerator::writeNonBreakableSpace,num); }
- void startDescTable()
- { forall(&OutputGenerator::startDescTable); }
+ void startDescTable(const char *title)
+ { forall(&OutputGenerator::startDescTable,title); }
void endDescTable()
{ forall(&OutputGenerator::endDescTable); }
void startDescTableTitle()
diff --git a/src/pagedef.cpp b/src/pagedef.cpp
index 1442ce1..0d98184 100644
--- a/src/pagedef.cpp
+++ b/src/pagedef.cpp
@@ -184,7 +184,7 @@ void PageDef::writeDocumentation(OutputList &ol)
}
}
- Doxygen::indexList.addIndexItem(this,0,filterTitle(title()));
+ Doxygen::indexList.addIndexItem(this,0,0,filterTitle(title()));
}
void PageDef::writePageDocumentation(OutputList &ol)
diff --git a/src/portable.cpp b/src/portable.cpp
index 49f7bf1..bb13ddb 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -198,7 +198,8 @@ void portable_setenv(const char *name,const char *value)
{
for (ep = environ; *ep; ++ep)
{
- if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
+ if (!strncmp (*ep, name, (uint)namelen) &&
+ (*ep)[namelen] == '=')
break;
else
++size;
@@ -281,7 +282,7 @@ void portable_unsetenv(const char *variable)
ep = environ;
while (*ep != NULL)
{
- if (!strncmp(*ep, variable, len) && (*ep)[len]=='=')
+ if (!strncmp(*ep, variable, (uint)len) && (*ep)[len]=='=')
{
/* Found it. Remove this pointer by moving later ones back. */
char **dp = ep;
diff --git a/src/pre.l b/src/pre.l
index 5d00c18..8b8c093 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -51,7 +51,11 @@
#include "entry.h"
#define YY_NEVER_INTERACTIVE 1
-
+enum GuardType
+{
+ Guard_Cond,
+ Guard_CondNot
+};
struct FileState
{
@@ -356,6 +360,7 @@ static bool g_isSource;
static bool g_lexInit = FALSE;
+static GuardType guardType; // kind of guard for conditional section
//DefineDict* getGlobalDefineDict()
//{
// return g_globalDefineDict;
@@ -1651,9 +1656,19 @@ static void readIncludeFile(const QCString &inc)
static void startCondSection(const char *sectId)
{
g_condStack.push(new bool(g_skip));
- if (Config_getList("ENABLED_SECTIONS").find(sectId)==-1)
+ if (guardType == Guard_Cond)
{
- g_skip=TRUE;
+ if (Config_getList("ENABLED_SECTIONS").find(sectId)==-1)
+ {
+ g_skip=TRUE;
+ }
+ }
+ else if (guardType == Guard_CondNot)
+ {
+ if (Config_getList("ENABLED_SECTIONS").find(sectId)!=-1)
+ {
+ g_skip=TRUE;
+ }
}
}
@@ -1779,12 +1794,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<Start>^{B}*"#" { BEGIN(Command); }
<Start>^{B}*/[^#] {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
BEGIN(CopyLine);
}
<Start>^{B}*[_A-Z][_A-Z0-9]*{B}*"("[^\)\n]*")"/{BN}{1,10}*[:{] { // constructors?
int i;
- for (i=yyleng-1;i>=0;i--)
+ for (i=(int)yyleng-1;i>=0;i--)
{
unput(yytext[i]);
}
@@ -1814,7 +1829,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
else // don't skip
{
int i;
- for (i=yyleng-1;i>=0;i--)
+ for (i=(int)yyleng-1;i>=0;i--)
{
unput(yytext[i]);
}
@@ -1824,7 +1839,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<CopyLine>"extern"{BN}{0,80}"\"C\""*{BN}{0,80}"{" {
QCString text=yytext;
g_yyLineNr+=text.contains('\n');
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<CopyLine>"{" { // count brackets inside the main file
if (g_includeStack.isEmpty())
@@ -1841,23 +1856,23 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
outputChar(*yytext);
}
<CopyLine>"'"\\[0-7]{1,3}"'" {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<CopyLine>"'"\\."'" {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<CopyLine>"'"."'" {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<CopyLine>\" {
outputChar(*yytext);
BEGIN( CopyString );
}
<CopyString>[^\"\\\r\n]+ {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<CopyString>\\. {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<CopyString>\" {
outputChar(*yytext);
@@ -1897,7 +1912,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
else
{
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
}
<CopyLine>{ID} {
@@ -1915,7 +1930,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
else
{
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
}
<CopyLine>"\\"\r?/\n { // strip line continuation characters
@@ -2404,7 +2419,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(CopyCComment);
}
<DefineText>"//"[!/]? {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
g_lastCPPContext=YY_START;
g_defLitText+=' ';
BEGIN(SkipCPPComment);
@@ -2424,21 +2439,21 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
}
<SkipCComment>"//"("/")* {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<SkipCComment>"/*" {
outputChar('/');outputChar('*');
//g_commentCount++;
}
<SkipCComment>[\\@][\\@]("f{"|"f$"|"f[") {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
g_yyLineNr+=QCString(yytext).contains('\n');
}
<SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
g_yyLineNr+=QCString(yytext).contains('\n');
if (yytext[1]=='f')
{
@@ -2451,18 +2466,26 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(SkipVerbatim);
}
<SkipCComment,SkipCPPComment>[\\@]"cond"[ \t]+ { // conditional section
+ guardType = Guard_Cond;
g_condCtx = YY_START;
outputArray(yytext,yyleng);
BEGIN(CondLine);
}
+<SkipCComment,SkipCPPComment>[\\@]"condnot"[ \t]+ { // conditional section
+ guardType = Guard_CondNot;
+ g_condCtx = YY_START;
+ outputArray(yytext,(int)yyleng);
+ BEGIN(CondLine);
+ }
<CondLine>[a-z_A-Z][a-z_A-Z0-9.\-]* {
startCondSection(yytext);
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
BEGIN(g_condCtx);
}
<SkipCComment,SkipCPPComment>[\\@]"cond"[ \t\r]*/\n {
+ guardType = Guard_Cond;
g_condCtx = YY_START;
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<CondLine>. {
unput(*yytext);
@@ -2470,11 +2493,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(g_condCtx);
}
<SkipCComment,SkipCPPComment>[\\@]"endcond"/[^a-z_A-Z0-9] {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
endCondSection();
}
<SkipVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}") { /* end of verbatim block */
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
if (yytext[1]=='f' && g_blockName=="f")
{
BEGIN(SkipCComment);
@@ -2485,10 +2508,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
}
<SkipVerbatim>"*/"|"/*" {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<SkipCComment,SkipVerbatim>[^*\\@\x06\n\/]+ {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<SkipCComment,SkipVerbatim>\n {
g_yyLineNr++;
@@ -2528,7 +2551,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<RemoveCComment>\n { g_yyLineNr++; outputChar('\n'); }
<RemoveCComment>.
<SkipCPPComment>[^\n\/\\@]+ {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<SkipCPPComment,RemoveCPPComment>\n {
unput(*yytext);
@@ -2541,7 +2564,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
outputChar('/');outputChar('/');
}
<SkipCPPComment>[^\x06\@\\\n]+ {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
}
<SkipCPPComment>. {
outputChar(*yytext);
@@ -2715,14 +2738,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<*>"/*"/"*/" |
<*>"/*"[*]? {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
g_lastCContext=YY_START;
g_commentCount=1;
if (yyleng==3) g_lastGuardName.resize(0); // reset guard in case the #define is documented!
BEGIN(SkipCComment);
}
<*>"//"[/]? {
- outputArray(yytext,yyleng);
+ outputArray(yytext,(int)yyleng);
g_lastCPPContext=YY_START;
if (yyleng==3) g_lastGuardName.resize(0); // reset guard in case the #define is documented!
BEGIN(SkipCPPComment);
diff --git a/src/pycode.l b/src/pycode.l
index 035aa96..319712e 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -1217,7 +1217,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
// should be improved.
// (translate tabs to space, etc)
codifyLines(yytext);
- adjustScopesAndSuites(yyleng);
+ adjustScopesAndSuites((int)yyleng);
}
"\n"|({BB}"\n") {
diff --git a/src/pyscanner.l b/src/pyscanner.l
index b0486e4..ba19fee 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -787,7 +787,7 @@ STARTDOCSYMS "##"
if (computeIndent(&yytext[1])<=g_indent)
{
int i;
- for (i=yyleng-1;i>=0;i--)
+ for (i=(int)yyleng-1;i>=0;i--)
{
unput(yytext[i]);
}
@@ -805,7 +805,7 @@ STARTDOCSYMS "##"
if (computeIndent(&yytext[1])<=g_indent)
{
int i;
- for (i=yyleng-1;i>=0;i--)
+ for (i=(int)yyleng-1;i>=0;i--)
{
unput(yytext[i]);
}
diff --git a/src/qhp.cpp b/src/qhp.cpp
index 00e870b..e72db55 100644
--- a/src/qhp.cpp
+++ b/src/qhp.cpp
@@ -124,9 +124,10 @@ void Qhp::initialize()
// Add extra root node
QCString fullProjectname = getFullProjectName();
+ QCString indexFile = "index"+Doxygen::htmlFileExtension;
const char * const attributes[] =
{ "title", fullProjectname,
- "ref", QCString("index")+Doxygen::htmlFileExtension,
+ "ref", indexFile,
NULL
};
m_toc.open("section", attributes);
@@ -211,7 +212,7 @@ void Qhp::addContentsItem(bool /*isDir*/, const char * name,
}
void Qhp::addIndexItem(Definition *context,MemberDef *md,
- const char *word)
+ const char *sectionAnchor,const char *word)
{
(void)word;
//printf("addIndexItem(%s %s %s\n",
@@ -235,7 +236,7 @@ void Qhp::addIndexItem(Definition *context,MemberDef *md,
QCString level1 = context->name();
QCString level2 = word ? QCString(word) : md->name();
QCString contRef = separateMemberPages ? cfname : cfiname;
- QCString anchor = md->anchor();
+ QCString anchor = sectionAnchor ? QCString(sectionAnchor) : md->anchor();
QCString ref;
@@ -256,7 +257,7 @@ void Qhp::addIndexItem(Definition *context,MemberDef *md,
// <keyword name="Foo" id="Foo" ref="doc.html"/>
QCString contRef = context->getOutputFileBase();
QCString level1 = word ? QCString(word) : context->name();
- QCString ref = makeFileName(contRef);
+ QCString ref = makeRef(contRef,sectionAnchor);
const char * attributes[] =
{
"name", level1,
diff --git a/src/qhp.h b/src/qhp.h
index 89214cc..806001e 100644
--- a/src/qhp.h
+++ b/src/qhp.h
@@ -35,7 +35,8 @@ class Qhp : public IndexIntf
const char * file, const char * anchor,
bool separateIndex,bool addToNavIndex,
Definition *def);
- void addIndexItem(Definition *context,MemberDef *md,const char *title);
+ void addIndexItem(Definition *context, MemberDef *md,
+ const char *sectionAnchor, const char *title);
void addIndexFile(const char * name);
void addImageFile(const char * name);
void addStyleSheetFile(const char * name);
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index ad99480..7abb929 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -1964,9 +1964,11 @@ void RTFGenerator::endMemberList()
// // not yet implemented
//}
//
-void RTFGenerator::startDescTable()
+void RTFGenerator::startDescTable(const char *title)
{
DBG_RTF(t << "{\\comment (startDescTable) }" << endl)
+ startSimpleSect(EnumValues,0,0,title);
+ startDescForItem();
//t << "{" << endl;
//incrementIndentLevel();
//t << rtf_Style_Reset << rtf_CList_DepthStyle();
@@ -1976,6 +1978,8 @@ void RTFGenerator::endDescTable()
{
//decrementIndentLevel();
DBG_RTF(t << "{\\comment (endDescTable)}" << endl)
+ endDescForItem();
+ endSimpleSect();
//t << "}" << endl;
//t << rtf_Style_Reset << styleStack.top();
}
@@ -2295,7 +2299,7 @@ static void encodeForOutput(FTextStream &t,const QCString &s)
char *outputPtr = enc.data();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
- enc.resize(enc.size()-oLeft);
+ enc.resize(enc.size()-(unsigned int)oLeft);
converted=TRUE;
}
portable_iconv_close(cd);
diff --git a/src/rtfgen.h b/src/rtfgen.h
index 52aa160..92b858f 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -190,7 +190,7 @@ class RTFGenerator : public OutputGenerator
void endContents() {}
void writeNonBreakableSpace(int);
- void startDescTable();
+ void startDescTable(const char *title);
void endDescTable();
void startDescTableTitle();
void endDescTableTitle();
diff --git a/src/scanner.l b/src/scanner.l
index e46c89d..c8dfcaa 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -3554,7 +3554,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* { // the [] part could be improved.
lineCount();
- int i=0,l=yyleng,j;
+ int i=0,l=(int)yyleng,j;
while (i<l && (!isId(yytext[i]))) i++;
msName = QCString(yytext).right(l-i).stripWhiteSpace();
j=msName.find("[");
@@ -4001,7 +4001,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
{
// for defines we interpret a comment
// as documentation for the define
- int i;for (i=yyleng-1;i>=0;i--)
+ int i;for (i=(int)yyleng-1;i>=0;i--)
{
unput(yytext[i]);
}
@@ -4052,7 +4052,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
{
// for defines we interpret a comment
// as documentation for the define
- int i;for (i=yyleng-1;i>0;i--)
+ int i;for (i=(int)yyleng-1;i>0;i--)
{
unput(yytext[i]);
}
@@ -4291,11 +4291,20 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->args += " volatile ";
current->argList->volatileSpecifier=TRUE;
}
-<FuncQual>{BN}*"noexcept"{BN}* { // volatile member function
+<FuncQual>{BN}*"noexcept"{BN}* { // noexcept qualifier
lineCount() ;
current->args += " noexcept ";
current->spec |= Entry::NoExcept;
}
+<FuncQual>{BN}*"noexcept"{BN}*"(" { // noexcept expression
+ lineCount() ;
+ current->args += " noexcept(";
+ current->spec |= Entry::NoExcept;
+ lastRoundContext=FuncQual;
+ pCopyRoundString=&current->args;
+ roundCount=0;
+ BEGIN(CopyRound);
+ }
<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* { // pure virtual member function
lineCount() ;
current->args += " = 0";
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index cd030db..bb86998 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -30,6 +30,7 @@
#include "pagedef.h"
#include "growbuf.h"
#include "message.h"
+#include "version.h"
// file format: (all multi-byte values are stored in big endian format)
@@ -70,10 +71,11 @@ void IndexWord::addUrlIndex(int idx,bool hiPriority)
//--------------------------------------------------------------------
SearchIndex::SearchIndex() : SearchIndexIntf(Internal),
- m_words(328829), m_index(numIndexEntries), m_urlIndex(-1)
+ m_words(328829), m_index(numIndexEntries), m_url2IdMap(10007), m_urls(10007), m_urlIndex(-1)
{
int i;
m_words.setAutoDelete(TRUE);
+ m_url2IdMap.setAutoDelete(TRUE);
m_urls.setAutoDelete(TRUE);
m_index.setAutoDelete(TRUE);
for (i=0;i<numIndexEntries;i++) m_index.insert(i,new QList<IndexWord>);
@@ -87,7 +89,6 @@ void SearchIndex::setCurrentDoc(Definition *ctx,const char *anchor,bool isSource
QCString url=isSourceFile ? ((FileDef*)ctx)->getSourceFileBase() : ctx->getOutputFileBase();
url+=Config_getString("HTML_FILE_EXTENSION");
if (anchor) url+=QCString("#")+anchor;
- m_urlIndex++;
QCString name=ctx->qualifiedName();
if (ctx->definitionType()==Definition::TypeMember)
{
@@ -159,7 +160,17 @@ void SearchIndex::setCurrentDoc(Definition *ctx,const char *anchor,bool isSource
}
}
- m_urls.insert(m_urlIndex,new URL(name,url));
+ int *pIndex = m_url2IdMap.find(url);
+ if (pIndex==0)
+ {
+ ++m_urlIndex;
+ m_url2IdMap.insert(url,new int(m_urlIndex));
+ m_urls.insert(m_urlIndex,new URL(name,url));
+ }
+ else
+ {
+ m_urls.insert(*pIndex,new URL(name,url));
+ }
}
static int charsToIndex(const char *word)
@@ -398,8 +409,8 @@ struct SearchDocEntry
{
QCString type;
QCString name;
- QCString tag;
- QCString url;
+ QCString tagFile;
+ QCString url;
GrowBuf importantText;
GrowBuf normalText;
};
@@ -503,31 +514,23 @@ static QCString definitionToName(Definition *ctx)
void SearchIndexExternal::setCurrentDoc(Definition *ctx,const char *anchor,bool isSourceFile)
{
- //if (p->openOk)
- //{
+ QCString tagFile = stripPath(Config_getString("GENERATE_TAGFILE"));
+ QCString baseName = isSourceFile ? ((FileDef*)ctx)->getSourceFileBase() : ctx->getOutputFileBase();
+ QCString url = baseName + Doxygen::htmlFileExtension;
+ if (anchor) url+=QCString("#")+anchor;
+ QCString key = tagFile+";"+url;
+
+ p->current = p->docEntries.find(key);
+ if (!p->current)
+ {
SearchDocEntry *e = new SearchDocEntry;
- e->type = definitionToName(ctx);
+ e->type = isSourceFile ? QCString("source") : definitionToName(ctx);
e->name = ctx->qualifiedName();
- e->tag = stripPath(Config_getString("GENERATE_TAGFILE"));
- QCString baseName = isSourceFile ? ((FileDef*)ctx)->getSourceFileBase() : ctx->getOutputFileBase();
- e->url = baseName + Doxygen::htmlFileExtension;
- if (anchor) e->url+=QCString("#")+anchor;
+ e->tagFile = tagFile;
+ e->url = url;
p->current = e;
- p->docEntries.append(e->url,e);
- //if (p->insideDoc)
- //{
- // p->t << " </doc>" << endl;
- //}
- //p->t << " <doc>" << endl;
- //QCString baseName = isSourceFile ? ((FileDef*)ctx)->getSourceFileBase() : ctx->getOutputFileBase();
- //p->t << " <field name=\"type\">" << definitionToName(ctx) << "</field>" << endl;
- //p->t << " <field name=\"name\">" << convertToXML(ctx->qualifiedName()) << "</field>" << endl;
- //p->t << " <field name=\"tag\">" << convertToXML(stripPath(Config_getString("GENERATE_TAGFILE"))) << "</field>" << endl;
- //p->t << " <field name=\"url\">" << baseName << Doxygen::htmlFileExtension;
- //if (anchor) p->t << "#" << anchor;
- //p->t << "</field>" << endl;
- //p->insideDoc=TRUE;
- //}
+ p->docEntries.append(key,e);
+ }
}
void SearchIndexExternal::addWord(const char *word,bool hiPriority)
@@ -536,14 +539,6 @@ void SearchIndexExternal::addWord(const char *word,bool hiPriority)
GrowBuf *pText = hiPriority ? &p->current->importantText : &p->current->normalText;
if (pText->getPos()>0) pText->addChar(' ');
pText->addStr(word);
- //if (p->openOk)
- //{
- // p->t << " <field name=\"text";
- // if (hiPriority) p->t << "\" boost=\"yes";
- // p->t << "\">";
- // p->t << convertToXML(word);
- // p->t << "</field>" << endl;
- //}
}
void SearchIndexExternal::write(const char *fileName)
@@ -561,10 +556,10 @@ void SearchIndexExternal::write(const char *fileName)
doc->normalText.addChar(0); // make sure buffer ends with a 0 terminator
doc->importantText.addChar(0); // make sure buffer ends with a 0 terminator
t << " <doc>" << endl;
- t << " <field name=\"type\">" << doc->type << "</field>" << endl;
- t << " <field name=\"name\">" << convertToXML(doc->name) << "</field>" << endl;
- t << " <field name=\"tag\">" << convertToXML(doc->tag) << "</field>" << endl;
- t << " <field name=\"url\">" << doc->url << "</field>" << endl;
+ t << " <field name=\"type\">" << doc->type << "</field>" << endl;
+ t << " <field name=\"name\">" << convertToXML(doc->name) << "</field>" << endl;
+ t << " <field name=\"tag\">" << convertToXML(doc->tagFile) << "</field>" << endl;
+ t << " <field name=\"url\">" << convertToXML(doc->url) << "</field>" << endl;
t << " <field name=\"keywords\">" << convertToXML(doc->importantText.get()) << "</field>" << endl;
t << " <field name=\"text\">" << convertToXML(doc->normalText.get()) << "</field>" << endl;
t << " </doc>" << endl;
@@ -1023,6 +1018,7 @@ void writeJavascriptSearchIndex()
" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << endl;
t << "<html><head><title></title>" << endl;
t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>" << endl;
+ t << "<meta name=\"generator\" content=\"Doxygen " << versionString << "\">" << endl;
t << "<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>" << endl;
t << "<script type=\"text/javascript\" src=\"" << baseName << ".js\"></script>" << endl;
t << "<script type=\"text/javascript\" src=\"search.js\"></script>" << endl;
diff --git a/src/searchindex.h b/src/searchindex.h
index c643315..d1fe994 100644
--- a/src/searchindex.h
+++ b/src/searchindex.h
@@ -24,6 +24,7 @@
#include <qdict.h>
#include <qintdict.h>
#include <qvector.h>
+#include "sortdict.h"
class FTextStream;
class Definition;
@@ -89,7 +90,8 @@ class SearchIndex : public SearchIndexIntf
void addWord(const char *word,bool hiPrio,bool recurse);
QDict<IndexWord> m_words;
QVector< QList<IndexWord> > m_index;
- QIntDict<URL> m_urls;
+ QDict<int> m_url2IdMap;
+ QIntDict<URL> m_urls;
int m_urlIndex;
};
diff --git a/src/store.cpp b/src/store.cpp
index 6d3b7d1..74719a9 100644
--- a/src/store.cpp
+++ b/src/store.cpp
@@ -162,7 +162,7 @@ int Store::write(const char *buf,uint size)
#else
portable_off_t curPos = m_cur;
#endif
- int bytesInBlock = BLOCK_SIZE - BLOCK_POINTER_SIZE - (curPos & (BLOCK_SIZE-1));
+ int bytesInBlock = (int)(BLOCK_SIZE - BLOCK_POINTER_SIZE - (curPos & (BLOCK_SIZE-1)));
int bytesLeft = bytesInBlock<(int)size ? (int)size-bytesInBlock : 0;
int numBytes = size - bytesLeft;
STORE_ASSERT(bytesInBlock>=0);
@@ -254,7 +254,7 @@ void Store::end()
#else
portable_off_t curPos = m_cur;
#endif
- int bytesInBlock = BLOCK_SIZE - (curPos & (BLOCK_SIZE-1));
+ int bytesInBlock = (int)(BLOCK_SIZE - (curPos & (BLOCK_SIZE-1)));
//printf("%x: Store::end erasing %x bytes\n",(int)curPos&~(BLOCK_SIZE-1),bytesInBlock);
//printf("end: bytesInBlock=%x\n",bytesInBlock);
// zero out rest of the block
@@ -327,7 +327,7 @@ int Store::read(char *buf,uint size)
#else
portable_off_t curPos = m_cur;
#endif
- int bytesInBlock = BLOCK_SIZE - BLOCK_POINTER_SIZE - (curPos & (BLOCK_SIZE-1));
+ int bytesInBlock = (int)(BLOCK_SIZE - BLOCK_POINTER_SIZE - (curPos & (BLOCK_SIZE-1)));
int bytesLeft = bytesInBlock<(int)size ? (int)size-bytesInBlock : 0;
int numBytes = size - bytesLeft;
//printf(" Store::read: pos=%x num=%d left=%d\n",(int)curPos,numBytes,bytesLeft);
diff --git a/src/tclscanner.l b/src/tclscanner.l
index 5a1ec1d..c46d136 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -172,7 +172,7 @@ int TclFindElement(
}
else if (openBraces == 1)
{
- size = (p - elemStart);
+ size = (int)(p - elemStart);
p++;
if ((p >= limit) || isspace(UCHAR(*p)))
{ /* INTL: ISO space. */
@@ -211,7 +211,7 @@ int TclFindElement(
case '\v':
if ((openBraces == 0) && !inQuotes)
{
- size = (p - elemStart);
+ size = (int)(p - elemStart);
goto done;
}
break;
@@ -223,7 +223,7 @@ int TclFindElement(
case '"':
if (inQuotes)
{
- size = (p - elemStart);
+ size = (int)(p - elemStart);
p++;
if ((p >= limit) || isspace(UCHAR(*p)))
{ /* INTL: ISO space */
@@ -254,7 +254,7 @@ int TclFindElement(
{
return TCL_ERROR;
}
- size = (p - elemStart);
+ size = (int)(p - elemStart);
}
done:
@@ -316,7 +316,7 @@ int Tcl_SplitList(
}
}
}
- length = l - list;
+ length = (int)(l - list);
argv = (CONST char **) ckalloc((unsigned)
((size * sizeof(char *)) + length + 1));
for (i = 0, p = ((char *) argv) + size*sizeof(char *);
@@ -326,7 +326,7 @@ int Tcl_SplitList(
result = TclFindElement(list, length, &element, &list,
&elSize, &brace);
- length -= (list - prevList);
+ length -= (int)(list - prevList);
if (result != TCL_OK)
{
ckfree((char *) argv);
diff --git a/src/translator_dk.h b/src/translator_dk.h
index 0f15cf8..bf02402 100644
--- a/src/translator_dk.h
+++ b/src/translator_dk.h
@@ -16,7 +16,7 @@
*
*/
/*! @file
- * @brief ´Danish translation
+ * @brief Danish translation
*/
/*
diff --git a/src/translatordecoder.h b/src/translatordecoder.h
index bf22df1..7261ee9 100644
--- a/src/translatordecoder.h
+++ b/src/translatordecoder.h
@@ -70,7 +70,7 @@ class TranslatorDecoder : public Translator
char *oPtr = output.data();
if (!portable_iconv(cd,&iPtr,&iLeft,&oPtr,&oLeft))
{
- oSize -= oLeft;
+ oSize -= (int)oLeft;
output.resize(oSize+1);
output.at(oSize)='\0';
return output;
diff --git a/src/util.cpp b/src/util.cpp
index 2679b65..e5caac5 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -2290,7 +2290,7 @@ QCString transcodeCharacterStringToUTF8(const QCString &input)
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());
@@ -2383,7 +2383,7 @@ QCString fileToString(const char *name,bool filter,bool isSourceCode)
QCString contents(bSize);
int totalSize=0;
int size;
- while ((size=fread(contents.data()+totalSize,1,bSize,f))==bSize)
+ while ((size=(int)fread(contents.data()+totalSize,1,bSize,f))==bSize)
{
totalSize+=bSize;
contents.resize(totalSize+bSize);
@@ -3321,7 +3321,7 @@ static QCString getCanonicalTypeForIdentifier(
if (mType && mType->isTypedef()) // but via a typedef
{
- result = resolvedType;
+ result = resolvedType+ts; // the +ts was added for bug 685125
}
else
{
@@ -7054,7 +7054,7 @@ static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size
uint newSize=0;
if (!portable_iconv(cd, &srcPtr, &iLeft, &dstPtr, &oLeft))
{
- newSize = tmpBufSize-oLeft;
+ newSize = tmpBufSize-(int)oLeft;
srcBuf.shrink(newSize);
strncpy(srcBuf.data(),tmpBuf.data(),newSize);
//printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data());
@@ -7110,7 +7110,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf)
const int bufSize=1024;
char buf[bufSize];
int numRead;
- while ((numRead=fread(buf,1,bufSize,f))>0)
+ while ((numRead=(int)fread(buf,1,bufSize,f))>0)
{
//printf(">>>>>>>>Reading %d bytes\n",numRead);
inBuf.addArray(buf,numRead),size+=numRead;
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index 89412b2..22df1c1 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -361,7 +361,7 @@ static void codifyLines(const char *text,const char *cl=0,bool classlink=FALSE)
{
g_yyLineNr++;
QCString line = sp;
- line = line.left(p-sp-1);
+ line = line.left((int)(p-sp)-1);
//*(p-1)='\0';
//g_code->codify(sp);
writeWord(line,cl,classlink);
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index e4e5bd1..1ddcbdf 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -75,9 +75,22 @@ static void writeClassToDot(FTextStream &t,ClassDef* cd);
static void writeVhdlDotLink(FTextStream &t,const QCString &a,const QCString &b,const QCString &style);
static void writeVhdlPortToolTip(FTextStream& t,QList<MemberDef>* port,ClassDef *cd);
+static const MemberDef *flowMember=0;
+void VhdlDocGen::setFlowMember( const MemberDef* mem)
+{
+ flowMember=mem;
+}
+const MemberDef* VhdlDocGen::getFlowMember()
+{
+ return flowMember;
+}
+void VhdlDocGen::resetFlowMember()
+{
+ flowMember=NULL;
+}
//--------------------------------------------------------------------------------------------------
static void codify(FTextStream &t,const char *str)
@@ -130,12 +143,12 @@ void VhdlDocGen::writeOverview()
{
ClassSDict::Iterator cli(*Doxygen::classSDict);
ClassDef *cd;
- bool found=false;
+ bool found=FALSE;
for ( ; (cd=cli.current()) ; ++cli )
{
if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS )
{
- found=true;
+ found=TRUE;
break;
}
}
@@ -214,7 +227,7 @@ static void startDot(FTextStream &t)
{
t << " digraph G { \n";
t << "rankdir=LR \n";
- t << "concentrate=true\n";
+ t << "concentrate=TRUE\n";
t << "stylesheet=\"doxygen.css\"\n";
}
@@ -481,21 +494,21 @@ static void writeTable(QList<MemberDef>* port,FTextStream & t)
if (i<inp)
{
md=(MemberDef*)inPorts.at(i);
- writeColumn(t,md,true);
+ writeColumn(t,md,TRUE);
}
else
{
- writeColumn(t,NULL,true);
+ writeColumn(t,NULL,TRUE);
}
if (i<outp)
{
md=(MemberDef*)outPorts.at(i);
- writeColumn(t,md,false);
+ writeColumn(t,md,FALSE);
}
else
{
- writeColumn(t,NULL,false);
+ writeColumn(t,NULL,FALSE);
}
}
}
@@ -2832,7 +2845,7 @@ bool VhdlDocGen::findConstraintFile(LayoutNavEntry *lne)
{
QCString ov = theTranslator->trDesignOverview();
QCString ofile("vhdl_design_overview");
- LayoutNavEntry *oo=new LayoutNavEntry( lne,LayoutNavEntry::MainPage,true,ofile,ov,"");
+ LayoutNavEntry *oo=new LayoutNavEntry( lne,LayoutNavEntry::MainPage,TRUE,ofile,ov,"");
kk->addChild(oo);
}
@@ -3108,7 +3121,7 @@ static void addInstance(ClassDef* classEntity, ClassDef* ar,
//printf("addInstance %s to %s\n", cd->name().data(), classEntity->name().data());
QCString n1=cur->type;
- if (!cd->isBaseClass(classEntity, true, 0))
+ if (!cd->isBaseClass(classEntity, TRUE, 0))
{
cd->insertBaseClass(classEntity,n1,Public,Normal,0);
}
@@ -3117,7 +3130,7 @@ static void addInstance(ClassDef* classEntity, ClassDef* ar,
VhdlDocGen::addBaseClass(cd,classEntity);
}
- if (!VhdlDocGen::isSubClass(classEntity,cd,true,0))
+ if (!VhdlDocGen::isSubClass(classEntity,cd,TRUE,0))
{
classEntity->insertSubClass(cd,Public,Normal,0);
}
@@ -3290,3 +3303,773 @@ void VhdlDocGen::addBaseClass(ClassDef* cd,ClassDef *ent)
}
}
+
+void VhdlDocGen::createFlowChart(MemberDef *mdef)
+{
+ QCString codeFragment;
+
+ int actualStart= mdef->getStartBodyLine();
+ int actualEnd=mdef->getEndBodyLine();
+ FileDef* fd=mdef->getFileDef();
+ bool b=readCodeFragment( fd->absFilePath().data(), actualStart,actualEnd,codeFragment);
+ if (!b) return;
+
+ VHDLLanguageScanner *pIntf =(VHDLLanguageScanner*) Doxygen::parserManager->getParser(".vhd");
+ VhdlDocGen::setFlowMember(mdef);
+ Entry root;
+ pIntf->parseInput("",codeFragment.data(),&root);
+
+}
+
+//############################## Flowcharts #################################################
+
+
+#define STARTL (FlowNode::WHILE_NO | FlowNode::IF_NO | \
+ FlowNode::FOR_NO | FlowNode::CASE_NO | \
+ FlowNode::LOOP_NO )
+#define DECLN (FlowNode::NEXT_WHEN_NO | FlowNode::WHEN_NO | \
+ FlowNode::ELSIF_NO | FlowNode::IF_NO | \
+ FlowNode::FOR_NO | FlowNode::WHILE_NO | \
+ FlowNode::CASE_NO | FlowNode::LOOP_NO )
+#define STARTFIN (FlowNode::START_NO | FlowNode::END_NO)
+#define LOOP (FlowNode::FOR_NO | FlowNode::WHILE_NO | \
+ FlowNode::LOOP_NO )
+#define ENDCL (FlowNode::END_CASE | FlowNode::END_LOOP)
+#define EEND (FlowNode::ENDIF_NO | FlowNode::ELSE_NO)
+#define IFF (FlowNode::ELSIF_NO | FlowNode::IF_NO)
+#define EWHEN (FlowNode::NEXT_WHEN_NO)
+#define EMPTY (EEND | FlowNode::ELSIF_NO)
+
+int FlowNode::ifcounter=0;
+int FlowNode::nodeCounter=0;
+int FlowNode::imageCounter=0;
+int FlowNode::caseCounter=0;
+QList<FlowNode> FlowNode::flowList;
+
+void FlowNode::colTextNodes()
+{
+ QCString text;
+ FlowNode *flno;
+ bool found=FALSE;
+ for (uint j=0;j<flowList.count();j++)
+ {
+ FlowNode *flo=flowList.at(j);
+ if (flo->type==TEXT_NO)
+ {
+ text+=flo->text+'\n';
+ if (!found)
+ flno=flo;
+ if (found)
+ {
+ flno->text+=flo->text;
+ flowList.remove(flo);
+ if (j>0)j=j-1;
+ }
+ found=TRUE;
+ }
+ else
+ found=FALSE;
+ }
+
+ // find if..endif without text
+ // if..elseif without text
+ for (uint j=0;j<flowList.count()-1;j++)
+ {
+ FlowNode *flo=flowList.at(j);
+ int kind=flo->type;
+ if ( kind & IFF || flo->type==ELSE_NO)
+ {
+ FlowNode *ftemp=flowList.at(j+1);
+ if (ftemp->type & EMPTY)
+ {
+ FlowNode *fNew = new FlowNode(TEXT_NO,"empty ",0);
+ fNew->stamp=flo->stamp;
+ flowList.insert(j+1,fNew);
+ }
+ }
+ }
+
+}// colTextNode
+
+QCString FlowNode::getNodeName(int n)
+{
+ QCString node;
+ node.setNum(n);
+ return node.prepend("node");
+}
+
+void FlowNode::delFlowList()
+{
+ ifcounter=0;
+ nodeCounter=0;
+ uint size=flowList.count();
+
+ for (uint j=0;j <size ;j++)
+ {
+ FlowNode *fll=flowList.at(j);
+ delete fll;
+ }
+ flowList.clear();
+}
+
+
+void FlowNode::codify(FTextStream &t,const char *str)
+{
+ if (str)
+ {
+ const char *p=str;
+ char c;
+ while (*p)
+ {
+ c=*p++;
+ switch(c)
+ {
+ case '<': t << "&lt;"; break;
+ case '>': t << "&gt;"; break;
+ case '&': t << "&amp;"; break;
+ case '\'': t << "&#39;"; break;
+ case '"': t << "&quot;"; break;
+ case '\n': t <<"<BR ALIGN=\"LEFT\"/>"; break;
+ default: t << c; break;
+ }
+ }
+ }
+}//codify
+
+FlowNode::~FlowNode()
+{
+}
+
+FlowNode::FlowNode(int typ,const char * t,const char* ex,const char* label)
+{
+ if (typ & STARTL)
+ {
+ ifcounter++;
+ }
+
+ stamp=FlowNode::ifcounter;
+ text=t;
+ exp=ex;
+ type=typ;
+ this->label=label;
+
+
+ if (typ==START_NO || typ==END_NO || typ==VARIABLE_NO)
+ stamp=-1;
+
+ id=++nodeCounter;
+}
+
+void FlowNode::addFlowNode(int type,const char* text,const char* exp, const char *label)
+{
+ static QRegExp reg("[;]");
+ static QRegExp reg1("[\"]");
+
+ if (!VhdlDocGen::getFlowMember()) return;
+
+ QCString typeString(text);
+ QCString expression(exp);
+
+
+ if (text)
+ {
+ typeString=typeString.replace(reg,"\n");
+ }
+
+ if (exp)
+ expression=expression.replace(reg1,"\\\"");
+
+ FlowNode *fl=new FlowNode(type,typeString.data(),expression.data(),label);
+ if (type==START_NO)
+ flowList.prepend(fl);
+ else if (type==VARIABLE_NO)
+ flowList.insert(1,fl);
+ else
+ flowList.append(fl);
+
+}
+
+void FlowNode::moveToPrevLevel()
+{
+ if (!VhdlDocGen::getFlowMember()) return;
+ ifcounter--;
+}
+
+
+void FlowNode::setLabel(const char* t)
+{
+ FlowNode *fll=flowList.last();
+ fll->label=t;
+ assert(fll->type & LOOP);
+
+}
+
+void FlowNode::printFlowList()
+{
+ uint size=FlowNode::flowList.count();
+ for (uint j=0;j<size;j++)
+ {
+ FlowNode *fll=flowList.at(j);
+ QCString ty=getNodeType(fll->type);
+
+ printf("============================================");
+ if (!fll->text.isEmpty())
+ {
+ printf("\n (%d) NODE:type %s text %s stamp:%d\n",fll->id,ty.data(),fll->text.data(),fll->stamp);
+ }
+ else
+ {
+ printf("\n (%d) NODE:type %s exp %s stamp:%d [%s]\n",fll->id,ty.data(),fll->exp.data(),fll->stamp,fll->label.data());
+ }
+
+ printf("============================================");
+ }// for
+}
+
+
+QCString FlowNode::convertNameToFileName()
+{
+ static QRegExp exp ("[#&*+-/<=>|$?^]");
+ QCString temp,qcs;
+ qcs=VhdlDocGen::getFlowMember()->name();
+
+ // string literal
+ VhdlDocGen::deleteAllChars(qcs,'"');
+
+ // functions like "<=", ">"
+ int u=qcs.find(exp,0);
+
+ if (u>=0)
+ {
+ qcs.prepend("Z");
+ qcs=qcs.replace(exp,"_");
+ }
+
+ temp=temp.setNum(imageCounter);
+ return qcs+temp;
+}
+
+const char* FlowNode::getNodeType(int c)
+{
+ switch(c)
+ {
+ case FlowNode::IF_NO: return "if ";
+ case FlowNode::ELSIF_NO: return "elsif ";
+ case FlowNode::ELSE_NO: return "else ";
+ case FlowNode::CASE_NO: return "case ";
+ case FlowNode::WHEN_NO: return "when ";
+ case FlowNode::EXIT_NO: return "exit ";
+ case FlowNode::END_NO: return "end ";
+ case FlowNode::TEXT_NO: return "text ";
+ case FlowNode::START_NO: return "start ";
+ case FlowNode::ENDIF_NO: return "endif ";
+ case FlowNode::FOR_NO: return "for ";
+ case FlowNode::WHILE_NO: return "while ";
+ case FlowNode::END_LOOP: return "end_loop ";
+ case FlowNode::END_CASE: return "end_case ";
+ case FlowNode::VARIABLE_NO: return "variable_decl ";
+ case FlowNode::RETURN_NO: return "return ";
+ case FlowNode::LOOP_NO: return "infinte loop ";
+ case FlowNode::NEXT_NO: return "next ";
+ case FlowNode::EXIT_WHEN_NO: return "exit_when ";
+ case FlowNode::NEXT_WHEN_NO: return "next_when ";
+ case FlowNode::EMPTY_NO: return "empty ";
+ default: return "--failure--";
+ }
+}
+
+void FlowNode::createSVG()
+{
+ QCString qcs("/");
+ QCString ov = Config_getString("HTML_OUTPUT");
+
+ FlowNode::imageCounter++;
+ qcs+=FlowNode::convertNameToFileName()+".svg";
+
+ //const MemberDef *m=VhdlDocGen::getFlowMember();
+ //fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",VhdlDocGen::trTypeString(m->getMemberSpecifiers()),m->name().data(),m->getFileDef()->name().data());
+
+ QCString dir=" -o "+ov+qcs;
+ ov+="/flow_design.dot";
+
+ QCString vlargs="-Tsvg "+ov+dir ;
+
+ if (portable_system("dot",vlargs)!=0)
+ {
+ err("could not create dot file");
+ }
+}
+
+
+void FlowNode::startDot(FTextStream &t)
+{
+ t << " digraph G { \n";
+ t << "rankdir=TB \n";
+ t << "concentrate=true\n";
+ t << "stylesheet=\"doxygen.css\"\n";
+}
+
+void FlowNode::endDot(FTextStream &t)
+{
+ t << " } \n";
+}
+
+void FlowNode::writeFlowNode()
+{
+ // assert(VhdlDocGen::flowMember);
+
+ QCString ov = Config_getString("HTML_OUTPUT");
+ QCString fileName = ov+"/flow_design.dot";
+ QFile f(fileName);
+ FTextStream t(&f);
+
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Error: Cannot open file %s for writing\n",fileName.data());
+ return;
+ }
+
+ colTextNodes();
+ // printFlowList( );
+ FlowNode::startDot(t);
+ uint size=flowList.count();
+
+ for (uint j=0;j <size ;j++)
+ {
+ FlowNode *fll=flowList.at(j);
+ writeShape(t,fll);
+ }
+ writeFlowLinks(t);
+
+ FlowNode::endDot(t);
+ delFlowList();
+ f.close();
+ FlowNode::createSVG();
+}// writeFlowNode
+
+void FlowNode::writeShape(FTextStream &t,const FlowNode* fl)
+{
+ if (fl->type & EEND) return;
+ QCString var;
+ if (fl->type & LOOP)
+ {
+ var=" loop";
+ }
+ else if (fl->type & IFF)
+ {
+ var=" then";
+ }
+ else
+ {
+ var="";
+ }
+
+ t<<getNodeName(fl->id).data();
+ QCString q=getNodeType(fl->type);
+ bool dec=(fl->type & DECLN);
+ if (dec)
+ {
+ t << " [shape=diamond,style=filled,color=\".7 .3 1.0\",label=\" "+fl->exp+var+"\"]\n";
+ }
+ else if (fl->type & ENDCL)
+ {
+ QCString val=fl->text;
+ t << " [shape=ellipse ,label=\""+val+"\"]\n";
+ }
+ else if (fl->type & STARTFIN)
+ {
+ static QRegExp reg1("[\"]");
+ QCString val=fl->text;
+ val=val.replace(reg1,"\\\"");
+ t << "[shape=box , style=rounded label=<\n";
+ t << "<TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" >\n ";
+ t << "<TR><TD BGCOLOR=\"white\" > ";
+ FlowNode::codify(t,val.data());
+ t << " </TD></TR></TABLE>>];";
+ }
+ else
+ {
+ if (fl->text.isEmpty()) return;
+ bool var=(fl->type & FlowNode::VARIABLE_NO) ;
+ QCString repl("<BR ALIGN=\"LEFT\"/>");
+ QCString q=fl->text;
+
+ int z=q.findRev("\n");
+
+ if (z==(int)q.length()-1)
+ {
+ q=q.remove(z,2);
+ }
+ t << "[shape=none margin=0.1, label=<\n";
+ t << "<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n ";
+ if (var)
+ {
+ t << "<TR><TD BGCOLOR=\"lightyellow\" > ";
+ }
+ else
+ {
+ t << "<TR><TD BGCOLOR=\"lightcyan\" > ";
+ }
+ FlowNode::codify(t,q.data());
+ t << " </TD></TR></TABLE>>];";
+ }
+}
+
+
+void FlowNode::writeEdge(FTextStream &t,const FlowNode* fl_from,const FlowNode* fl_to,int i)
+{
+ checkNode(fl_to);
+ writeEdge(t,fl_from->id,fl_to->id,i);
+}
+
+void FlowNode::writeEdge(FTextStream &t,int fl_from,int fl_to,int i)
+{
+ QCString label,col;
+
+ if (i==0)
+ {
+ col="red";
+ label="yes";
+ }
+ else if (i==1)
+ {
+ col="black";
+ label="no";
+ }
+ else
+ {
+ col="green";
+ label="";
+ }
+
+ t<<"edge [color=\""+col+"\",label=\""+label+"\"]\n";
+ t<<getNodeName(fl_from).data();
+ t<<"->";
+ t<<getNodeName(fl_to).data();
+ t<<"\n";
+}
+
+
+void FlowNode::checkNode(const FlowNode* /*flo*/)
+{
+ // assert(!(flo->type & IDLE));
+}
+
+void FlowNode::checkNode(int /*z*/)
+{
+ // FlowNode *flo=flowList.at(z);
+ //assert(!(flo->type & IDLE));
+}
+
+int FlowNode::getNextNode(int index)
+{
+ for (uint j=index+1;j<flowList.count();j++)
+ {
+ FlowNode *flo=flowList.at(j);
+ int kind=flo->type;
+ if (kind & FlowNode::ENDIF_NO)
+ {
+ continue;
+ }
+
+ if (kind==ELSE_NO || kind==ELSIF_NO)
+ {
+ j=findNode(j,flo->stamp,FlowNode::ENDIF_NO);
+ }
+ else
+ {
+ return j;
+ }
+ }
+
+ return flowList.count()-1;
+}
+
+int FlowNode::findNode(int index,int type)
+{
+ for (uint j=index+1;j<flowList.count();j++)
+ {
+ FlowNode *flo=flowList.at(j);
+ if (flo->type==type)
+ {
+ return j;
+ }
+ }
+ return flowList.count()-1;
+}// findNode
+
+
+int FlowNode::findNode(int index,int stamp,int type)
+{
+ for (uint j=index+1;j<flowList.count();j++)
+ {
+ FlowNode *flo=flowList.at(j);
+ if (flo->type==type && flo->stamp==stamp)
+ {
+ return j;
+ }
+ }
+ return flowList.count()-1;
+}// findNode
+
+int FlowNode::getNoLink(const FlowNode* fl,uint index)
+{
+
+ for (uint j=index+1;j<flowList.count();j++)
+ {
+ FlowNode *flo=FlowNode::flowList.at(j);
+ if (flo->type==IF_NO && flo->stamp==fl->stamp)
+ {
+ return j;
+ }
+
+ if (flo->type==ELSE_NO && flo->stamp==fl->stamp)
+ {
+ return j+1;
+ }
+
+ if (flo->type==ELSIF_NO && flo->stamp==fl->stamp)
+ {
+ return j;
+ }
+
+ if ((flo->type & ENDIF_NO) && flo->stamp==fl->stamp)
+ {
+ return getNextNode(j);
+ }
+
+ }
+ return flowList.count()-1;// end process
+}
+
+int FlowNode::getTextLink(const FlowNode* /*fl*/,uint index)
+{
+ assert(FlowNode::flowList.count()>index);
+
+ uint i=index+1;
+
+ FlowNode *flo=flowList.at(i);
+ if (flo->type==IF_NO)
+ {
+ return i;
+ }
+
+ if (FlowNode::caseCounter)
+ {
+ return FlowNode::findNode(index,END_CASE);
+ }
+ else
+ {
+ i = FlowNode::getNextNode(index);
+ }
+
+ if (i>0) return i;
+
+ return flowList.count()-1;// end process
+}
+
+int FlowNode::findNextLoop(int index,int stamp)
+{
+ for (uint j=index+1;j<FlowNode::flowList.count();j++)
+ {
+ FlowNode *flo=FlowNode::flowList.at(j);
+ if (flo->type==END_LOOP && flo->stamp==stamp)
+ {
+ return j;
+ }
+ }
+ return flowList.count()-1;
+}
+
+int FlowNode::findPrevLoop(int index,int stamp)
+{
+ for (uint j=index;j>0;j--)
+ {
+ FlowNode *flo=flowList.at(j);
+ if (flo->type & LOOP)
+ {
+ if ( flo->stamp==stamp)
+ {
+ return j;
+ }
+ }
+ }
+ err("end loop without loop");
+ assert(FALSE);
+ return flowList.count()-1;
+}
+
+
+int FlowNode::findLabel(int index,QCString & label)
+{
+ for (uint j=index;j>0;j--)
+ {
+ FlowNode *flo=flowList.at(j);
+ if ((flo->type & LOOP) && !flo->label.isEmpty() && stricmp(flo->label.data(),label.data())==0)
+ {
+ return findNode(j,flo->stamp,END_LOOP);
+ }
+ }
+ return 0;
+}
+
+
+void FlowNode::writeFlowLinks(FTextStream &t)
+{
+
+ uint size=flowList.count();
+ if (size<2) return;
+
+ // start link
+ writeEdge(t,flowList.at(0),flowList.at(1),2);
+
+ for (uint j=0;j<size;j++)
+ {
+ FlowNode *fll=flowList.at(j);
+ int kind=fll->type;
+ if (kind==ELSE_NO || kind==ENDIF_NO)
+ {
+ continue;
+ }
+
+ if (kind==IF_NO)
+ {
+ writeEdge(t,fll,flowList.at(j+1),0);
+ int z=getNoLink(fll,j);
+ writeEdge(t,fll,flowList.at(z),1);
+ }
+
+ if (kind==ELSIF_NO)
+ {
+ writeEdge(t,fll,flowList.at(j+1),0);
+ int z=getNoLink(fll,j);
+ writeEdge(t,fll,flowList.at(z),1);
+ }
+
+ if ((kind & LOOP) && kind!=LOOP_NO)
+ {
+ writeEdge(t,fll,flowList.at(j+1),0);
+ int z=findNode(j,fll->stamp,END_LOOP);
+ z = getNextNode(z);
+ writeEdge(t,fll,flowList.at(z),1);
+ }
+
+ if (kind==LOOP_NO)
+ {
+ writeEdge(t,fll,flowList.at(j+1),0);
+ }
+
+ if (kind==TEXT_NO || kind==VARIABLE_NO)
+ {
+ int z=getTextLink(fll,j);
+ writeEdge(t,fll,flowList.at(z),2);
+ }
+
+ if (kind==WHEN_NO)
+ {
+ writeEdge(t,fll,flowList.at(j+1),0);
+ int z=flowList.count()-1;
+ int u=findNode(j,fll->stamp,WHEN_NO);
+ if (u<z)
+ writeEdge(t,fll,FlowNode::flowList.at(u),1);
+ else {
+ z=findNode(j,fll->stamp,END_CASE);
+ writeEdge(t,fll,FlowNode::flowList.at(z),1);
+ }
+ }
+
+ if (kind==CASE_NO)
+ {
+ writeEdge(t,fll,flowList.at(j+1),2);
+ caseCounter++;
+ }
+
+ if (kind==RETURN_NO)
+ {
+ writeEdge(t,fll,FlowNode::flowList.at(size-1),2);
+ }
+
+ if (kind==EXIT_NO)
+ {
+ int z;
+ if (!fll->label.isEmpty())
+ {
+ z=findLabel(j,fll->label);
+ z=getNextNode(z);
+ //assert(z!=0);
+ }
+ else
+ {
+ z =findNextLoop(j,fll->stamp);
+ z=getNextNode(z);
+ }
+ writeEdge(t,fll,flowList.at(z),2);
+ }
+
+ if (kind==END_CASE)
+ {
+ int z=FlowNode::getNextNode(j);
+ writeEdge(t,fll,flowList.at(z),2);
+ caseCounter--;
+ }
+
+ if (kind==END_LOOP)
+ {
+ int z=findPrevLoop(j,fll->stamp);
+ writeEdge(t,fll,flowList.at(z),2);
+ }
+
+ if (kind & EWHEN)
+ {
+ writeEdge(t,fll,flowList.at(j+1),0);
+ int z=getNextNode(j+1);
+ writeEdge(t,fll,flowList.at(z),1);
+ }
+
+ if (kind & NEXT_NO)
+ {
+ int z=findNode(j,fll->stamp,END_LOOP);
+ writeEdge(t,fll,flowList.at(z),1);
+ }
+ } //for
+} //writeFlowLinks
+
+void FlowNode::alignFuncProc( QCString & q,const ArgumentList* al,bool isFunc)
+{
+ if (al==0) return;
+
+ ArgumentListIterator ali(*al);
+ int index=ali.count();
+ if (index==0) return;
+
+ int len=q.length()+VhdlDocGen::getFlowMember()->name().length();
+ QCString prev,temp;
+ prev.fill(' ',len+1);
+
+ Argument *arg;
+ bool first=TRUE;
+ q+="\n";
+ for (;(arg=ali.current());++ali)
+ {
+ QCString attl=arg->defval+" ";
+ attl+=arg->name+" ";
+
+ if (!isFunc)
+ {
+ attl+=arg->attrib+" ";
+ }
+ else
+ {
+ attl+=" in ";
+ }
+
+ attl+=arg->type;
+
+ if (--index) attl+=",\n"; else attl+="\n";
+
+ attl.prepend(prev.data());
+ temp+=attl;
+ first=FALSE;
+ }
+ q+=temp;
+}
diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h
index bb62f3f..8d8307e 100644
--- a/src/vhdldocgen.h
+++ b/src/vhdldocgen.h
@@ -25,6 +25,7 @@
#include <qcstring.h>
#include "layout.h"
#include "memberlist.h"
+#include "arguments.h"
class Entry;
class ClassDef;
@@ -262,6 +263,14 @@ class VhdlDocGen
static void writeOverview(OutputList &ol);
static void writeOverview();
+
+ // flowcharts
+ static void createFlowChart( MemberDef*);
+ static void addFlowImage(FTextStream,QCString);
+
+ static void setFlowMember( const MemberDef *flowMember);
+ static const MemberDef * getFlowMember();
+ static void resetFlowMember();
private:
static void findAllArchitectures(QList<QCString>& ql,const ClassDef *cd);
@@ -272,4 +281,90 @@ class VhdlDocGen
static void writeRecorUnit(QCString & largs,OutputList& ol ,const MemberDef *mdef);
};
+
+class FlowNode
+{
+ public:
+ enum nodeType {
+ IF_NO = 1<<1,
+ ELSIF_NO = 1<<2,
+ ELSE_NO = 1<<3,
+ CASE_NO = 1<<4,
+ WHEN_NO = 1<<5,
+ EXIT_NO = 1<<6,
+ END_NO = 1<<7,
+ TEXT_NO = 1<<8,
+ START_NO = 1<<9,
+ ENDIF_NO = 1<<10,
+ FOR_NO = 1<<11,
+ WHILE_NO = 1<<12,
+ END_LOOP = 1<<13,
+ END_CASE = 1<<14,
+ VARIABLE_NO = 1<<15,
+ RETURN_NO = 1<<16,
+ LOOP_NO = 1<<17,
+ NEXT_NO = 1<<18,
+ EXIT_WHEN_NO = 1<<19,
+ NEXT_WHEN_NO = 1<<20,
+ EMPTY_NO = 1<<21
+ };
+
+ //---------- create svg -------------------------------------------------------------
+ static void createSVG();
+ static void startDot(FTextStream &t);
+ static void endDot(FTextStream &t);
+ static void codify(FTextStream &t,const char *str);
+ static void writeShape(FTextStream &t,const FlowNode* fl);
+ static void writeEdge(FTextStream &t,int fl_from,int fl_to,int i);
+ static void writeEdge(FTextStream &t,const FlowNode* fl_from,const FlowNode* fl_to,int i);
+ //static void writeEndNode(FTextStream &t,const FlowNode* fl);
+ static void writeFlowLinks(FTextStream &t);
+ //static void writeStartNode(FTextStream &t,const FlowNode* fl);
+ static void checkNode(int);
+ static void checkNode(const FlowNode*);
+
+ static QCString getNodeName(int n);
+ static void colTextNodes();
+
+ static int getTextLink(const FlowNode* fl,uint index);
+ static int getNoLink(const FlowNode*,uint);
+ static int getNextNode(int);
+ static int findNode(int index,int stamp,int type);
+ static int findNode(int index,int type);
+ static int findNextLoop(int j,int stamp);
+ static int findPrevLoop(int j,int stamp);
+ static int findLabel(int j,QCString &);
+ static void delFlowList();
+ static const char* getNodeType(int c);
+
+ static void addFlowNode(int type,const char* text,const char* exp,const char * label=NULL);
+ static void moveToPrevLevel();
+ static void printFlowList();
+ static void setLabel(const char* text);
+ static int getTimeStamp();
+ static void printNodeList();
+ static void writeFlowNode();
+ static void alignFuncProc(QCString & q,const ArgumentList* al,bool isFunc);
+ static QCString convertNameToFileName();
+
+ static QList<FlowNode> flowList;
+ static int ifcounter;
+ static int nodeCounter;
+ static int imageCounter;
+ static int caseCounter;
+
+ FlowNode(int typ,const char* t,const char* ex,const char* label=NULL);
+ ~FlowNode();
+
+ int id;
+ int stamp;
+ int type;
+
+ QCString label;
+ QCString text;
+ QCString exp;
+};
+
+
+
#endif
diff --git a/src/vhdlparser.y b/src/vhdlparser.y
index 82f68a7..32727a2 100644
--- a/src/vhdlparser.y
+++ b/src/vhdlparser.y
@@ -63,9 +63,10 @@ struct YYMM
#include "arguments.h"
//-----------------------------variables ---------------------------------------------------------------------------
-//static VhdlParser* myconv=0;
+//static MyParserVhdl* myconv=0;
static VhdlContainer s_str;
+
static QList<Entry>instFiles;
static int yyLineNr;
static Entry* lastCompound;
@@ -79,6 +80,7 @@ static QCString currName;
static int levelCounter;
static QCString confName;
static QCString genLabels;
+static QCString lab;
static QList<VhdlConfNode> configL;
static VhdlConfNode* currNode;
@@ -91,7 +93,7 @@ static int param_sec = 0;
static int parse_sec=0;
-//---------------------------- function --------------------------------------------------------------------------------
+//---------------------------- functions --------------------------------------------------------------------------------
int vhdlScanYYlex ();
void vhdlScanYYerror (char const *);
@@ -104,7 +106,7 @@ static void addCompInst(char *n, char* instName,char* comp,int line);
static void newEntry();
static void initEntry(Entry *e);
-static bool isFuncProcProced();
+
static void popConfig();
static void pushLabel(const QCString &label);
static void popLabel();
@@ -118,6 +120,8 @@ static void addProto(const char *s1,const char *s2,const char *s3,
static void createFunction(const QCString &impure,int spec,
const QCString &fname);
+static void createFlow(QCString s);
+
void newVhdlEntry()
{
newEntry();
@@ -325,13 +329,29 @@ t_ToolDir
%type<qstr> entity_class_entry_list entity_class_entry group_constituent_list group_constituent group_declaration group_template_declaration
%type<qstr> procs_stat1_5 comp_1 mark_comp dot_name fi_dec multiplying_operator factor term adding_op
%type<qstr> simple_exp alias_spec sigma signature1 mark_stats mark_stats_1 signature
-%type<qstr> protected_type_body protected_type_declaration alias_name_stat vcomp_stat comp_spec_stat
+%type<qstr> protected_type_body protected_type_declaration alias_name_stat vcomp_stat comp_spec_stat procs_decltve_item
%type<qstr> sig_stat external_name absolute_pathname relative_pathname package_path_name external_pathname pathname_element_list neg_list pathname_element
%type<qstr> func_name return_is param func_prec iproc ifunc interface_subprogram_decl interface_package_decl package_instantiation_decl
-%type<qstr> subprogram_instantiation_decl
-%type<qstr> context_ref libustcont_stats libustcont_stat context_decl
-
+%type<qstr> subprogram_instantiation_decl procs_stat1_4
+%type<qstr> context_ref libustcont_stats libustcont_stat context_decl entity_decltve_item case_stat
+%type<qstr> exit_stat if_stat loop_stat next_stat null_stat return_stat signal_assign_stat
+%type<qstr> variable_assign_stat wait_stat report_statement assertion_stat_2 assertion_stat_1
+
+%type<qstr> binding_indic_2 binding_indic_1 shift_op block_decltve_item disconnection_spec seq_stats_1 seq_stats_2 seq_stats
+%type<qstr> signal_list signal_list_1 signal_list_2 seq_stat assertion_stat choice_stat choice_stat_1
+%type<qstr> case_stat_1 case_stat_2 case_stat_alternative exit_stat_1 exit_stat_2 if_stat_2 if_stat_3 if_stat_1 loop_stat_2 loop_stat_1 loop_stat_3
+%type<qstr> next_stat_1 next_stat_2 return_stat_1 lable variable_assign_stat_1
+%type<qstr> wait_stat_1 wait_stat_2 wait_stat_3 target delay_mechanism
+%type<qstr> if_generation_scheme if_scheme if_scheme_1 if_scheme_2 if_scheme_3 iteration_scheme for_scheme while_scheme concurrent_stats
+%type<qstr> concurrent_stats_1 concurrent_stats_2 concurrent_stat block_stat_5 block_stat_4 block_stat_3 block_stat_2 block_stat_1 block_stat_0
+%type<qstr> generate_statement_body generation_scheme concurrent_assertion_stat concurrent_procedure_call concurrent_signal_assign_stat
+%type<qstr> block_stat_6 block_stat_7 block_stat_8 condal_signal_assign sel_signal_assign opts condal_wavefrms wavefrm wavefrm_element
+%type<qstr> wavefrm_1 wavefrm_2 wavefrm_element_1 wavefrm_element_2 opts_1 opts_2 sel_wavefrms
+%type<qstr> sel_wavefrms_1 sel_wavefrms_2 gen_stat1 block_declarative_part end_stats inout_stat
+%type<qstr> selected_signal_assignment comp_inst_stat
+ %type<qstr> conditional_signal_assignment selected_variable_assignment conditional_variable_assignment
+ %type<qstr> subprog_decltve_item subprog_body_3 subprog_body_1 procs_stat1_2
%debug
@@ -341,10 +361,14 @@ t_ToolDir
%expect 2
// minimum bison version
-//%require "2.2"
+//%required "2.2"
+
+
%%
start: design_file
+ | procs_stat
+ | subprog_body
design_file : design_unit_list
@@ -441,10 +465,9 @@ entity_start: t_ENTITY t_Identifier t_IS
$$=$2;
lastEntity=current;
lastCompound=0;
- /*int k=*/ getParsedLine(t_ENTITY);
+ getParsedLine(t_ENTITY);
addVhdlType($$,getParsedLine(t_ENTITY),Entry::CLASS_SEC,VhdlDocGen::ENTITY,0,0,Public);
- //fprintf(stderr,"\n entiy %s : at line %d",$$.data(),s_str.yyLineNr);
- }
+ }
;
entity_decl_5 : /* empty */
@@ -473,9 +496,7 @@ arch_body : arch_start error t_END arch_body_2 t_Semicolon
arch_start : t_ARCHITECTURE t_Identifier t_OF t_Identifier t_IS
{
- $$=$4;
- $$+="::";
- $$+=$2;
+ $$=$4+"::"+$2;
pushLabel($2);
lastCompound=current;
addVhdlType($$,getParsedLine(t_ARCHITECTURE),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
@@ -516,22 +537,15 @@ package_decl : package_start package_decl_1 t_END package_decl_2 t_Semicolon
package_start : t_PACKAGE t_Identifier t_IS
{
lastCompound=current;
-
-
- Entry *clone=new Entry(*current);
- clone->section=Entry::NAMESPACE_SEC;
- clone->spec=VhdlDocGen::PACKAGE;
- clone->name=$2;
- int line=s_str.iLine;
- clone->startLine=line;
- clone->bodyLine=line;
-
- clone->protection=Package;
- current_root->addSubEntry(clone);
-
-
- addVhdlType($2,line,Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
- //fprintf(stderr,"\n entiy %s : at line %d",$$.data(),s_str.yyLineNr);
+ Entry *clone=new Entry(*current);
+ clone->section=Entry::NAMESPACE_SEC;
+ clone->spec=VhdlDocGen::PACKAGE;
+ clone->name=$2;
+ clone->startLine=s_str.iLine;
+ clone->bodyLine=s_str.iLine;
+ clone->protection=Package;
+ current_root->addSubEntry(clone);
+ addVhdlType($2,s_str.iLine,Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
}
package_decl_2 : /* empty */
@@ -563,56 +577,54 @@ package_body_2 : t_Identifier { last
package_body_2 : t_PACKAGE t_BODY { lastCompound=0; }
package_body_2 : t_PACKAGE t_BODY t_Identifier { lastCompound=0; }
-
package_body_1 : /* empty */ { $$=""; }
package_body_1 : package_body_1 package_body_3
package_body_3 : package_body_decltve_item
-
/*------------------------------------------
-- Declarative Item
--------------------------------------------*/
-common_decltve_item_1: package_decl
+common_decltve_item_1: package_decl
common_decltve_item_1: package_instantiation_decl
common_decltve_item_1: package_body
common_decltve_item_1: subprogram_instantiation_decl
-common_decltve_item: type_decl
-common_decltve_item: subtype_decl
-common_decltve_item: constant_decl
-common_decltve_item: file_decl
-common_decltve_item: alias_decl
-common_decltve_item: subprog_decl
-common_decltve_item: use_clause
-
-entity_decltve_item: common_decltve_item
-entity_decltve_item: subprog_body
-entity_decltve_item: attribute_decl
-entity_decltve_item: attribute_spec
-entity_decltve_item: disconnection_spec
-entity_decltve_item: signal_decl
-entity_decltve_item: variable_decl
-entity_decltve_item: group_template_declaration
-entity_decltve_item: group_declaration
-entity_decltve_item: common_decltve_item_1
-
-
-block_decltve_item: common_decltve_item
-block_decltve_item: subprog_body
-block_decltve_item: comp_decl
-block_decltve_item: attribute_decl
-block_decltve_item: attribute_spec
-block_decltve_item: config_spec
-block_decltve_item: disconnection_spec
+common_decltve_item: type_decl{$$=$1;}
+common_decltve_item: subtype_decl{$$=$1;}
+common_decltve_item: constant_decl{ $$=$1;}
+common_decltve_item: file_decl{$$=$1;}
+common_decltve_item: alias_decl{$$=$1;}
+common_decltve_item: subprog_decl{$$=$1;}
+common_decltve_item: use_clause {$$=$1;}
+
+entity_decltve_item: common_decltve_item {$$=$1;}
+entity_decltve_item: subprog_body {$$=$1;}
+entity_decltve_item: attribute_decl {$$=$1;}
+entity_decltve_item: attribute_spec {$$=$1;}
+entity_decltve_item: disconnection_spec {$$=$1;}
+entity_decltve_item: signal_decl {$$=$1;}
+entity_decltve_item: variable_decl {$$=$1;}
+entity_decltve_item: group_template_declaration {$$=$1;}
+entity_decltve_item: group_declaration {$$=$1;}
+entity_decltve_item: common_decltve_item_1 {$$="";}
+
+
+block_decltve_item: common_decltve_item
+block_decltve_item: subprog_body
+block_decltve_item: comp_decl
+block_decltve_item: attribute_decl
+block_decltve_item: attribute_spec
+block_decltve_item: config_spec
+block_decltve_item: disconnection_spec
block_decltve_item: signal_decl
block_decltve_item: variable_decl
block_decltve_item: group_template_declaration
block_decltve_item: group_declaration
-block_decltve_item: common_decltve_item_1
-block_decltve_item: tool_directive
+block_decltve_item: common_decltve_item_1 {$$="";}
+block_decltve_item: tool_directive {$$="";}
block_declarative_part: block_decltve_item
| block_declarative_part block_decltve_item
@@ -640,23 +652,16 @@ package_body_decltve_item: attribute_decl
package_body_decltve_item: attribute_spec
package_body_decltve_item: common_decltve_item_1
-subprog_decltve_item: common_decltve_item
-subprog_decltve_item: subprog_body
-subprog_decltve_item: attribute_decl
-subprog_decltve_item: attribute_spec
-subprog_decltve_item: variable_decl
+subprog_decltve_item: common_decltve_item {$$=$1;}
+subprog_decltve_item: subprog_body {$$="";}
+subprog_decltve_item: attribute_decl {$$=$1;}
+subprog_decltve_item: attribute_spec {$$=$1;}
+subprog_decltve_item: variable_decl {$$=$1;}
subprog_decltve_item: group_template_declaration
-subprog_decltve_item: group_declaration
-subprog_decltve_item: common_decltve_item_1
-
-procs_decltve_item: common_decltve_item
-procs_decltve_item: subprog_body
-procs_decltve_item: attribute_decl
-procs_decltve_item: attribute_spec
-procs_decltve_item: variable_decl
-procs_decltve_item: group_template_declaration
-procs_decltve_item: group_declaration
-procs_decltve_item: common_decltve_item_1
+subprog_decltve_item: group_declaration {$$="";}
+subprog_decltve_item: common_decltve_item_1 {$$="";}
+
+procs_decltve_item: subprog_decltve_item {$$=$1;}
config_decltve_item: attribute_spec { $$=$1; }
config_decltve_item: use_clause { $$=$1; }
@@ -672,7 +677,11 @@ func_prec: t_IMPURE { $$="impure"; }
subprog_decl: subprog_spec t_Semicolon { currP=0; }
subprog_spec: t_PROCEDURE t_Identifier
- { currP=VhdlDocGen::PROCEDURE; createFunction($2,currP,0); }
+ {
+ currP=VhdlDocGen::PROCEDURE;
+ createFunction($2,currP,0);
+ tempEntry=current;
+ }
subprog_spec_1 { newEntry(); }
subprog_spec: func_prec t_FUNCTION designator
{
@@ -680,7 +689,7 @@ subprog_spec: func_prec t_FUNCTION designator
createFunction($1,currP,$3.data());
}
subprog_spec_2 t_RETURN mark
- {
+ {
tempEntry=current;
current->type=$7;
newEntry();
@@ -694,8 +703,10 @@ subprog_spec : t_FUNCTION designator
subprog_spec_2 t_RETURN mark
{
tempEntry=current;
+ current->bodyLine=getParsedLine(t_FUNCTION);
current->type=$6;
newEntry();
+
}
subprog_spec_22: gen_interface_list
@@ -718,7 +729,9 @@ subprog_spec_1: subprog_spec_2
subprog_body: subprog_spec t_IS subprog_body_1 t_BEGIN seq_stats t_END subprog_body_2 t_Semicolon
{
- currP=0;
+ tempEntry->endBodyLine=s_str.yyLineNr;
+ createFlow($3);
+ currP=0;
}
subprog_body: subprog_spec t_IS error t_END subprog_body_2 t_Semicolon
{
@@ -732,12 +745,12 @@ subprog_body_2: t_PROCEDURE t_Identifier
subprog_body_2: t_FUNCTION t_Identifier
subprog_body_2: t_FUNCTION t_STRING
-
-subprog_body_1: /* empty */
+subprog_body_1: /* empty */ {$$="";}
//subprog_body_1 : subprogram_instantiation_decl
-subprog_body_1: subprog_body_1 subprog_body_3
-subprog_body_3: subprog_decltve_item
+subprog_body_1: subprog_body_1 subprog_body_3 {$$=$1+$2; }
+subprog_body_3: subprog_decltve_item { $$=$1; }
+
/*--------------------------------------------------
-- Interface Lists and Associaton Lists
----------------------------------------------------*/
@@ -753,8 +766,7 @@ interf_element: interface_package_decl
// adding generic : [ package foo is new bar]
if (parse_sec==GEN_SEC)
{
- QCString n=current->name;
- addVhdlType(n.data(),getParsedLine(t_PACKAGE),Entry::VARIABLE_SEC,VhdlDocGen::GENERIC,$1.data(),0);
+ addVhdlType(current->name.data(),getParsedLine(t_PACKAGE),Entry::VARIABLE_SEC,VhdlDocGen::GENERIC,$1.data(),0);
}
}
interf_element: interface_subprogram_decl
@@ -766,21 +778,18 @@ interf_element: interface_subprogram_decl
if (a>b) b=a;
- QCString n=current->name;
- addVhdlType(n.data(),b,Entry::VARIABLE_SEC,VhdlDocGen::GENERIC,$1.data(),0);
+ addVhdlType(current->name.data(),b,Entry::VARIABLE_SEC,VhdlDocGen::GENERIC,$1.data(),0);
}
}
interf_element: interf_element_1 t_Identifier
{
if (parse_sec==GEN_SEC)
{
- QCString v= $1;
- addVhdlType($2,s_str.iLine,Entry::VARIABLE_SEC,currP,$1.data(),0);
+ addVhdlType($2,s_str.iLine,Entry::VARIABLE_SEC,currP,$1.data(),0);
}
}
interf_element: interf_element_1 idf_list t_Colon interf_element_2 subtype_indic interf_element_3 interf_element_4
{
- QCString b=$2;
$$=$2+":"+$4+$5+$6+$7;
if (currP!=VhdlDocGen::COMPONENT)
{
@@ -822,7 +831,7 @@ association_list_2: t_Comma association_element { $$=", "+$2; }
gen_association_list : t_LeftParen gen_association_element gen_association_list_1 t_RightParen
{
- QCString str="( "+$2;
+ QCString str="( "+$2+$3;
str.append(" )");
$$=str;
}
@@ -830,7 +839,7 @@ gen_association_list: t_LeftParen error t_RightParen { $$=""; }
gen_association_list: t_LeftParen t_OPEN t_RightParen { $$=" ( open ) "; }
gen_association_list_1: /* empty */ { $$=""; }
-gen_association_list_1: gen_association_list_1 gen_association_list_2 { $$=$1+"?? "+$2; }
+gen_association_list_1: gen_association_list_1 gen_association_list_2 { $$=$1+" "+$2; }
gen_association_list_2: t_Comma gen_association_element { $$=","+$2; }
association_element: formal_part t_Arrow actual_part { $$=$1+"=>"+$3; }
@@ -840,7 +849,7 @@ association_element: t_DEFAULT { $$="default"; }
/* changed ;gen_association_element : association_element */
gen_association_element: expr { $$=$1; }
-gen_association_element: choice t_Arrow expr
+gen_association_element: choice t_Arrow expr { $$=$1+"=>"+$3; }
gen_association_element: discrete_range1 { $$=$1 ; }
formal_part: name { $$=$1; }
@@ -853,31 +862,29 @@ actual_part: t_INERTIAL expr { $$="inertial"; }
-- Names and Expressions
----------------------------------------------------*/
-
-
expr: and_relation { $$=$1; }
expr: relation { $$=$1; }
-shift_op: t_SLL
- | t_SRA
- | t_SLA
- | t_SRL
- | t_ROR
- | t_ROL
+shift_op: t_SLL { $$="sll"; }
+ | t_SRA { $$="sra"; }
+ | t_SLA { $$="sla"; }
+ | t_SRL { $$="srl"; }
+ | t_ROR { $$="ror"; }
+ | t_ROL { $$="rol"; }
;
-and_relation: relation shift_op relation
-and_relation: relation t_AND relation
-and_relation: relation t_XOR relation
-and_relation: relation t_OR relation
-and_relation: relation t_NOR relation
-and_relation: relation t_XNOR relation
-and_relation: relation t_NAND relation
-and_relation: and_relation t_NAND relation
-and_relation: and_relation t_NOR relation
-and_relation: and_relation t_XNOR relation
-and_relation: and_relation t_AND relation
-and_relation: and_relation t_OR relation
-and_relation: and_relation t_XOR relation
+and_relation: relation shift_op relation {$$= $1+$2+$3; }
+and_relation: relation t_AND relation {$$= $1+" and "+$3; }
+and_relation: relation t_XOR relation {$$= $1+" xor "+$3; }
+and_relation: relation t_OR relation {$$= $1+" or "+$3; }
+and_relation: relation t_NOR relation {$$= $1+" nor "+$3; }
+and_relation: relation t_XNOR relation {$$= $1+"xnor"+$3; }
+and_relation: relation t_NAND relation {$$= $1+"nand"+$3; }
+and_relation: and_relation t_NAND relation {$$= $1+"nand"+$3; }
+and_relation: and_relation t_NOR relation{$$= $1+"nor"+$3; }
+and_relation: and_relation t_XNOR relation {$$= $1+"nand"+$3; }
+and_relation: and_relation t_AND relation {$$= $1+" and "+$3; }
+and_relation: and_relation t_OR relation {$$= $1+" or "+$3; }
+and_relation: and_relation t_XOR relation {$$= $1+" xor "+$3; }
/* ;relation : unary_operator primary */
@@ -890,7 +897,7 @@ relation: t_NOT primary { $$="not "+$2; }
relation: primary t_DoubleStar primary { $$=$1+" ** "+$3; }
relation: t_Minus primary t_DoubleStar primary { $$=$2+" ** "+$4; }
-/* ; relation : relation binary_operator primary */
+/* relation : relation binary_operator primary */
relation: relation t_MOD relation { $$=$1+" mod "+$3; }
relation: relation t_REM relation { $$=$1+" rem "+$3; }
@@ -1013,11 +1020,13 @@ type_decl: t_TYPE t_Identifier error t_Semicolon { $$=""; }
type_decl: t_TYPE t_Identifier type_decl_1 t_Semicolon
{
addVhdlType($2,getParsedLine(t_TYPE),Entry::VARIABLE_SEC,VhdlDocGen::TYPE,0,$3.data());
+ $$="type ";
+ $$+=$2+$3+";";
}
type_decl: t_TYPE error t_Semicolon { $$=""; }
type_decl_1: /* empty */ { $$=""; }
-type_decl_1: t_IS type_definition { $$="is "+$2; }
+type_decl_1: t_IS type_definition { $$=" is "+$2; }
type_definition: enumeration_type_definition { $$=$1; }
type_definition: range_constraint { $$=$1; }
@@ -1153,6 +1162,9 @@ constant_decl: t_CONSTANT idf_list t_Colon subtype_indic constant_decl_1 t_Semic
QCString it=$4+" "+$5;
// fprintf(stderr,"\n currP %d \n",currP);
addVhdlType($2,getParsedLine(t_CONSTANT),Entry::VARIABLE_SEC,VhdlDocGen::CONSTANT,0,it.data());
+ $$="constant "+$2;
+ $$+=": ";
+ $$+=it+";";
}
constant_decl_1: /* empty */ { $$=""; }
constant_decl_1: t_VarAsgn expr { $$=":="+$2; }
@@ -1169,7 +1181,8 @@ signal_decl_1: signal_kind { $$=$1; }
variable_decl: t_VARIABLE idf_list t_Colon subtype_indic variable_decl_1 t_Semicolon
{
- $$=$2+":"+$4+" "+$5;
+ $$=$2+":"+$4+" "+$5+";";
+ $$.prepend("variable: ");
}
variable_decl: t_SHARED t_VARIABLE idf_list t_Colon subtype_indic variable_decl_1 t_Semicolon
{
@@ -1193,6 +1206,9 @@ alias_decl: t_ALIAS alias_name_stat alias_spec t_IS name signature t_Semicolon
{
QCString s=$3+" is "+$5+$6;
addVhdlType($2,getParsedLine(t_ALIAS),Entry::VARIABLE_SEC,VhdlDocGen::ALIAS,0,s.data());
+ $$="alias "+$2;
+ $$+=": ";
+ $$+=s+";";
}
alias_decl: t_ALIAS alias_name_stat alias_spec t_IS error t_Semicolon { $$=""; }
@@ -1200,7 +1216,7 @@ alias_name_stat: t_Identifier { $$=$1; }
alias_name_stat: t_StringLit { $$=$1; }
alias_spec :/*empty*/ { $$=""; }
- | t_Colon subtype_indic { $$=","+$2; }
+ | t_Colon subtype_indic { $$=$2; }
;
file_decl: t_FILE idf_list t_Colon subtype_indic t_IS file_decl_1 expr t_Semicolon
@@ -1222,13 +1238,14 @@ file_decl_1: /* empty */ { $$=""; }
file_decl_1: mode { $$=$1; }
disconnection_spec: t_DISCONNECT signal_list t_Colon mark t_AFTER expr t_Semicolon
-
-signal_list: name signal_list_1
-signal_list: t_OTHERS
-signal_list: t_ALL
-signal_list_1: /* empty */
-signal_list_1: signal_list_1 signal_list_2
-signal_list_2: t_Comma name
+ { $$="disconnect "+$2+":"+$4+" after "+$6;}
+
+signal_list: name signal_list_1 { $$=$1+$2;}
+signal_list: t_OTHERS { $$="others";}
+signal_list: t_ALL { $$="all";}
+signal_list_1: /* empty */ { $$="";}
+signal_list_1: signal_list_1 signal_list_2 { $$=$1+$2;}
+signal_list_2: t_Comma name {$$=" , "+$2;}
/*--------------------------------------------------
-- Attribute Declarations and Specifications
@@ -1237,12 +1254,14 @@ signal_list_2: t_Comma name
attribute_decl: t_ATTRIBUTE t_Identifier t_Colon mark t_Semicolon
{
addVhdlType($2,getParsedLine(t_ATTRIBUTE),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,$4.data());
+ $$= "attribute "+$2+ " : "+$4;
}
attribute_spec: t_ATTRIBUTE t_Identifier t_OF entity_spec t_IS expr t_Semicolon
{
- QCString oo=$4+" is "+$6;
- addVhdlType($2,getParsedLine(t_ATTRIBUTE),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,oo.data());
+ QCString att=$4+" is "+$6;
+ addVhdlType($2,getParsedLine(t_ATTRIBUTE),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,att.data());
+ $$="attribute "+att+";";
}
entity_spec : entity_name_list signature t_Colon entity_class { $$=$1+$2+":"+$4;}
@@ -1263,7 +1282,7 @@ entity_class: t_LABEL { $$="label"; }
entity_class: t_TYPE { $$="type"; }
entity_class: t_SUBTYPE { $$="subtype"; }
entity_class: t_PROCEDURE { $$="procedure"; }
-entity_class: t_FUNCTION { $$="function"; }
+entity_class: t_FUNCTION { $$="function"; }
entity_class: t_SIGNAL { $$="signal"; }
entity_class: t_VARIABLE { $$="variable"; }
entity_class: t_CONSTANT { $$="constant"; }
@@ -1277,69 +1296,90 @@ entity_class: t_PROPERTY { $$="property"; }
/*--------------------------------------------------
-- Schemes
-
--------------------------------------------------------------------------*/
-if_generation_scheme: if_scheme
+if_generation_scheme: if_scheme { $$=$1; }
-if_scheme: t_IF expr t_GENERATE generate_statement_body if_scheme_1 if_scheme_2
-if_scheme: t_IF lable expr t_GENERATE generate_statement_body if_scheme_1 if_scheme_2
+if_scheme: t_IF expr t_GENERATE generate_statement_body if_scheme_1 if_scheme_2 {$$="";}
+if_scheme: t_IF lable expr t_GENERATE generate_statement_body if_scheme_1 if_scheme_2 {$$="";}
-if_scheme_2: /* empty */
-if_scheme_2: t_ELSE t_GENERATE generate_statement_body
-if_scheme_2: t_ELSE lable t_GENERATE generate_statement_body
-if_scheme_1: /* empty */
-if_scheme_1: if_scheme_1 if_scheme_3
-if_scheme_3: t_ELSIF expr t_GENERATE generate_statement_body
-if_scheme_3: t_ELSIF lable expr t_GENERATE generate_statement_body
+if_scheme_2: /* empty */ { $$=""; }
+if_scheme_2: t_ELSE t_GENERATE generate_statement_body { $$="else generate "+$3; }
+if_scheme_2: t_ELSE lable t_GENERATE generate_statement_body { $$="else "+$2+" generate "+$4; }
+if_scheme_1: /* empty */ { $$=""; }
+if_scheme_1: if_scheme_1 if_scheme_3 { $$=$1+$2; }
+if_scheme_3: t_ELSIF expr t_GENERATE generate_statement_body { $$="elsif "+$2+" generate "+$4; }
+if_scheme_3: t_ELSIF lable expr t_GENERATE generate_statement_body { $$="elsif "+$2+$3+" generate "+$5; }
-generation_scheme: for_scheme
+generation_scheme: for_scheme {$$=$1;}
-iteration_scheme: for_scheme
-iteration_scheme: while_scheme
+iteration_scheme: for_scheme {$$=$1;}
+iteration_scheme: while_scheme {$$=$1;}
-for_scheme: t_FOR t_Identifier t_IN discrete_range
-for_scheme: t_FOR lable t_Identifier t_IN discrete_range
-
-while_scheme: t_WHILE expr
+for_scheme: t_FOR t_Identifier t_IN discrete_range
+ {
+ if(!lab.isEmpty())
+ $$=lab+" :for "+$2+" in "+$4;
+ else
+ $$=" for "+$2+" in "+$4;
+ FlowNode::addFlowNode(FlowNode::FOR_NO,0,$$,lab.data());
+ lab.resize(0);
+ }
+for_scheme: t_FOR lable t_Identifier t_IN discrete_range
+ {
+ $$=lab+" for "+$2+$3+" in "+$5;
+ FlowNode::addFlowNode(FlowNode::FOR_NO,0,$$,lab.data());
+ lab="";
+ }
+
+while_scheme: t_WHILE expr {
+ $$=" while "+$2;
+ FlowNode::addFlowNode(FlowNode::WHILE_NO,0,$$,lab.data());
+ lab="";
+ }
/*--------------------------------------------------
-- Concurrent Statements
----------------------------------------------------*/
-concurrent_stats: concurrent_stats_1
-concurrent_stats_1: /* empty */
-concurrent_stats_1: concurrent_stats_1 concurrent_stats_2
-concurrent_stats_2: concurrent_stat
-
-concurrent_stat : block_stat
- | concurrent_assertion_stat
- | concurrent_procedure_call
- | concurrent_signal_assign_stat
- | comp_inst_stat
- | generate_stat
- | procs_stat
+concurrent_stats: concurrent_stats_1 {$$=$1;}
+concurrent_stats_1: /* empty */ {$$="";}
+concurrent_stats_1: concurrent_stats_1 concurrent_stats_2 {$$=$1+$2;}
+concurrent_stats_2: concurrent_stat {$$=$1;}
+
+concurrent_stat : block_stat {$$=$1;}
+ | concurrent_assertion_stat {$$=$1;}
+ | concurrent_procedure_call {$$=$1;}
+ | concurrent_signal_assign_stat {$$=$1;}
+ | comp_inst_stat
+ {
+ QCString li=$1;
+ $$=$1;
+
+ }
+ | generate_stat {$$=$1;}
+ | procs_stat
block_stat: t_Identifier t_Colon t_BLOCK block_stat_0 block_stat_1 block_stat_2
block_stat_3 block_stat_4 t_BEGIN concurrent_stats t_END t_BLOCK block_stat_5
- t_Semicolon
-block_stat_5: /* empty */
-block_stat_5: t_Identifier
-block_stat_4: /* empty */
-block_stat_4: block_stat_4 block_stat_6
-block_stat_6: block_decltve_item
-block_stat_3: /* empty */
-block_stat_3: t_PORT interf_list t_Semicolon block_stat_7
-//block_sta_7: /* empty */
-block_stat_7: t_PORT t_MAP association_list t_Semicolon
-block_stat_2: /* empty */
-block_stat_2: t_GENERIC interf_list t_Semicolon block_stat_8
-block_stat_8: /* empty */
-block_stat_8: t_GENERIC t_MAP association_list t_Semicolon
-block_stat_1: /* empty */
-block_stat_1: t_LeftParen expr t_RightParen block_stat_0
-block_stat_0: /* empty */
-block_stat_0: t_IS
+ t_Semicolon {$$=$1+":block"+$4+$5+$6+$7+$8+"begin "+$10+" block "+$13;}
+block_stat_5: /* empty */ {$$="";}
+block_stat_5: t_Identifier {$$=$1;}
+block_stat_4: /* empty */ {$$=""; }
+block_stat_4: block_stat_4 block_stat_6 {$$=$1+$2;}
+block_stat_6: block_decltve_item {$$=$1;}
+block_stat_3: /* empty */ {$$="";}
+block_stat_3: t_PORT interf_list t_Semicolon block_stat_7 {$$="port "+$2+";"+$4; }
+//block_sta_7: /* empty */ {$$="";}
+block_stat_7: t_PORT t_MAP association_list t_Semicolon {$$="port map "+$3; }
+block_stat_2: /* empty */ {$$="";}
+block_stat_2: t_GENERIC interf_list t_Semicolon block_stat_8 {$$="generic "+$2+";"+$4; }
+block_stat_8: /* empty */ {$$="";}
+block_stat_8: t_GENERIC t_MAP association_list t_Semicolon {$$="generic map "+$3; }
+block_stat_1: /* empty */ {$$="";}
+block_stat_1: t_LeftParen expr t_RightParen block_stat_0 {$$="("+$2+")"+$4; }
+block_stat_0: /* empty */ {$$=""; }
+block_stat_0: t_IS {$$=" is ";}
dot_name: t_Identifier { $$=$1; }
| dot_name t_Dot t_Identifier { $$=$1+"."+$3; }
@@ -1356,90 +1396,91 @@ vcomp_stat: t_COMPONENT { $$="component";yyLineNr=s_str.iLine; }
comp_inst_stat: t_Identifier t_Colon name { yyLineNr=s_str.iLine; } t_GENERIC t_MAP association_list comp_inst_stat_1 t_Semicolon
{
- addCompInst($1.data(),$3.data(),0,yyLineNr);
+ addCompInst($1.data(),$3.data(),0,yyLineNr);$$="";
}
comp_inst_stat: t_Identifier t_Colon name { yyLineNr=s_str.iLine; } t_PORT t_MAP association_list t_Semicolon
{
- addCompInst($1.data(),$3.data(),0,yyLineNr);
+ addCompInst($1.data(),$3.data(),0,yyLineNr);$$="222";
}
comp_inst_stat: t_Identifier t_Colon vcomp_stat mark_comp t_PORT t_MAP association_list t_Semicolon
{
- addCompInst($1.data(),$4.data(),$3.data(),yyLineNr);
+ addCompInst($1.data(),$4.data(),$3.data(),yyLineNr);$$="";
}
comp_inst_stat: t_Identifier t_Colon vcomp_stat mark_comp t_GENERIC t_MAP association_list comp_inst_stat_1 t_Semicolon
{
- addCompInst($1.data(),$4.data(),$3.data(),yyLineNr);
+ addCompInst($1.data(),$4.data(),$3.data(),yyLineNr);$$="";
}
-comp_inst_stat_1: /* empty */
-comp_inst_stat_1: t_PORT t_MAP association_list
+comp_inst_stat_1: /* empty {$$="";} */
+comp_inst_stat_1: t_PORT t_MAP association_list // {$$="port map"+$3;}
-concurrent_assertion_stat: t_Identifier t_Colon assertion_stat
-concurrent_assertion_stat: assertion_stat
+concurrent_assertion_stat: t_Identifier t_Colon assertion_stat {$$=$1+":"+$3;}
+concurrent_assertion_stat: assertion_stat {$$=$1; }
-concurrent_assertion_stat: t_Identifier t_Colon t_POSTPONED assertion_stat
-concurrent_assertion_stat: t_POSTPONED assertion_stat
+concurrent_assertion_stat: t_Identifier t_Colon t_POSTPONED assertion_stat {$$=$1+":"+"postponed "+$4; }
+concurrent_assertion_stat: t_POSTPONED assertion_stat {$$="postponed "+$2; }
-concurrent_procedure_call: t_Identifier t_Colon procedure_call_stat
-concurrent_procedure_call: procedure_call_stat
+concurrent_procedure_call: t_Identifier t_Colon procedure_call_stat {$$=$1+":"+$3; }
+concurrent_procedure_call: procedure_call_stat {$$=$1;}
-concurrent_procedure_call: t_Identifier t_Colon t_POSTPONED procedure_call_stat
-concurrent_procedure_call: t_POSTPONED procedure_call_stat
+concurrent_procedure_call: t_Identifier t_Colon t_POSTPONED procedure_call_stat {$$=$1+":"+"postponed "+$4; }
+concurrent_procedure_call: t_POSTPONED procedure_call_stat {$$="postponed "+$2; }
-concurrent_signal_assign_stat: t_Identifier t_Colon condal_signal_assign
-concurrent_signal_assign_stat: condal_signal_assign
+concurrent_signal_assign_stat: t_Identifier t_Colon condal_signal_assign {$$=$1+":"+$3; }
+concurrent_signal_assign_stat: condal_signal_assign {$$=$1;}
-concurrent_signal_assign_stat: t_Identifier t_Colon t_POSTPONED condal_signal_assign
-concurrent_signal_assign_stat: t_POSTPONED condal_signal_assign
+concurrent_signal_assign_stat: t_Identifier t_Colon t_POSTPONED condal_signal_assign {$$=$1+":"+"postponed "+$4; }
+concurrent_signal_assign_stat: t_POSTPONED condal_signal_assign {$$="postponed "+$2; }
-concurrent_signal_assign_stat: t_Identifier t_Colon t_POSTPONED sel_signal_assign
-concurrent_signal_assign_stat: t_POSTPONED sel_signal_assign
+concurrent_signal_assign_stat: t_Identifier t_Colon t_POSTPONED sel_signal_assign {$$=$1+":"+"postponed "+$4; }
+concurrent_signal_assign_stat: t_POSTPONED sel_signal_assign {$$="postponed "+$2; }
-concurrent_signal_assign_stat: t_Identifier t_Colon sel_signal_assign
-concurrent_signal_assign_stat: sel_signal_assign
+concurrent_signal_assign_stat: t_Identifier t_Colon sel_signal_assign {$$=$1+":"+$3; }
+concurrent_signal_assign_stat: sel_signal_assign {$$=$1; }
-condal_signal_assign: target t_LESym opts condal_wavefrms t_Semicolon
+condal_signal_assign: target t_LESym opts condal_wavefrms t_Semicolon {$$=$1+"<="+$3+$4; }
-condal_wavefrms: wavefrm
-condal_wavefrms: wavefrm t_WHEN expr
-condal_wavefrms: wavefrm t_WHEN expr t_ELSE condal_wavefrms
+condal_wavefrms: wavefrm {$$=$1;}
+condal_wavefrms: wavefrm t_WHEN expr {$$=$1+" when "+$3;}
+condal_wavefrms: wavefrm t_WHEN expr t_ELSE condal_wavefrms {$$=$1+" when "+$3+"else"+$5;}
-wavefrm: wavefrm_element wavefrm_1
-wavefrm: t_UNAFFECTED
-wavefrm_1: /* empty */
-wavefrm_1: wavefrm_1 wavefrm_2
-wavefrm_2: t_Comma wavefrm_element
+wavefrm: wavefrm_element wavefrm_1 {$$=$1+$2;}
+wavefrm: t_UNAFFECTED {$$="unaffected";}
+wavefrm_1: /* empty */ {$$="";}
+wavefrm_1: wavefrm_1 wavefrm_2 {$$=$1+$2;}
+wavefrm_2: t_Comma wavefrm_element {$$=","+$2;}
-wavefrm_element: expr wavefrm_element_1
-wavefrm_element_1: /* empty */
-wavefrm_element_1: t_AFTER expr
-wavefrm_element_1: t_NULL wavefrm_element_2
-wavefrm_element_1: t_NULL
-wavefrm_element_2: t_AFTER expr
+wavefrm_element: expr wavefrm_element_1 {$$=$1+$2;}
+wavefrm_element_1: /* empty */ {$$="";}
+wavefrm_element_1: t_AFTER expr {$$="after "+$2;}
+wavefrm_element_1: t_NULL wavefrm_element_2 {$$=" null "+$2;}
+wavefrm_element_1: t_NULL {$$=" null ";}
+wavefrm_element_2: t_AFTER expr {$$="after "+$2;}
-target: name
-target: aggregate
+target: name {$$=$1;}
+target: aggregate {$$=$1;}
-opts: opts_1 opts_2
+opts: opts_1 opts_2 {$$=$1+$2;}
-opts_2: /* empty */
-opts_2: t_TRANSPORT
-opts_2: t_REJECT expr t_INERTIAL
-opts_2: t_INERTIAL
+opts_2: /* empty */ {$$="";}
+opts_2: t_TRANSPORT {$$="transport ";}
+opts_2: t_REJECT expr t_INERTIAL {$$="transport"+$2+" intertial ";}
+opts_2: t_INERTIAL {$$=" intertial ";}
-opts_1: /* empty */
-opts_1: t_GUARDED
+opts_1: /* empty */ {$$="";}
+opts_1: t_GUARDED {$$=" guarded ";}
-sel_signal_assign: t_WITH expr t_SELECT target t_LESym opts sel_wavefrms t_Semicolon
+sel_signal_assign: t_WITH expr t_SELECT target t_LESym opts sel_wavefrms t_Semicolon
+ {$$="with "+$2+" select "+$4+"<="+$6+$7;}
+
+sel_wavefrms: sel_wavefrms_1 wavefrm t_WHEN choices {$$=$1+$2;}
+sel_wavefrms_1: /* empty */ {$$="";}
+sel_wavefrms_1: sel_wavefrms_1 sel_wavefrms_2 {$$=$1+$2;}
+sel_wavefrms_2: wavefrm t_WHEN choices t_Comma {$$=$1+" when "+$3;}
-sel_wavefrms: sel_wavefrms_1 wavefrm t_WHEN choices
-sel_wavefrms_1: /* empty */
-sel_wavefrms_1: sel_wavefrms_1 sel_wavefrms_2
-sel_wavefrms_2: wavefrm t_WHEN choices t_Comma
-
-gen_stat1: /* empty */
- | block_declarative_part t_BEGIN
- | t_BEGIN
+gen_stat1: /* empty */ {$$="";}
+ | block_declarative_part t_BEGIN {$$=$1+" begin ";}
+ | t_BEGIN {$$="begin ";}
// problem with double end
// end;
@@ -1465,29 +1506,41 @@ generate_stat_1: t_GENERATE { $$=""; }
generate_stat_1: t_GENERATE t_Identifier { $$=$2; }
//end_stats :
-end_stats: t_END t_Semicolon
-end_stats: t_END t_Identifier t_Semicolon
+end_stats: t_END t_Semicolon { $$="end"; }
+end_stats: t_END t_Identifier t_Semicolon { $$="end "+$2; }
procs_stat: t_Identifier t_Colon procs_stat1
- {
+ {
current->name=$1;
+ tempEntry=current;
current->endBodyLine=s_str.yyLineNr;
newEntry();
+ currName=$1;
}
procs_stat: procs_stat1
{
current->name=VhdlDocGen::getProcessNumber();
current->endBodyLine=s_str.yyLineNr;
+ tempEntry=current;
newEntry();
}
procs_stat1: procs_stat1_5
- { currP=VhdlDocGen::PROCESS; }
+ {
+ currP=VhdlDocGen::PROCESS;
+ current->startLine=s_str.yyLineNr;
+ current->bodyLine=s_str.yyLineNr;
+ }
t_PROCESS procs_stat1_1 procs_stat1_2 t_BEGIN seq_stats t_END
procs_stat1_3 t_Semicolon
- { currP=0;
- createFunction(currName,VhdlDocGen::PROCESS,$4.data());
+ {
+ $5.stripPrefix($4.data());
+ tempEntry=current;
+ currP=0;
+ createFunction(currName,VhdlDocGen::PROCESS,$4.data());
+ createFlow($5);
+ currName="";
}
procs_stat1: error t_END procs_stat1_3 t_Semicolon { currP=0; }
@@ -1500,10 +1553,10 @@ procs_stat1_5: t_POSTPONED { $$="postponed"; }
procs_stat1_6: /* empty */ { $$=""; }
procs_stat1_6: t_Identifier { $$=$1; }
-procs_stat1_2: /* empty */
-procs_stat1_2: t_IS
-procs_stat1_2: procs_stat1_2 procs_stat1_4
-procs_stat1_4: procs_decltve_item
+procs_stat1_2: /* empty */ {$$="";}
+procs_stat1_2: t_IS {$$="";}
+procs_stat1_2: procs_stat1_2 procs_stat1_4 { $$+=$2; }
+procs_stat1_4: procs_decltve_item { $$=$1; }
procs_stat1_1: /* empty */ { $$=""; }
procs_stat1_1: t_LeftParen t_ALL t_RightParen { $$="all"; }
procs_stat1_1: t_LeftParen sensitivity_list t_RightParen { $$=$2; }
@@ -1517,113 +1570,201 @@ sensitivity_list_2: t_Comma name { $$=","+$2; }
-- Sequential Statements
----------------------------------------------------*/
-seq_stats: seq_stats_1
-seq_stats_1: /* empty */
-seq_stats_1: seq_stats_1 seq_stats_2
-seq_stats_2: seq_stat
-
-seq_stat: assertion_stat
-seq_stat: lable assertion_stat
-seq_stat: case_stat
-seq_stat: exit_stat
-seq_stat: if_stat
-seq_stat: loop_stat
-seq_stat: next_stat
-seq_stat: null_stat
-seq_stat: procedure_call_stat
-seq_stat: return_stat
-seq_stat: lable signal_assign_stat
-seq_stat: signal_assign_stat
-seq_stat: variable_assign_stat
-seq_stat: wait_stat
-seq_stat: lable wait_stat
-seq_stat: report_statement
-
-report_statement: loop_stat_1 t_REPORT expr assertion_stat_2 t_Semicolon
-
-assertion_stat: t_ASSERT expr assertion_stat_1 assertion_stat_2 t_Semicolon
-assertion_stat_2: /* empty */
-assertion_stat_2 : t_SEVERITY expr
-assertion_stat_1 : /* empty */
-assertion_stat_1 : t_REPORT expr
-
-choice_stat : /* empty */
-choice_stat : t_Q
-
-choice_stat_1: /* empty */
-choice_stat_1 : t_Q
-choice_stat_1 : t_Identifier
-
-case_stat : t_CASE choice_stat expr t_IS case_stat_alternative case_stat_1 t_END t_CASE choice_stat_1 t_Semicolon
-case_stat : lable t_CASE choice_stat expr t_IS case_stat_alternative case_stat_1 t_END t_CASE choice_stat_1 t_Semicolon
-
-case_stat : t_CASE error t_END t_CASE choice_stat_1 t_Semicolon
-case_stat_1 : /* empty */
-case_stat_1 : case_stat_1 case_stat_2
-case_stat_2 : case_stat_alternative
-
-case_stat_alternative : t_WHEN choices t_Arrow seq_stats
-
-exit_stat : t_EXIT exit_stat_1 exit_stat_2 t_Semicolon
-exit_stat_2 : /* empty */
-exit_stat_2 : t_WHEN expr
-exit_stat_1 : /* empty */
-exit_stat_1 : t_Identifier
-
-if_stat : t_IF expr t_THEN seq_stats if_stat_1 if_stat_2 t_END t_IF t_Semicolon
-if_stat : t_IF expr t_THEN error t_END t_IF t_Semicolon
-if_stat_2 : /* empty */
-if_stat_2 : t_ELSE seq_stats
-if_stat_1 : /* empty */
-if_stat_1 : if_stat_1 if_stat_3
-if_stat_3 : t_ELSIF expr t_THEN seq_stats
+seq_stats: seq_stats_1 {$$=$1;}
+seq_stats_1: /* empty */ {$$="";}
+seq_stats_1: seq_stats_1 seq_stats_2 {$$=$1+$2;}
+seq_stats_2: seq_stat {$$=$1;}
+
+seq_stat: assertion_stat {$$=$1; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);}
+seq_stat: lable assertion_stat {$$=$1+$2; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);}
+seq_stat: case_stat {$$=$1;}
+seq_stat: exit_stat {
+ $$=$1;
+ }
+seq_stat: if_stat {$$="";}
+seq_stat: loop_stat {$$=$1;}
+seq_stat: next_stat {
+ $$=$1;
+ }
+seq_stat: null_stat {$$=$1; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);}
+seq_stat: procedure_call_stat {$$=$1; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);}
+seq_stat: return_stat {$$=$1; FlowNode::addFlowNode(FlowNode::RETURN_NO,$$.data(),0);}
+seq_stat: lable signal_assign_stat {$$=$1+$2;}
+seq_stat: signal_assign_stat
+ {
+ $$=$1;
+ FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);
+ }
+seq_stat: variable_assign_stat { $$=$1; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);}
+seq_stat: wait_stat {$$=$1; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);}
+seq_stat: lable wait_stat {$$=$1+$2; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);}
+seq_stat: report_statement {$$=$1; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);}
+
+report_statement: loop_stat_1 t_REPORT expr assertion_stat_2 t_Semicolon {$$=$1+"report "+$3+$4+";"; }
+
+assertion_stat: t_ASSERT expr assertion_stat_1 assertion_stat_2 t_Semicolon {$$="assert "+$2+$3+$4+";";}
+assertion_stat_2: /* empty */ {$$="";}
+assertion_stat_2 : t_SEVERITY expr {$$=" serverity "+$2;}
+assertion_stat_1 : /* empty */ {$$="";}
+assertion_stat_1 : t_REPORT expr {$$=" report "+$2;}
+
+choice_stat : /* empty */ {$$="";}
+choice_stat : t_Q {$$="?";}
+
+choice_stat_1: /* empty */ {$$="";}
+choice_stat_1 : t_Q {$$="?";}
+choice_stat_1 : t_Identifier {$$=$1;}
+
+
+case_stat : t_CASE choice_stat expr
+ {
+ QCString ca="case "+$2+$3;
+ FlowNode::addFlowNode(FlowNode::CASE_NO,0,ca);
+ }
+ t_IS case_stat_alternative case_stat_1 t_END t_CASE choice_stat_1 t_Semicolon
+ {
+ FlowNode::addFlowNode(FlowNode::END_CASE,"end case",0);
+ FlowNode::moveToPrevLevel();
+ }
+
-loop_stat: loop_stat_1 loop_stat_2 t_LOOP seq_stats t_END t_LOOP loop_stat_3 t_Semicolon
-loop_stat_3: /* empty */
-loop_stat_3: t_Identifier
-loop_stat_2: /* epty */
-loop_stat_2: iteration_scheme
-loop_stat_1: /* empty */
-loop_stat_1: t_Identifier t_Colon
+case_stat : lable t_CASE choice_stat expr
+ {
+ QCString ca="case "+$3+$4;
+ FlowNode::addFlowNode(FlowNode::CASE_NO,0,ca);
+ }
+ t_IS case_stat_alternative case_stat_1 t_END t_CASE choice_stat_1 t_Semicolon
+ {
+ FlowNode::addFlowNode(FlowNode::END_CASE,0,0);
+ FlowNode::moveToPrevLevel();
+ }
-next_stat: t_NEXT next_stat_1 next_stat_2 t_Semicolon
-next_stat_2: /* empty */
-next_stat_2: t_WHEN expr
-next_stat_1: /* empty */
-next_stat_1: t_Identifier
+case_stat : t_CASE error t_END t_CASE choice_stat_1 t_Semicolon {$$="";}
+case_stat_1 : /* empty */ {$$="";}
+case_stat_1 : case_stat_1 case_stat_2 {$$=$1+$2;}
+case_stat_2 : case_stat_alternative {$$=$1;}
+case_stat_alternative : t_WHEN choices t_Arrow
+ {
+ QCString t="when ";
+ t+=$2+"=> ";
+ FlowNode::addFlowNode(FlowNode::WHEN_NO,0,t);
+ }
+seq_stats {$$="";}
-null_stat: t_NULL t_Semicolon
-procedure_call_stat: name t_Semicolon
-return_stat: t_RETURN return_stat_1 t_Semicolon
-return_stat_1: /* empty */
-return_stat_1: expr
+if_stat : t_IF expr t_THEN
+ {
+ $2.prepend("if ");
+ FlowNode::addFlowNode(FlowNode::IF_NO,0,$2);
+ }
+ seq_stats
+
+ if_stat_1 if_stat_2 t_END t_IF t_Semicolon
+ {
+ FlowNode::addFlowNode(FlowNode::ENDIF_NO,0,0);
+ FlowNode::moveToPrevLevel();
+ }
+
+if_stat_2 : /* empty */ {$$=""; }
+if_stat_2 : t_ELSE
+ {
+ FlowNode::addFlowNode(FlowNode::ELSE_NO,0,0);
+ } seq_stats {$$=""; }
+
+
+if_stat_1 : /* empty */ {$$=""; }
+if_stat_1 : if_stat_1 if_stat_3 {$$=$1+$2; }
+if_stat_3 : t_ELSIF expr t_THEN
+ {
+ FlowNode::addFlowNode(FlowNode::ELSIF_NO,0,$2.data());
+ } seq_stats {$$="";}
+
+loop_stat: loop_stat_1 loop_stat_2 t_LOOP seq_stats t_END t_LOOP loop_stat_3 t_Semicolon
+ {
+
+ $$=$1+$2+" loop "+$4+" end loop" +$7;
+ QCString endLoop="end loop" + $7;
+ FlowNode::addFlowNode(FlowNode::END_LOOP,endLoop.data(),0);
+ FlowNode::moveToPrevLevel();
+ }
+
+loop_stat_3: /* empty */ {$$=""; }
+loop_stat_3: t_Identifier {$$=$1; }
+loop_stat_2: /* empty */ {
+ $$="";
+ FlowNode::addFlowNode(FlowNode::LOOP_NO,0,"infinite loop");
+ }
+loop_stat_2: iteration_scheme
+loop_stat_1: /* empty */ {$$=""; }
+loop_stat_1: t_Identifier t_Colon {$$=$1+":";lab=$1;}
+
+exit_stat : loop_stat_1 t_EXIT exit_stat_1 exit_stat_2 t_Semicolon
+ {
+ $$=$1+"exit "+$3+";";
+ if($4.data())
+ FlowNode::addFlowNode(FlowNode::EXIT_WHEN_NO,0,$4.data(),0);
+
+ FlowNode::addFlowNode(FlowNode::EXIT_NO,$$.data(),0,$3.data());
+ }
+exit_stat_2 : /* empty */ {$$="";}
+exit_stat_2 : t_WHEN expr {$$="when "+$2;}
+exit_stat_1 : /* empty */ {$$="";}
+exit_stat_1 : t_Identifier {$$=$1;lab=$$;}
-signal_assign_stat: target t_LESym wavefrm t_Semicolon
- | target t_LESym delay_mechanism wavefrm t_Semicolon
- | target t_LESym t_FORCE inout_stat expr t_Semicolon
- | target t_LESym t_RELEASE inout_stat t_Semicolon
- | selected_signal_assignment
- | conditional_signal_assignment
+
+next_stat: loop_stat_1 t_NEXT next_stat_1 next_stat_2 t_Semicolon
+ {
+ $$=$1+"next "+$3+";" ;
+ if($4.data())
+ FlowNode::addFlowNode(FlowNode::EXIT_WHEN_NO,0,$4.data(),0);
+ FlowNode::addFlowNode(FlowNode::NEXT_NO,$$.data(),0,$3.data());
+ }
+
+next_stat_2: /* empty */ {$$=""; }
+next_stat_2: t_WHEN expr {$$="when "+$2; }
+next_stat_1: /* empty */ {$$=""; }
+next_stat_1: t_Identifier {$$=$1;lab=$$; }
+
+null_stat: t_NULL t_Semicolon {$$="null"; $$+=";";}
+
+procedure_call_stat: name t_Semicolon
+ {
+ $$=$1+";";
+ }
+
+return_stat: t_RETURN return_stat_1 t_Semicolon {$$="return "+$2+";" ;}
+return_stat_1: /* empty */ {$$=""; }
+return_stat_1: expr {$$=$1; }
+
+signal_assign_stat: target t_LESym wavefrm t_Semicolon {$$=$1+" <="+$3+";" ;}
+ | target t_LESym delay_mechanism wavefrm t_Semicolon {$$=$1+ "<= "+$3+$4 +";";}
+ | target t_LESym t_FORCE inout_stat expr t_Semicolon {$$=$1+ "<= "+ " force "+$4+";" ;}
+ | target t_LESym t_RELEASE inout_stat t_Semicolon {$$=$1+ "<= "+" release "+$4 +";";}
+ | selected_signal_assignment {$$=$1; }
+ | conditional_signal_assignment {$$=$1; }
;
-variable_assign_stat: variable_assign_stat_1 t_Semicolon
- | conditional_variable_assignment
- | lable selected_variable_assignment
- | selected_variable_assignment
+variable_assign_stat: variable_assign_stat_1 t_Semicolon {$$=$1+";"; }
+ | conditional_variable_assignment {$$=$1; }
+ | lable selected_variable_assignment {$$=$1; }
+ | selected_variable_assignment {$$=$1; }
-lable: t_Identifier t_Colon
-variable_assign_stat_1: target t_VarAsgn expr
-variable_assign_stat_1: lable target t_VarAsgn expr
+lable: t_Identifier t_Colon { $$=$1+":"; }
+variable_assign_stat_1: target t_VarAsgn expr {$$=$1+":="+$3; }
+variable_assign_stat_1: lable target t_VarAsgn expr {$$=$1+$2+":="+$4; }
wait_stat: t_WAIT wait_stat_1 wait_stat_2 wait_stat_3 t_Semicolon
-wait_stat_3: /* empty */
-wait_stat_3: t_FOR expr
-wait_stat_2: /* empty */
-wait_stat_2: t_UNTIL expr
-wait_stat_1: /* empty */
-wait_stat_1: t_ON sensitivity_list
+ {
+ $$="wait "+$2+$3+$4+";";
+ }
+
+wait_stat_3: /* empty */ {$$=""; }
+wait_stat_3: t_FOR expr {$$="for "+$2; }
+wait_stat_2: /* empty */ {$$=""; }
+wait_stat_2: t_UNTIL expr {$$=" until "+$2; }
+wait_stat_1: /* empty */ {$$=""; }
+wait_stat_1: t_ON sensitivity_list {$$=" on "+$2; }
/*--------------------------------------------------
@@ -1715,11 +1856,11 @@ inst_list: t_OTHERS { $$="others"; }
binding_indic : entity_aspect binding_indic_1 binding_indic_2 { $$=$1; }
-binding_indic_2:
-binding_indic_2: t_PORT t_MAP association_list
+binding_indic_2: {$$="";}
+binding_indic_2: t_PORT t_MAP association_list {$$="port map "+$3;}
-binding_indic_1:
-binding_indic_1: t_GENERIC t_MAP association_list
+binding_indic_1: {$$="";}
+binding_indic_1: t_GENERIC t_MAP association_list {$$="generic map "+$3;}
entity_aspect: t_ENTITY name { $$="entity "+$2; }
@@ -1748,9 +1889,10 @@ group_template_declaration : t_GROUP t_Identifier t_IS t_LeftParen entity_cl
addVhdlType($2,getParsedLine(t_GROUP),Entry::VARIABLE_SEC,VhdlDocGen::GROUP,$5.data(),0);
}
-group_template_declaration: t_GROUP t_Identifier t_IS t_LeftParen error t_Semicolon t_RightParen { $$=""; }
+group_template_declaration: t_GROUP t_Identifier t_IS t_LeftParen error t_Semicolon t_RightParen{ $$=""; }
+
-entity_class_entry : entity_class tbox
+entity_class_entry : entity_class tbox {$$=$1+$2;}
tbox : /* empty */ { $$=""; }
tbox : t_Box { $$="<>"; }
@@ -1898,8 +2040,8 @@ when_stats: when_stats_1
ttend: t_END t_Semicolon
ttend: t_END t_Identifier t_Semicolon
-conditional_signal_assignment: conditional_waveform_assignment
-conditional_signal_assignment: conditional_force_assignment
+conditional_signal_assignment: conditional_waveform_assignment {$$="";}
+conditional_signal_assignment: conditional_force_assignment {$$="";}
conditional_waveform_assignment: target t_LESym wavefrm_element t_WHEN expr else_wave_list t_Semicolon
conditional_waveform_assignment: target t_LESym delay_mechanism wavefrm_element t_WHEN expr else_wave_list t_Semicolon
@@ -1913,8 +2055,8 @@ else_wave_list: t_ELSE expr
conditional_force_assignment: target t_LESym t_FORCE inout_stat expr t_WHEN expr else_stat t_Semicolon
conditional_force_assignment: target t_LESym t_FORCE inout_stat expr t_WHEN expr t_Semicolon
-selected_signal_assignment : selected_waveform_assignment
-selected_signal_assignment : selected_force_assignment
+selected_signal_assignment : selected_waveform_assignment {$$="";}
+selected_signal_assignment : selected_force_assignment {$$="";}
selected_waveform_assignment: t_WITH expr t_SELECT choice_stat
target t_LESym delay_stat sel_wave_list
@@ -1930,13 +2072,13 @@ sel_wave_list_1: wavefrm_element t_WHEN choices t_Semicolon
selected_force_assignment: t_WITH expr t_SELECT choice_stat target t_LESym t_FORCE
inout_stat sel_var_list
-inout_stat:
-inout_stat: t_IN
-inout_stat: t_OUT
+inout_stat: /* empty */ {$$="";}
+inout_stat: t_IN {$$=" in ";}
+inout_stat: t_OUT {$$="out";}
-delay_mechanism : t_TRANSPORT
- | t_REJECT expr t_INERTIAL
- | t_INERTIAL
+delay_mechanism : t_TRANSPORT { $$=" transport ";}
+ | t_REJECT expr t_INERTIAL { $$=" reject "+$2+"inertial ";}
+ | t_INERTIAL { $$=" inertial ";}
conditional_variable_assignment : variable_assign_stat_1 t_WHEN expr else_stat t_Semicolon
conditional_variable_assignment : variable_assign_stat_1 t_WHEN expr t_Semicolon
@@ -1945,7 +2087,7 @@ else_stat: t_ELSE expr t_WHEN expr
else_stat: else_stat t_ELSE expr t_WHEN expr
else_stat: t_ELSE expr
-selected_variable_assignment: t_WITH expr t_SELECT choice_stat select_name t_VarAsgn sel_var_list
+selected_variable_assignment: t_WITH expr t_SELECT choice_stat select_name t_VarAsgn sel_var_list {$$="";}
sel_var_list: expr t_WHEN choices t_Comma sel_var_list
sel_var_list: sel_var_list_1
@@ -2067,22 +2209,17 @@ extern YYSTYPE vhdlScanYYlval;
void vhdlScanYYerror(const char* /*str*/)
{
-// fprintf(stderr,"\n<---error at line %d : [ %s] in file : %s ---->",s_str.yyLineNr,s_str.qstr.data(),s_str.fileName);
+ // fprintf(stderr,"\n<---error at line %d : [ %s] in file : %s ---->",s_str.yyLineNr,s_str.qstr.data(),s_str.fileName);
// exit(0);
}
+
void vhdlParse()
{
-// //myconv=conv;
- vhdlScanYYparse();
+vhdlScanYYparse();
}
-//int lex(void)
-//{
-// return myconv->doLex();
-//}
-
-VhdlContainer* getVhdlCont()
+struct VhdlContainer* getVhdlCont()
{
return &s_str;
}
@@ -2109,7 +2246,7 @@ static void addCompInst(char *n, char* instName, char* comp,int iLine)
current->args=lastCompound->name; // architecture name
current->includeName=comp; // component/enity/configuration
- //printf(" \n genlable: [%s] inst: [%s] name: [%s] \n",genLabels.data(),instName,n);
+ //printf(" \n genlable: [%s] inst: [%s] name: [%s] %d\n",n,instName,comp,iLine);
if (lastCompound)
{
@@ -2147,12 +2284,13 @@ static void popConfig()
{
assert(currNode);
currNode=currNode->prevNode;
- // printf("\n pop arch %s ",currNode->arch.data());
+ printf("\n pop arch %s ",currNode->arch.data());
}
static void addConfigureNode(const char* a,const char*b, bool isRoot,bool isLeave,bool inlineConf)
{
- VhdlConfNode* co;
+ assert(false);
+ VhdlConfNode* co;
QCString ent,arch,lab;
ent=a;
lab = VhdlDocGen::parseForConfig(ent,arch);
@@ -2190,7 +2328,7 @@ static void addConfigureNode(const char* a,const char*b, bool isRoot,bool isLeav
}
}// addConfigure
-//------------------------------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------------------
static bool isFuncProcProced()
{
@@ -2215,7 +2353,6 @@ static void initEntry(Entry *e)
static void addProto(const char *s1,const char *s2,const char *s3,
const char *s4,const char *s5,const char *s6)
{
- // (void)s3; // avoid unused warning
(void)s5; // avoid unused warning
static QRegExp reg("[\\s]");
QCString name=s2;
@@ -2258,9 +2395,10 @@ static void createFunction(const QCString &impure,int spec,
const QCString &fname)
{
int it=0;
- current->bodyLine=getParsedLine(spec);
current->spec=spec;
current->section=Entry::FUNCTION_SEC;
+
+if(impure=="impure" || impure=="pure")
current->exception=impure;
if (parse_sec==GEN_SEC)
@@ -2287,8 +2425,9 @@ static void createFunction(const QCString &impure,int spec,
current->args=fname;
current->name=impure;
if (!fname.isEmpty())
+ VhdlDocGen::deleteAllChars(current->args,' ');
{
- QStringList q1=QStringList::split(',',fname);
+ QStringList q1=QStringList::split(",",fname);
for (uint ii=0;ii<q1.count();ii++)
{
Argument *arg=new Argument;
@@ -2296,20 +2435,21 @@ static void createFunction(const QCString &impure,int spec,
current->argList->append(arg);
}
}
+ return;
}
- current->startLine=getParsedLine(it);
- current->bodyLine=getParsedLine(it);
+
+ current->startLine=getParsedLine(it);
+ current->bodyLine=getParsedLine(it);
+
}
static void addVhdlType(const QCString &name,int startLine,int section,int spec,
const char* args,const char* type,Protection prot)
{
static QRegExp reg("[\\s]");
-
- //int startLine=getParsedLine(spec);
-
- if (isFuncProcProced())
+
+ if (isFuncProcProced() || VhdlDocGen::getFlowMember())
{
return;
}
@@ -2379,3 +2519,50 @@ static void newEntry()
initEntry(current);
}
+void createFlow(QCString val)
+{
+
+ if(!VhdlDocGen::getFlowMember()) return;
+ QCString q,ret;
+
+ if(currP==VhdlDocGen::FUNCTION)
+ {
+ q=":function( ";
+ FlowNode::alignFuncProc(q,tempEntry->argList,true);
+ q+=")";
+ }
+ else if(currP==VhdlDocGen::PROCEDURE)
+ {
+ q=":procedure (";
+ FlowNode::alignFuncProc(q,tempEntry->argList,false);
+ q+=")";
+ }
+ else {
+ q=":process( "+tempEntry->args;
+ q+=")";
+ }
+
+ q.prepend(VhdlDocGen::getFlowMember()->name().data());
+
+ FlowNode::addFlowNode(FlowNode::START_NO,q,0);
+
+ if(!val.isEmpty())
+ FlowNode::addFlowNode(FlowNode::VARIABLE_NO,val,0);
+
+ if(currP==VhdlDocGen::FUNCTION)
+ {
+ ret="end function ";
+ }
+ else if(currP==VhdlDocGen::PROCEDURE)
+ ret="end procedure";
+ else
+ ret="end process ";
+
+ FlowNode::addFlowNode(FlowNode::END_NO,ret,0);
+ // FlowNode::printFlowList();
+ FlowNode::writeFlowNode();
+ currP=0;
+ }
+
+
+ \ No newline at end of file
diff --git a/src/vhdlscanner.l b/src/vhdlscanner.l
index a13a51c..e7de626 100644
--- a/src/vhdlscanner.l
+++ b/src/vhdlscanner.l
@@ -114,7 +114,7 @@ static struct
} str_doc;
#define YY_NEVER_INTERACTIVE 1
-#define YY_USER_ACTION num_chars += vhdlScanYYleng;
+#define YY_USER_ACTION num_chars += (int)vhdlScanYYleng;
#define MAX_KEYWORD_LEN 20