Commit 5c424c55 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.7.5.1

parent 9be75800
DOXYGEN Version 1.7.5
DOXYGEN Version 1.7.5.1
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (14 August 2011)
Dimitri van Heesch (21 August 2011)
DOXYGEN Version 1.7.5
DOXYGEN Version 1.7.5.1
Please read INSTALL for compilation instructions.
......@@ -26,4 +26,4 @@ forum.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (14 August 2011)
Dimitri van Heesch (dimitri@stack.nl) (21 August 2011)
......@@ -191,7 +191,7 @@ void MainWindow::about()
t << QString::fromAscii("<qt><center>A tool to configure and run doxygen version ")+
QString::fromAscii(versionString)+
QString::fromAscii(" on your source files.</center><p><br>"
"<center>Written by<br> Dimitri van Heesch<br>&copy; 2000-2010</center><p>"
"<center>Written by<br> Dimitri van Heesch<br>&copy; 2000-2011</center><p>"
"</qt>");
QMessageBox::about(this,tr("Doxygen GUI"),msg);
}
......
......@@ -17,7 +17,7 @@
doxygen_version_major=1
doxygen_version_minor=7
doxygen_version_revision=5
doxygen_version_revision=5.1
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=NO
......
/******************************************************************************
*
*
*
* Copyright (C) 1997-2003 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
/*! \page doxysearch_usage Doxysearch usage
Doxysearch is a small, fast and highly portable search engine that allows
you to search for strings or words in the documentation generated by
<a href="doxygen_usage.html">doxygen</a> or
in the Qt documentation (see <a href="#searchqt">below</a>).
Doxysearch must be run as a CGI binary. This implies the following:
<ul>
<li> There must be a HTTP daemon running on the system where you want to
install the documentation (the <em>target</em>)
<li> You must have permission to install and execute a CGI binary on the
target.
</ul>
Ask your system administrator or provider if you are unsure if this is possible.
In order to be able to search fast and efficient, doxysearch does not
search the generated documentation directly. Instead, it uses an
<em>index file</em>, that should be generated with
<a href="doxytag_usage.html">doxytag</a>. The index file is extracted from
the generated HTML files and contains all words and substrings of words
present in the HTML files, in a compact form, together with their
frequencies and links. Although I tried to store all information
as compactly as possible, the size of the index is still quite large.
Usually it is about the same size as the original HTML files.
I have tried to make the search engine highly portable, because it
must run on the target system. As a result doxysearch does not require the
Qt library. All that is required to build doxysearch is a C++ compiler.
If you are using \c g++ for example, you can build the search engine manually,
by typing:
\verbatim
g++ doxysearch.cpp -o doxysearch
\endverbatim
<a name="se"></a>
<h3>Generating the search engine</h3>
To include a search engine in the documentation generated by doxygen
follow these steps:
<ol>
<li>Generate a configuration file with
<a href="doxygen_usage.html">doxygen</a> using the
<code>-g</code> option, if you haven't done this already.
<li>Edit the search engine section (see section \ref config_search of
the configuration file).
Make sure the \c SEARCHENGINE tag is set to \c YES
and that all paths are correct.
<li>Use <a href="doxygen_usage.html">doxygen</a> to generate the
documentation. Apart from the documentation, Doxygen will create the
following files:
<ul>
<li>A small shell script. The name of the script is determined by the
\c CGI_NAME tag in the configuration file.
The script is a small wrapper that calls \c doxysearch with
the correct parameters. Using this script allows multiple
search engines for different projects to be present in one directory.
<li>\c search.cfg: this file is a small configuration file
for the search engine. It contains two lines of text. The first line
should be the absolute URL to the documentation. The second line should
be the absolute URL to the CGI script. This information is taken from
the configuration file.
<li>\c search.gif: this is the image that is used for the search button.
</ul>
\par Note:
On the Windows platform Unix shell scripts cannot be used.
In fact the HTTP daemon that I tried (apache for Windows) only
recognized <code>.cgi</code> files that were renamed
executables (so DOS batch files do not seem to work either). Therefore,
on Windows a small C program will be generated by doxygen.
You should compile and link the program with your favourite
compiler and change the extension of the executable from
<code>.exe</code> to <code>.cgi</code>.
<li>Copy (or move) the CGI script to the directory where the CGI binaries
are located.
This is usually a special directory on your system or in your
home directory.
Consult the manual of your HTTP daemon or your system administrator to
find out where this directory resides on your system.
<li>Go to the directory where the generated HTML files are located and run
doxytag as follows:
<pre>doxytag -s search.idx</pre>
This will create a search index with the name <code>search.idx</code>.
Currently the index file <em>must</em> be called like this.
<li>If you change the location of the search engine or the documentation
and you do not want to regenerate the HTML output, you can simply edit
the generated search.cfg file and run the generated
<a href="installdox_usage.html">installdox</a> script to correct
the links in the documentation.
</ol>
<a name="searchqt">
<h3>Creating a search engine to search in the Qt documentation</h3>
</a>
Using <code>doxytag</code> and <code>doxysearch</code> it is possible to create a search engine for
the Qt documentation, without needing the sources!
This can be done by carefully following these steps:
<ol>
<li>Go to the html directory of the Qt-distribution:
<pre>cd \$QTDIR/html</pre>
<li>Generate the search index by typing:
<pre>doxytag -s search.idx</pre>
in the directory where the HTML files are located.
This will parse all files and build a search index.
Apart from the file <code>search.idx</code> two other files
will be generated: <code>search.gif</code> and <code>search.cgi</code>
\par Note:
Doxytag requires quite a large amount of memory to
generate the search index (about 30 MB on my Linux box)!
The resulting index file requires about 3 MB of space on your disk.
<li>Edit the shell script <code>search.cgi</code> with a text editor.
Fill in the absolute path to the <code>doxysearch</code> binary after
the <code>DOXYSEARCH=</code> tag.
On my system this becomes:
<pre>DOXYSEARCH=/usr/local/bin/doxysearch</pre>
Fill in the absolute path to the qt documentation after the
<code>DOXYPATH=</code> tag.
On my system this becomes:
<pre>DOXYPATH=/usr/local/qt/html</pre>
<li>
CGI binaries are usually located in a special directory.
Consult the manual of your HTTP daemon or your system administrator to
find out, where this directory resides on your system.
Copy (or move) the <code>search.cgi</code> script to this directory.
If needed you may change the name of the script.
On my system, this becomes:
<pre>cp search.cgi /usr/local/lib/httpd/cgi-bin/</pre>
<li>Create a text-file with the name <code>search.cfg</code>.
On the first line, you must put the <em>absolute</em> URL to the Qt
documentation.
Since, I only use the search engine on my own standalone system, I use
the <code>file:</code> protocol.
On the second line, you must put the <em>absolute</em> URL to the
cgi script.
On my system the resulting file looks like this:
\verbatim
file:///usr/local/qt/html
http://blizzard/cgi-bin/search.cgi
\endverbatim
<li>Add a link to the search engine in the Qt documentation.
On my system, I have put a line
\verbatim
<li><a href="http://blizzard/cgi-bin/search.cgi">Search the documentation<a>
\endverbatim
in the additional information section of the <code>index.html</code> file.
<li>Start your favourite web browser and click on the link.
If everything is OK, you should get a page where you can enter
search terms.
</ol>
*/
/******************************************************************************
*
*
*
* Copyright (C) 1997-2008 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
/*! \page history Doxygen History
<h2>Version 1.2.0</h2>
<h3>Major new features:</h3>
<ul>
<li>Support for RTF output.
<li>Using the dot tool of the AT\&T's GraphViz package, doxygen can now
generate inheritance diagrams, collaboration diagrams, include
dependency graphs, included by graphs and graphical inheritance overviews.
<li>Function arguments can now be documented with separate comment blocks.
<li>Initializers and macro definitions are now included in the documentation.
<li>Variables and typedefs are now put in their own section.
<li>Old configuration files can be upgraded using the -u option without
loosing any changes.
<li>Using the \\if and \\endif commands, doxygen can conditionally
include documentation blocks.
<li>Added Doc++ like support for member grouping.
<li>Doxygen now has a GUI front-end called doxywizard (based on Qt-2.1)
<li>All info about configuration options is now concentrated in a new
tool called configgen. This tool can generate the configuration
parser and GUI front-end from source templates.
<li>Better support for the using keyword.
<li>New transparent mini logo that is put in the footer of all HTML pages.
<li>Internationalization support for the Polish, Portuguese and Croatian language.
<li>Todo list support.
<li>If the source browser is enabled, for a function, a list of function whose
implementation calls that function, is generated.
<li>All source code fragments are now syntax highlighted in the HTML output.
The colors can be changed using cascading style sheets.
</ul>
<h2>Version 1.0.0</h2>
<h3>Major new features:</h3>
<ul>
<li>Support for templates and namespaces.
<li>Internationalization support. Currently supported languages are:
English, Czech, German, Spanish, Finnish, French, Italian, Japanese,
Dutch, and Swedish.
<li>Automatic generation of inheritance diagrams for sub and super classes.
<li>Support for man page, compressed HTML help, and hyperlinked PDF output.
<li>Cross-referencing documentation with source code and source inlining.
<li>LaTeX formulas can be included in the documentation.
<li>Support for parsing Corba and Microsoft IDL.
<li>Images can be included in the documentation.
<li>Improved parsing and preprocessing.
</ul>
<h2>Version 0.4</h2>
<h3>Major new features:</h3>
<ul>
<li>LaTeX output generation.
<li>Full JavaDoc support.
<li>Build-in C-preprocessor for correct conditional parsing of source code
that is read by Doxygen.
<li>Build-in HTML to LaTeX converter. This allows you to use HTML tags in
your documentation, while doxygen still generates proper LaTeX output.
<li>Many new commands (there are now more than 60!) to document
more entities, to make the documentation look nicer, and to include
examples or pieces of examples.
<li>Enum types, enum values, typedefs, \#defines, and files can now be
documented.
<li>Completely new documentation, that is now generated by Doxygen.
<li>A lot of small examples are now included.
</ul>
<h2>Version 0.3</h2>
<h3>Major new features:</h3>
<ul>
<li>A PHP based search engine that allows you to search through the generated
documentation.
<li>A configuration file instead of command-line options. A default
configuration file can be generated
by <a href="doxygen_usage.html">doxygen</a>.
<li>Added an option to generate output for undocumented classes.
<li>Added an option to generate output for private members.
<li>Every page now contains a condensed index page, allowing much faster
navigation through the documentation.
<li>Global and member variables can now be documented.
<li>A project name can now given, which will be included in the
documentation.
</ul>
<h2>Version 0.2</h2>
<h3>Major new features:</h3>
<ul>
<li>Blocks of code are now parsed. Function calls and variables are
replaced by links to their documentation if possible.
<li>Special example documentation block added. This can be used to
provide cross references between the documentation and some example code.
<li>Documentation blocks can now be placed inside the body of a class.
<li>Documentation blocks with line range may now be created using
special <code>//!</code> C++ line comments.
<li>Unrelated members can now be documented. A page containing a
list of these members is generated.
<li>Added an <code>\\include</code> command to insert blocks of source code
into the documentation.
<li>Warnings are generated for members that are undocumented.
<li>You can now specify your own HTML headers and footers for the
generated pages.
<li>Option added to generated indices containing all external classes
instead of only the used ones.
</ul>
<h2>Version 0.1</h2>
Initial version.
*/
......@@ -138,9 +138,9 @@ when the translator was updated.
</tr>
<tr bgcolor="#ffffff">
<td>French</td>
<td>Xavier Outhier</td>
<td>xouthier at yahoo dot fr</td>
<td>1.6.3</td>
<td>David Martinet<br/>Xavier Outhier</td>
<td>contact at e-concept-applications dot fr<br/>xouthier at yahoo dot fr</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>German</td>
......@@ -348,7 +348,8 @@ when the translator was updated.
\hline
Finnish & Antti Laine & {\tt\tiny antti dot a dot laine at tut dot fi} & 1.6.0 \\
\hline
French & Xavier Outhier & {\tt\tiny xouthier at yahoo dot fr} & 1.6.3 \\
French & David Martinet & {\tt\tiny contact at e-concept-applications dot fr} & up-to-date \\
~ & Xavier Outhier & {\tt\tiny xouthier at yahoo dot fr} & ~ \\
\hline
German & Peter Grotrian & {\tt\tiny Peter dot Grotrian at pdv-FS dot de} & up-to-date \\
~ & Jens Seidel & {\tt\tiny jensseidel at users dot sf dot net} & ~ \\
......
......@@ -64,6 +64,7 @@ TranslatorFinnish
Antti Laine: antti dot a dot laine at tut dot fi
TranslatorFrench
David Martinet: contact at e-concept-applications dot fr
Xavier Outhier: xouthier at yahoo dot fr
TranslatorGerman
......
......@@ -10,7 +10,7 @@ Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Serbian,
SerbianCyrilic, Slovak, Slovene, Spanish, Swedish, Turkish, Ukrainian,
and Vietnamese.
Of them, 14 translators are up-to-date, 25 translators are based on
Of them, 15 translators are up-to-date, 24 translators are based on
some adapter class, and 2 are English based.
----------------------------------------------------------------------
......@@ -29,6 +29,7 @@ still may be some details listed even for them:
TranslatorDanish -- Reimplementation using UTF-8 suggested.
TranslatorDutch
TranslatorEnglish
TranslatorFrench -- Reimplementation using UTF-8 suggested.
TranslatorGerman
TranslatorGreek
TranslatorPortuguese
......@@ -52,9 +53,6 @@ must be implemented to become up-to-date:
TranslatorItalian 1.7.5 3 methods to implement (1 %)
TranslatorEsperanto 1.7.5 3 methods to implement (1 %)
TranslatorPolish 1.6.3 7 methods to implement (3 %)
TranslatorFrench 1.6.3 6 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorVietnamese 1.6.0 12 methods to implement (5 %)
TranslatorSwedish 1.6.0 12 methods to implement (5 %)
Note: Reimplementation using UTF-8 suggested.
......@@ -253,19 +251,10 @@ TranslatorFinnish (TranslatorAdapter_1_6_0) 12 methods to implement (5 %)
virtual QCString trIncludesFileIn(const char * name)
TranslatorFrench (TranslatorAdapter_1_6_3) 6 methods to implement (2 %)
TranslatorFrench (Translator)
----------------
Implements 222 of the required methods (97 %).
Missing methods (should be implemented):
virtual QCString trDateTime(int year, int month, int day, int dayOfWeek, int hour, int minutes, int seconds, bool includeTime)
virtual QCString trFileIn(const char * name)
virtual QCString trDirDepGraph(const char * name)
virtual QCString trDirDependency(const char * name)
virtual QCString trCopyright()
virtual QCString trIncludesFileIn(const char * name)
Implements 228 of the required methods (100 %).
TranslatorHungarian (TranslatorAdapter_1_4_6) 36 methods to implement (15 %)
......
......@@ -4,7 +4,7 @@
* \author John Doe
* \author Jan Doe
* \version 4.1a
* \date 1990-2010
* \date 1990-2011
* \pre First initialize the system.
* \bug Not all memory is freed when deleting an object of this class.
* \warning Improper use can crash your application
......
......@@ -129,7 +129,7 @@ IGNORE_PREFIX = Q
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
GENERATE_HTML = NO
HTML_OUTPUT =
HTML_FILE_EXTENSION = .html
HTML_HEADER =
......@@ -179,7 +179,7 @@ SERVER_BASED_SEARCH = YES
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
GENERATE_LATEX = NO
LATEX_OUTPUT =
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
......@@ -212,7 +212,7 @@ MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = YES
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
......
......@@ -72,14 +72,18 @@ bool CiteDict::writeAux()
if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
if (!bibFile.isEmpty())
{
QFileInfo fi(bibFile);
QFileInfo fi(bibFile); // open file (with .bib extension)
if (fi.exists())
{
if (!copyFile(bibFile,m_baseFileName+"_"+bibFile))
{
return FALSE;
}
t << m_baseFileName+"_"+bibFile;
if (bibFile.right(4)==".bib")
{
bibFile = bibFile.left(bibFile.length()-4);
}
t << m_baseFileName+"_"+bibFile; // write name (without bib extension)
bibdata = citeDataList.next();
if (bibdata)
{
......@@ -128,6 +132,10 @@ void CiteDict::writeLatexBibliography(FTextStream &t)
while (bibdata)
{
QCString bibFile = bibdata;
if (bibFile.right(4)==".bib")
{
bibFile = bibFile.left(bibFile.length()-4);
}
if (!bibFile.isEmpty())
{
t << bibFile;
......@@ -268,11 +276,7 @@ void CiteDict::resolve()
QStrList &citeBibFiles = Config_getList("CITE_BIB_FILES");
if (citeBibFiles.count()==0 || m_entries.count()==0) return; // nothing to cite
QCString &outputDirectory = Config_getString("OUTPUT_DIRECTORY");
if (outputDirectory.isEmpty())
{
outputDirectory=QDir::currentDirPath();
}
QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
QDir d(outputDirectory);
d.mkdir("bib");
......
......@@ -1716,12 +1716,11 @@ static int yyread(char *buf,int max_size)
B [ \t]
BN [ \t\n\r]
ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
SCOPESEP ("::"|"\\"){BN}*
SCOPEPRE ({SCOPESEP}{ID}{BN}*)*{SCOPESEP}
SCOPENAME {SCOPEPRE}?(("~"{BN}*)?{ID})
SEP ("::"|"\\")
SCOPENAME ({SEP}{BN}*)?({ID}{BN}*{SEP}{BN}*)*("~"{BN}*)?{ID}
TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">"
SCOPETNAME (((({ID}{TEMPLIST}?){BN}*)?("::"|"\\"){BN}*)*)((~{BN}*)?{ID})
SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*("::"|"\\"){BN}*)+
SCOPETNAME (((({ID}{TEMPLIST}?){BN}*)?{SEP}{BN}*)*)((~{BN}*)?{ID})
SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*{SEP}{BN}*)+
KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize"|"@property")
KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"set"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|{KEYWORD_OBJC})
FLOWKW ("break"|"case"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"for"|"foreach"|"for each"|"goto"|"if"|"return"|"switch"|"throw"|"throws"|"try"|"while"|"@try"|"@catch"|"@finally")
......
......@@ -48,8 +48,7 @@ class DefinitionImpl
public:
DefinitionImpl();
~DefinitionImpl();
void init(const char *df,int dl,
const char *n);
void init(const char *df, const char *n);
SectionDict *sectionDict; // dictionary of all sections, not accessible
......@@ -76,7 +75,6 @@ class DefinitionImpl
// where the item was found
QCString defFileName;
int defLine;
QCString defFileExt;
SrcLangExt lang;
......@@ -103,8 +101,7 @@ DefinitionImpl::~DefinitionImpl()
delete inbodyDocs;
}
void DefinitionImpl::init(const char *df,int dl,
const char *n)
void DefinitionImpl::init(const char *df, const char *n)
{
defFileName = df;
int lastDot = defFileName.findRev('.');
......@@ -112,7 +109,6 @@ void DefinitionImpl::init(const char *df,int dl,
{
defFileExt = defFileName.mid(lastDot);
}
defLine = dl;
QCString name = n;
if (name!="<globalScope>")
{
......@@ -280,8 +276,9 @@ Definition::Definition(const char *df,int dl,
const char *d,bool isSymbol)
{
m_name = name;
m_defLine = dl;
m_impl = new DefinitionImpl;
m_impl->init(df,dl,name);
m_impl->init(df,name);
m_isSymbol = isSymbol;
if (isSymbol) addToMap(name,this);
_setBriefDescription(b,df,dl);
......@@ -892,12 +889,17 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
const QCString &text,MemberSDict *members,bool /*funcOnly*/)
{
LockingPtr<Definition> lock(this,this); // since this can be a memberDef
// accessing other memberDefs prevent
// it from being flushed to disk
static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
static bool refLinkSource = Config_getBool("REFERENCES_LINK_SOURCE");
ol.pushGeneratorState();
if (members)
{
members->sort();
ol.startParagraph();
ol.parseText(text);
ol.docify(" ");
......@@ -1118,19 +1120,6 @@ QCString Definition::qualifiedName() const
count--;
return m_impl->qualifiedName;
}
#if 0
if (count>20)
{
printf("Definition::qualifiedName() Infinite recursion detected! Type=%d\n",definitionType());
printf("Trace:\n");
Definition *d = (Definition *)this;
for (int i=0;d && i<20;i++)
{
printf(" %s\n",d->name().data());
d = d->getOuterScope();
}
}
#endif
//printf("start %s::qualifiedName() localName=%s\n",name().data(),m_impl->localName.data());
if (m_impl->outerScope==0)
......@@ -1400,6 +1389,9 @@ QCString Definition::briefDescription() const
QCString Definition::briefDescriptionAsTooltip() const
{
makeResident();
LockingPtr<Definition> lock(this,this); // since this can be a memberDef
// accessing other memberDefs prevent
// it from being flushed to disk
if (m_impl->brief)
{
if (m_impl->brief->tooltip.isEmpty() && !m_impl->brief->doc.isEmpty())
......@@ -1470,12 +1462,6 @@ QCString Definition::getDefFileExtension() const
return m_impl->defFileExt;
}
int Definition::getDefLine() const
{
makeResident();
return m_impl->defLine;
}
bool Definition::isHidden() const
{
makeResident();
......@@ -1559,14 +1545,10 @@ void Definition::setReference(const char *r)
SrcLangExt Definition::getLanguage() const
{
makeResident();
return m_impl->lang;
}
void Definition::_setSymbolName(const QCString &name)
{
m_symbolName=name;
}
void Definition::setHidden(bool b)
{
makeResident();
......@@ -1585,13 +1567,21 @@ void Definition::setLocalName(const QCString name)
m_impl->localName=name;
}
void Definition::setLanguage(SrcLangExt lang)
{
makeResident();
m_impl->lang=lang;
}
void Definition::makeResident() const
{
}
void Definition::setLanguage(SrcLangExt lang)
//---------------
void Definition::_setSymbolName(const QCString &name)
{
m_impl->lang=lang;
m_symbolName=name;
}
void Definition::flushToDisk() const
......@@ -1617,7 +1607,6 @@ void Definition::flushToDisk() const
marshalBool (Doxygen::symbolStorage,m_impl->isArtificial);
marshalObjPointer (Doxygen::symbolStorage,m_impl->outerScope);
marshalQCString (Doxygen::symbolStorage,m_impl->defFileName);
marshalInt (Doxygen::symbolStorage,m_impl->defLine);
marshalQCString (Doxygen::symbolStorage,m_impl->defFileExt);
marshalInt (Doxygen::symbolStorage,(int)m_impl->lang);
marshalUInt(Doxygen::symbolStorage,END_MARKER);
......@@ -1650,7 +1639,6 @@ void Definition::loadFromDisk() const
m_impl->isArtificial = unmarshalBool (Doxygen::symbolStorage);
m_impl->outerScope = (Definition *)unmarshalObjPointer (Doxygen::symbolStorage);
m_impl->defFileName = unmarshalQCString (Doxygen::symbolStorage);
m_impl->defLine = unmarshalInt (Doxygen::symbolStorage);
m_impl->defFileExt = unmarshalQCString (Doxygen::symbolStorage);
m_impl->lang = (SrcLangExt)unmarshalInt(Doxygen::symbolStorage);
marker = unmarshalUInt(Doxygen::symbolStorage);
......
......@@ -179,7 +179,7 @@ class Definition : public DefinitionIntf, public LockableObj
QCString getDefFileExtension() const;
/*! returns the line number at which the definition was found */
int getDefLine() const;
int getDefLine() const { return m_defLine; }
/*! Returns TRUE iff the definition is documented
* (which could be generated documentation)
......@@ -348,7 +348,7 @@ class Definition : public DefinitionIntf, public LockableObj
QCString m_name;
bool m_isSymbol;
QCString m_symbolName;
int m_defLine;
};
class DefinitionList : public QList<Definition>, public DefinitionIntf
......
......@@ -81,6 +81,7 @@
#include "vhdldocgen.h"
#include "eclipsehelp.h"
#include "cite.h"
#include "filestorage.h"
#include "layout.h"
......@@ -1175,6 +1176,29 @@ static void addClassToContext(EntryNav *rootNav)
fullName.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
cd->setLanguage(root->lang);
cd->setHidden(root->hidden);
cd->setArtificial(root->artificial);
cd->setTypeConstraints(root->typeConstr);
//printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data());
ArgumentList *tArgList =
getTemplateArgumentsFromName(fullName,root->tArgLists);
//printf("class %s template args=%s\n",fullName.data(),
// tArgList ? tempArgListToString(tArgList).data() : "<none>");
cd->setTemplateArguments(tArgList);
cd->setProtection(root->protection);
cd->setIsStatic(root->stat);
// file definition containing the class cd
cd->setBodySegment(root->bodyLine,root->endBodyLine);
cd->setBodyDef(fd);
// see if the class is found inside a namespace
//bool found=addNamespace(root,cd);
// the empty string test is needed for extract all case
cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
cd->insertUsedFile(root->fileName);
// add class to the list
......@@ -1415,7 +1439,7 @@ static void processTagLessClasses(ClassDef *rootCd,
ClassDef *tagParentCd,
const QCString &prefix,int count)
{
printf("%d: processTagLessClasses %s\n",count,cd->name().data());
//printf("%d: processTagLessClasses %s\n",count,cd->name().data());
//printf("checking members for %s\n",cd->name().data());
if (cd->getInnerClasses())
{
......@@ -1433,7 +1457,7 @@ static void processTagLessClasses(ClassDef *rootCd,
ClassDef *icd;
for (it.toFirst();(icd=it.current());++it)
{
printf(" member %s: type='%s'\n",md->name().data(),type.data());
//printf(" member %s: type='%s'\n",md->name().data(),type.data());
//printf(" comparing '%s'<->'%s'\n",type.data(),icd->name().data());
if (type.find(icd->name())!=-1) // matching tag less struct/union
{
......@@ -8900,6 +8924,7 @@ static void parseFiles(Entry *root,EntryNav *rootNav)
bool ambig;
FileDef *fd=findFileDef(Doxygen::inputNameDict,fileName,ambig);
ASSERT(fd!=0);
//printf("root->createNavigationIndex for %s\n",fd->name().data());
root->createNavigationIndex(rootNav,g_storage,fd);
s=g_inputFiles.next();
......@@ -10169,6 +10194,7 @@ void parseInput()
if (cacheSize>9) cacheSize=9;
Doxygen::symbolCache = new ObjCache(16+cacheSize); // 16 -> room for 65536 elements,
// ~2.0 MByte "overhead"
//Doxygen::symbolCache = new ObjCache(1); // only to stress test cache behaviour
Doxygen::symbolStorage = new Store;
#ifdef HAS_SIGNALS
......@@ -10331,15 +10357,6 @@ void parseInput()
* Parse source files *
**************************************************************************/
parseFiles(root,rootNav);
g_storage->close();
if (!g_storage->open(IO_ReadOnly))
{
err("Failed to open temporary storage file %s for reading",
Doxygen::entryDBFileName.data());
exit(1);
}
//printNavTree(rootNav,0);
// we are done with input scanning now, so free up the buffers used by flex
......@@ -10352,6 +10369,20 @@ void parseInput()
//g_storage.close();
//exit(1);
if (Config_getBool("BUILTIN_STL_SUPPORT"))
{
addSTLClasses(rootNav);
}
parseFiles(root,rootNav);
g_storage->close();
if (!g_storage->open(IO_ReadOnly))
{
err("Failed to open temporary storage file %s for reading",
Doxygen::entryDBFileName.data());
exit(1);
}
/**************************************************************************
* Gather information *
**************************************************************************/
......@@ -10364,11 +10395,6 @@ void parseInput()
buildDirectories();
findDirDocumentation(rootNav);
if (Config_getBool("BUILTIN_STL_SUPPORT"))
{
addSTLClasses(rootNav);
}
msg("Building namespace list...\n");
buildNamespaceList(rootNav);
findUsingDirectives(rootNav);
......
......@@ -22,6 +22,7 @@
#include "util.h"
#include "section.h"
#include "doxygen.h"
#include "filestorage.h"
//------------------------------------------------------------------
......
/******************************************************************************
*
* Copyright (C) 1997-2011 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#include <qfile.h>
#include <assert.h>
#include "store.h"
#ifndef FILESTORAGE_H
#define FILESTORAGE_H
/** @brief Store implementation based on a file.
Writing is linear, after that the file is re-opened for reading.
Reading is random (seek+read).
*/
class FileStorage : public StorageIntf
{
public:
FileStorage() : m_readOnly(FALSE) {}
FileStorage( const QString &name) :
m_readOnly(FALSE) { m_file.setName(name); }
int read(char *buf,uint size) { return m_file.readBlock(buf,size); }
int write(const char *buf,uint size) { assert(m_readOnly==FALSE); return m_file.writeBlock(buf,size); }
bool open( int m ) { m_readOnly = m==IO_ReadOnly; return m_file.open(m); }
bool seek(int64 pos) { return m_file.seek(pos); }
int64 pos() const { return m_file.pos(); }
void close() { m_file.close(); }
void setName( const char *name ) { m_file.setName(name); }
private:
bool m_readOnly;
QFile m_file;
};
#if 0 // experimental version using mmap after opening the file as read only.
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
class FileStorage : public StorageIntf
{
public:
FileStorage() : m_readOnly(FALSE), m_map(0), m_off(0), m_size(0) {}
FileStorage( const QString &name) :
m_readOnly(FALSE) { m_file.setName(name); }
void setName( const char *name ) { m_file.setName(name); }
bool open( int m )
{
if (m==IO_ReadOnly)
{
m_readOnly=TRUE;
QString name = m_file.name();
m_file.close();
m_fd = ::open(name.data(),O_RDONLY);
struct stat stat;
fstat(m_fd,&stat);
m_size = stat.st_size;
m_map = mmap(NULL,m_size,PROT_READ,MAP_SHARED,m_fd,0);
if (m_map==MAP_FAILED) perror("mmap failed");
assert(m_map!=MAP_FAILED);
m_off = 0;
return TRUE;
}
else
{
m_readOnly = FALSE;
return m_file.open(m);
}
}
int write(const char *buf,uint size)
{
assert(m_map==0);
return m_file.writeBlock(buf,size);
}
int read(char *buf,uint size)
{
assert(m_map!=0);
memcpy(buf,((char *)m_map)+m_off,size);
m_off+=size;
return size;
}
bool seek(int64 pos)
{
m_off=pos;
return TRUE;
}
int64 pos() const
{
if (m_readOnly)
{
return m_off;
}
else
{
return m_file.pos();
}
}
void close()
{
if (m_readOnly)
{
munmap(m_map,m_size);
::close(m_fd);
exit(1);
}
else
{
m_file.close();
}
}
private:
bool m_readOnly;
QFile m_file;
int m_fd;
void *m_map;
off_t m_off;
off_t m_size;
};
#endif
#endif
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2009 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* All output generated with Doxygen is not covered by this license.
*
* The GIF compression code below is based on the file ppmtogif.c of the
* netpbm package. The original copyright message follows:
*
* ---------------------------------------------------------------------------
*
* Copyright (C) 1989 by Jef Poskanzer.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation. This software is provided "as is" without express or
* implied warranty.
*
* ---------------------------------------------------------------------------
*
* The Graphics Interchange Format(c) is the Copyright property of
* CompuServe Incorporated. GIF(sm) is a Service Mark property of
* CompuServe Incorporated.
*/
#include "gifenc.h"
static const unsigned int masks[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F,
0x001F, 0x003F, 0x007F, 0x00FF,
0x01FF, 0x03FF, 0x07FF, 0x0FFF,
0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF };
GifEncoder::GifEncoder(Byte *rawBytes,Color *p,int w,int h, Byte d,
int t)
: colorResolution(8),globalPaletteFlag(0x80),bits(12),
maxMaxCode(1<<bits)
{
width = w;
height = h;
depth = d;
transIndex = t;
palette = p;
data = rawBytes;
dataPtr = data;
}
GifEncoder::~GifEncoder()
{
}
void GifEncoder::writeGIF(QFile &fp)
{
// Write the Magic header
fp.writeBlock( transIndex < 0 ? "GIF87a" : "GIF89a", 6 );
// Write the logical screen descriptor
putWord( width, fp );
putWord( height, fp );
Byte pack = globalPaletteFlag | ((colorResolution-1)<<4) | (depth-1);
putByte( pack, fp );
putByte( 0, fp ); // the background color
putByte( 0, fp ); // no aspect ration defined
// Write global color table
int i; for ( i=0 ; i< (1<<depth) ; i++)
{
putByte(palette[i].red, fp);
putByte(palette[i].green,fp);
putByte(palette[i].blue, fp);
}
if ( transIndex >= 0)
{
// Write graphic control extension (needed for GIF transparancy)
putByte( 0x21, fp); // extension introducer
putByte( 0xf9, fp); // graphic control label
putByte( 4, fp); // block size
putByte( 1, fp); // announce transparacy value
putWord( 0, fp); // zero delay time
putByte( transIndex, fp); // write transparant index
putByte( 0, fp); // end block
}
// Write the image descriptor
putByte( 0x2c, fp); // image separator
putWord( 0, fp); // image left position
putWord( 0, fp); // image top position
putWord( width, fp); // image width
putWord( height, fp); // image height
putByte( 0, fp); // no local color table, no interlacing
// Write table based image data
Byte initCodeSize = depth<=1 ? 2 : depth;
putByte( initCodeSize, fp); // LZW Minimum Code Size
compress( initCodeSize+1, fp);
putByte( 0, fp); // end of blocks
// Write GIF Trailer
putByte( 0x3b, fp);
}
void GifEncoder::compress( int ibits, QFile &outfile )
{
int i;
int entry;
initBits = ibits;
numPixels = width*height;
dataPtr = data;
clearFlag = FALSE;
nBits = initBits;
maxCode = (1<<nBits) -1;
ClearCode = (1 << (initBits - 1));
EOFCode = ClearCode + 1;
freeEntry = ClearCode + 2;
aCount = 0;
curAccum = 0;
curBits = 0;
entry = nextPixel();
int hshift = 0;
int fcode;
for ( fcode = hashTableSize; fcode < 65536L; fcode *= 2L ) ++hshift;
hshift = 8 - hshift; /* set hash code range bound */
clearHashTable(); /* clear hash table */
writeCode( ClearCode,outfile );
int c;
while ( (c = nextPixel()) != EOF )
{
fcode = (c << bits) + entry;
i = (c << hshift) ^ entry; /* xor hashing */
bool found=FALSE;
if (htab[i]==fcode)
{
entry = codetab[i];
found=TRUE;
}
else if (htab[i]>=0)
{
int disp = hashTableSize - i;
if (i==0) disp=1;
do
{
if ((i-=disp)<0) i+=hashTableSize;
if (htab[i]==fcode)
{
entry=codetab[i];
found=TRUE;
}
} while (htab[i]>0 && !found);
}
if (!found)
{
writeCode( entry, outfile );
entry = c;
if ( freeEntry < maxMaxCode )
{
codetab[i] = freeEntry++; /* code -> hashtable */
htab[i] = fcode;
}
else
{
clearHashTable();
freeEntry = ClearCode + 2;
clearFlag = TRUE;
writeCode( ClearCode, outfile );
}
}
}
writeCode( entry, outfile );
writeCode( EOFCode, outfile );
}
void GifEncoder::putWord( Word w, QFile &fp )
{
fp.putch( w & 0xff );
fp.putch( (w>>8) & 0xff );
}
void GifEncoder::putByte( Byte b, QFile &fp )
{
fp.putch( b );
}
void GifEncoder::writeCode( int code, QFile &outfile )
{
curAccum &= masks[ curBits ];
if ( curBits > 0 )
{
curAccum |= (code << curBits);
}
else
{
curAccum = code;
}
curBits += nBits;
while( curBits >= 8 )
{
writeChar( (Byte)(curAccum & 0xff),outfile );
curAccum >>= 8;
curBits -= 8;
}
/*
* If the next entry is going to be too big for the code size,
* then increase it, if possible.
*/
if ( freeEntry > maxCode || clearFlag )
{
if( clearFlag )
{
nBits = initBits;
maxCode = (1<<nBits)-1;
clearFlag = FALSE;
}
else
{
++nBits;
if ( nBits == bits )
maxCode = maxMaxCode;
else
maxCode = (1<<nBits)-1;
}
}
if ( code == EOFCode )
{
/* At EOF, write the rest of the buffer. */
while( curBits > 0 )
{
writeChar( (Byte)(curAccum & 0xff), outfile );
curAccum >>= 8;
curBits -= 8;
}
writePacket(outfile);
}
}
/*
* Add a character to the end of the current packet, and if it is 254
* characters, flush the packet to disk.
*/
void GifEncoder::writeChar( Byte c, QFile &fp )
{
accum[ aCount++ ] = c;
if( aCount >= 254 ) writePacket(fp);
}
/*
* Flush the packet to disk, and reset the accumulator
*/
void GifEncoder::writePacket(QFile &fp)
{
if ( aCount > 0 )
{
fp.putch( aCount );
fp.writeBlock( (const char *)accum, aCount );
aCount = 0;
}
}
void GifEncoder::clearHashTable() /* reset code table */
{
int *htab_p = htab;
int i; for (i=0;i<hashTableSize;i++) *htab_p++ = -1;
}
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2009 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#ifndef _GIFENC_H
#define _GIFENC_H
#include <qfile.h>
typedef unsigned char Byte;
typedef unsigned short Word;
struct Color
{
Byte red;
Byte green;
Byte blue;
};
const int hashTableSize=5003; // size of the hash table
class GifEncoder
{
public:
GifEncoder(Byte *rawBytes,Color *p,int w,int h,Byte d,int t);
~GifEncoder();
void writeGIF(QFile &fp);
protected:
void putWord( Word w, QFile &fp );
void putByte( Byte b, QFile &fp );
void compress(int csize, QFile &fp);
void writeCode(int code, QFile &fp);
void writeChar( Byte c, QFile &fp );
void writePacket(QFile &fp);
void clearHashTable();
int nextPixel()
{
if ( --numPixels < 0) return EOF;
return *dataPtr++;
}
private:
const int colorResolution; // 8 bit for Red, Green and Blue;
const int globalPaletteFlag;
const int bits;
const int maxMaxCode;
// image variables
int width; // image width
int height; // image height
Byte depth; // bits per CLUT entry
int transIndex; // index of the transparant color; -1 = none
Color *palette; // pointer to the color palette
int numPixels; // total number of pixel (i.e. width * height)
Byte *data; // pointer to the image data (one byte per pixel)
Byte *dataPtr; // pointer located at the current pixel.
// compression variables
bool clearFlag; // clear hash table flag
int freeEntry; // first free entry in the hash table
unsigned int curAccum; // encoded bit accumulator
int curBits; // number of bits in curAccum
Byte accum[256]; // Buffer for a packet
int aCount; // Number of characters so far in this 'packet'
int nBits; // number of bits/code
int maxCode; // maximum code, given n_bits
int initBits; // initial number of bits
int EOFCode; // code for signaling the end of the file
int ClearCode; // the clear code for the decompressor
// tables
int htab[hashTableSize]; // the hash table
Word codetab[hashTableSize]; // the code table
};
#endif
......@@ -1005,7 +1005,10 @@ static QCString substituteHtmlKeywords(const QCString &s,const char *title,
}
// first substitute generic keywords
QCString result = substituteKeywords(s,title);
QCString result = substituteKeywords(s,title,
convertToHtml(Config_getString("PROJECT_NAME")),
convertToHtml(Config_getString("PROJECT_NUMBER")),
convertToHtml(Config_getString("PROJECT_BRIEF")));
// additional HTML only keywords
result = substitute(result,"$stylesheet",cssFile);
......@@ -2452,6 +2455,7 @@ static bool quickLinkVisible(LayoutNavEntry::Kind kind)
switch (kind)
{
case LayoutNavEntry::MainPage: return TRUE;
case LayoutNavEntry::User: return TRUE;
case LayoutNavEntry::Pages: return indexedPages>0;
case LayoutNavEntry::Modules: return documentedGroups>0;
case LayoutNavEntry::Namespaces: return documentedNamespaces>0;
......@@ -2485,8 +2489,12 @@ static void renderQuickLinksAsTree(FTextStream &t,const QCString &relPath,Layout
{
if (entry->visible() && quickLinkVisible(entry->kind()))
{
startQuickIndexItem(t,entry->baseFile()+Doxygen::htmlFileExtension,
FALSE,FALSE,relPath);
QCString url = entry->baseFile();
if (entry->kind()!=LayoutNavEntry::User)
{
url+=Doxygen::htmlFileExtension;
}
startQuickIndexItem(t,url,FALSE,FALSE,relPath);
t << fixSpaces(entry->title());
// recursive into child list
renderQuickLinksAsTree(t,relPath,entry);
......@@ -2525,7 +2533,12 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
{
if (entry->visible() && quickLinkVisible(entry->kind()))
{
startQuickIndexItem(t,entry->baseFile()+Doxygen::htmlFileExtension,
QCString url = entry->baseFile();
if (entry->kind()!=LayoutNavEntry::User)
{
url+=Doxygen::htmlFileExtension;
}
startQuickIndexItem(t,url,
entry==hlEntry &&
(entry->children().count()>0 ||
(entry->kind()==kind && !highlightParent)
......@@ -2694,9 +2707,6 @@ void HtmlGenerator::writeSearchPage()
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
static bool disableIndex = Config_getBool("DISABLE_INDEX");
static QCString projectName = Config_getString("PROJECT_NAME");
static QCString projectBrief = Config_getString("PROJECT_BRIEF");
static QCString projectNumber = Config_getString("PROJECT_NUMBER");
static QCString projectLogo = Config_getString("PROJECT_LOGO");
// OPENSEARCH_PROVIDER {
QCString configFileName = Config_getString("HTML_OUTPUT")+"/search-config.php";
......
......@@ -956,7 +956,10 @@ void LatexGenerator::startIndexSection(IndexSections is)
else
{
QCString header = fileToString(latexHeader);
t << substituteKeywords(header,0);
t << substituteKeywords(header,0,
Config_getString("PROJECT_NAME"),
Config_getString("PROJECT_NUMBER"),
Config_getString("PROJECT_BRIEF"));
}
}
break;
......@@ -1351,7 +1354,10 @@ void LatexGenerator::endIndexSection(IndexSections is)
else
{
QCString footer = fileToString(latexFooter);
t << substituteKeywords(footer,0);
t << substituteKeywords(footer,0,
Config_getString("PROJECT_NAME"),
Config_getString("PROJECT_NUMBER"),
Config_getString("PROJECT_BRIEF"));
}
break;
}
......
......@@ -895,6 +895,13 @@ class LayoutParser : public QXmlDefaultHandler
theTranslator->trExamplesDescription(),
"examples"
},
{ "user",
LayoutNavEntry::User,
QCString(),
QCString(),
QCString(),
"user"
},
{ 0, // end of list
(LayoutNavEntry::Kind)0,
QCString(),
......@@ -945,6 +952,11 @@ class LayoutParser : public QXmlDefaultHandler
{
intro = mapping[i].intro;
}
QCString url = convertToQCString(attrib.value("url"));
if (mapping[i].kind==LayoutNavEntry::User && !url.isEmpty())
{
baseFile=url;
}
// create new item and make it the new root
m_rootNav = new LayoutNavEntry(m_rootNav,kind,kind==LayoutNavEntry::MainPage?TRUE:isVisible,baseFile,title,intro);
}
......
......@@ -123,7 +123,8 @@ struct LayoutNavEntry
Files,
FileGlobals,
Dirs,
Examples
Examples,
User
};
LayoutNavEntry(LayoutNavEntry *parent,Kind k,bool vs,const QCString &bf,
const QCString &tl,const QCString &intro,bool prepend=FALSE)
......
......@@ -644,9 +644,9 @@ MemberSDict *unmarshalMemberSDict(StorageIntf *s)
//printf(" unmarshaling key %s\n",key.data());
MemberDef *md = (MemberDef *)unmarshalObjPointer(s);
//printf(" unmarshalMemberSDict i=%d key=%s md=%p\n",i,key.data(),md);
result->append(key,md); // note: this can lead to unmarshalling another object!
result->append(key,md);
}
result->sort();
//printf("--- end unmarshalMemberSDict\n");
return result;
}
......
/******************************************************************************
*
* Copyright (C) 1997-2011 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#ifndef MARSHAL_H
#define MARSHAL_H
......@@ -25,58 +40,6 @@ class Entry;
#define NULL_LIST 0xffffffff
class FileStorage : public QFile, public StorageIntf
{
public:
FileStorage() : QFile() {}
FileStorage( const QString &name) : QFile(name) {}
int read(char *buf,uint size) { return QFile::readBlock(buf,size); }
int write(const char *buf,uint size) { return QFile::writeBlock(buf,size); }
};
class StreamStorage : public StorageIntf
{
public:
StreamStorage()
{
m_data=0;
m_offset=0;
m_len=0;
}
~StreamStorage()
{
delete m_data;
}
StreamStorage(char *data,uint len)
{
m_data=data;
m_offset=0;
m_len=len;
}
int read(char *buf,uint size)
{
int bytesLeft = QMIN((int)size,m_len-m_offset);
if (bytesLeft>0) memcpy(buf,m_data,bytesLeft);
m_offset+=bytesLeft;
return bytesLeft;
}
int write(const char *buf,uint size)
{
m_data=(char *)realloc(m_data,m_offset+size);
memcpy(m_data+m_offset,buf,size);
m_offset+=size;
m_len+=size;
return size;
}
void rewind() { m_offset=0; }
char *data() const { return m_data; }
int size() { return m_len; }
private:
char *m_data;
int m_offset;
int m_len;
};
//----- marshaling function: datatype -> byte stream --------------------
void marshalInt(StorageIntf *s,int v);
......
This diff is collapsed.
......@@ -808,10 +808,22 @@ void MemberList::setNeedsSorting(bool b)
int MemberSDict::compareItems(GCI item1, GCI item2)
{
// NOTE: this function can be triggered from unmarshalMemberSDict
// so it may not result in called to MemberDef::makeResident().
// As a result, the data returned by MemberDef::name() and
// MemberDef::getDefLine() will always be kept in memory.
MemberDef *c1=(MemberDef *)item1;
MemberDef *c2=(MemberDef *)item2;
//printf("MemberSDict::compareItems(%s,%s)\n",c1->name().data(),c2->name().data());
int cmp = stricmp(c1->name(),c2->name());
return cmp!=0 ? cmp : c1->getDefLine()-c2->getDefLine();
if (cmp)
{
return cmp;
}
else
{
return c1->getDefLine()-c2->getDefLine();
}
}
......@@ -25,6 +25,7 @@
#include <errno.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
#define BLOCK_SIZE 512 // should be >8 and a power of 2
#define BLOCK_POINTER_SIZE sizeof(portable_off_t)
......@@ -111,7 +112,7 @@ portable_off_t Store::alloc()
portable_off_t pos;
if (m_head==0) // allocate new block
{
//printf("alloc: new block\n");
//printf("alloc: new block, pos=%lld\n",(long long)m_front);
if (portable_fseek(m_file,0,SEEK_END)==-1) // go to end of the file
{
fprintf(stderr,"Store::alloc: Error seeking to end of file: %s\n",strerror(errno));
......@@ -130,7 +131,7 @@ portable_off_t Store::alloc()
}
else // reuse freed block
{
//printf("alloc: reuse block: m_head=%d\n",(int)m_head);
//printf("alloc: reuse block: pos=%lld\n",(long long)m_head->pos);
Node *node = m_head;
pos = node->pos;
// point head to next free item
......@@ -268,7 +269,7 @@ void Store::end()
void Store::release(portable_off_t pos)
{
STORE_ASSERT(m_state==Reading);
//printf("%x: Store::release\n",(int)pos);
//printf("release: block pos=%lld\n",(long long)pos);
STORE_ASSERT(pos>0 && (pos & (BLOCK_SIZE-1))==0);
// goto end of the block
portable_off_t cur = pos, next;
......@@ -396,6 +397,30 @@ void Store::printStats()
BLOCK_SIZE,(long)(m_front/BLOCK_SIZE),m_reads,m_writes);
}
void Store::dumpBlock(portable_off_t s,portable_off_t e)
{
portable_fseek(m_file,s,SEEK_SET);
int size = (int)(e-s);
uchar *buf = new uchar[size];
fread(buf,size,1,m_file);
int i,j;
for (i=0;i<size;i+=16)
{
printf("%08x: ",(int)s+i);
for (j=i;j<QMIN(size,i+16);j++)
{
printf("%02x ",buf[i+j]);
}
printf(" ");
for (j=i;j<QMIN(size,i+16);j++)
{
printf("%c",(buf[i+j]>=32 && buf[i+j]<128)?buf[i+j]:'.');
}
printf("\n");
}
portable_fseek(m_file,m_cur,SEEK_SET);
}
#ifdef STORE_TEST
int main()
......
......@@ -94,6 +94,10 @@ class Store : public StorageIntf
void printStats();
portable_off_t pos() const { return m_cur; }
void dumpBlock(portable_off_t start,portable_off_t end);
private:
enum State
{
......
......@@ -2,8 +2,8 @@
*
*
*
* Copyright (C) 1997-2010 by Dimitri van Heesch.
* Copyright (C) 2010 by Rene Zaumseil
* Copyright (C) 1997-2011 by Dimitri van Heesch.
* Copyright (C) 2010-2011 by Rene Zaumseil
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
......
......@@ -50,10 +50,10 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
const char * PersianDigits[] = { "۰", "۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹" };
for(unsigned i=0; i<str.length(); i++)
{
if (str[i] >= '0' && str[i] <= '9')
output += PersianDigits[ str[i] - '0' ];
if (str.at(i) >= '0' && str.at(i) <= '9')
output += PersianDigits[ str.at(i) - '0' ];
else
output += str[i];
output += str.at(i);
}
return output;
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
*
*
*
* Copyright (C) 1997-2010 by Dimitri van Heesch.
* Copyright (C) 1997-2011 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
......
......@@ -4711,7 +4711,8 @@ QCString showFileDefMatches(const FileNameDict *fnDict,const char *n)
//----------------------------------------------------------------------
QCString substituteKeywords(const QCString &s,const char *title)
QCString substituteKeywords(const QCString &s,const char *title,
const char *projName,const char *projNum,const char *projBrief)
{
QCString result = s;
if (title) result = substitute(result,"$title",title);
......@@ -4719,9 +4720,9 @@ QCString substituteKeywords(const QCString &s,const char *title)
result = substitute(result,"$date",dateToString(FALSE));
result = substitute(result,"$year",yearToString());
result = substitute(result,"$doxygenversion",versionString);
result = substitute(result,"$projectname",Config_getString("PROJECT_NAME"));
result = substitute(result,"$projectnumber",Config_getString("PROJECT_NUMBER"));
result = substitute(result,"$projectbrief",Config_getString("PROJECT_BRIEF"));
result = substitute(result,"$projectname",projName);
result = substitute(result,"$projectnumber",projNum);
result = substitute(result,"$projectbrief",projBrief);
result = substitute(result,"$projectlogo",stripPath(Config_getString("PROJECT_LOGO")));
return result;
}
......
......@@ -234,7 +234,8 @@ bool rightScopeMatch(const QCString &scope, const QCString &name);
bool leftScopeMatch(const QCString &scope, const QCString &name);
QCString substituteKeywords(const QCString &s,const char *title);
QCString substituteKeywords(const QCString &s,const char *title,
const char *projName,const char *projNum,const char *projBrief);
int getPrefixIndex(const QCString &name);
......
......@@ -1842,6 +1842,14 @@
<File
RelativePath="..\src\tclscanner.l"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="Lex"
CommandLine="flex -PvhdlcodeYY [AllOptions] [AdditionalOptions] [inputs]"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment