Commit 20e951b9 authored by dimitri's avatar dimitri

Release-1.6.2-20100216

parent d5dec476
DOXYGEN Version 1.6.2-20100208 DOXYGEN Version 1.6.2-20100216
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (08 February 2010) Dimitri van Heesch (16 February 2010)
DOXYGEN Version 1.6.2_20100208 DOXYGEN Version 1.6.2_20100216
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (08 February 2010) Dimitri van Heesch (dimitri@stack.nl) (16 February 2010)
#ifndef CONFIG_H
#define CONFIG_H
#include <QHash>
#include <QString>
class Input;
class QTextStream;
class QTextCodec;
bool parseConfig(
const QString &fileName,
const QHash<QString,Input *> &options
);
void writeStringValue(QTextStream &t,QTextCodec *codec,const QString &s);
#endif
/******************************************************************************
*
* $Id: config_templ.l,v 1.8 2001/01/01 10:15:16 root Exp $
*
* Copyright (C) 1997-2007 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.
*
*/
%{
/*
* includes
*/
#include "config.h"
#include "input.h"
#include <QtCore>
#define MAX_INCLUDE_DEPTH 10
/* -----------------------------------------------------------------
*
* static variables
*/
struct ConfigFileState
{
int lineNr;
FILE *file;
YY_BUFFER_STATE oldState;
YY_BUFFER_STATE newState;
QString fileName;
};
static const QHash<QString,Input*> *g_options;
static FILE *g_file;
static QString g_yyFileName;
static QString g_includeName;
static QVariant g_includePathList;
static QStack<ConfigFileState*> g_includeStack;
static int g_includeDepth;
static QVariant *g_arg;
static Input *g_curOption=0;
static QString g_elemStr;
static QTextCodec *g_codec = QTextCodec::codecForName("UTF-8");
static QString g_codecName = QString::fromAscii("UTF-8");
static int g_lastState;
static QByteArray g_tmpString;
/* -----------------------------------------------------------------
*/
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
static int yyread(char *buf,int maxSize)
{
// no file included
if (g_includeStack.isEmpty())
{
return fread(buf,1,maxSize,g_file);
}
else
{
return fread(buf,1,maxSize,g_includeStack.top()->file);
}
}
void config_err(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
}
void config_warn(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
}
static void substEnvVarsInStrList(QStringList &sl);
static void substEnvVarsInString(QString &s);
static void checkEncoding()
{
Input *option = g_options->value(QString::fromAscii("DOXYFILE_ENCODING"));
if (option && option->value().toString()!=g_codecName)
{
QTextCodec *newCodec = QTextCodec::codecForName(option->value().toString().toAscii());
if (newCodec)
{
g_codec = newCodec;
g_codecName = option->value().toString();
}
}
}
static FILE *tryPath(const QString &path,const QString &fileName)
{
QString absName=!path.isEmpty() ? path+QString::fromAscii("/")+fileName : fileName;
QFileInfo fi(absName);
if (fi.exists() && fi.isFile())
{
FILE *f = fopen(absName.toLocal8Bit(),"r");
if (f==NULL)
config_err("Error: could not open file %s for reading\n",absName.toLatin1().data());
else
return f;
}
return NULL;
}
static FILE *findFile(const QString &fileName)
{
if (QFileInfo(fileName).isAbsolute()) // absolute path
{
return tryPath(QString(), fileName);
}
// relative path, try with include paths in the list
QStringList sl = g_includePathList.toStringList();
substEnvVarsInStrList(sl);
foreach (QString s, sl)
{
FILE *f = tryPath(s,fileName);
if (f) return f;
}
// try cwd if g_includePathList fails
return tryPath(QString::fromAscii("."),fileName);
}
static void readIncludeFile(const QString &incName)
{
if (g_includeDepth==MAX_INCLUDE_DEPTH)
{
config_err("Error: maximum include depth (%d) reached, %s is not included. Aborting...\n",
MAX_INCLUDE_DEPTH,qPrintable(incName));
exit(1);
}
QString inc = incName;
substEnvVarsInString(inc);
inc = inc.trimmed();
uint incLen = inc.length();
if (inc.at(0)==QChar::fromAscii('"') &&
inc.at(incLen-1)==QChar::fromAscii('"')) // strip quotes
{
inc=inc.mid(1,incLen-2);
}
FILE *f = findFile(inc);
if (f) // see if the include file can be found
{
// For debugging
#if SHOW_INCLUDES
for (i=0;i<includeStack.count();i++) msg(" ");
msg("@INCLUDE = %s: parsing...\n",inc.toLatin1().data());
#endif
// store the state of the old file
ConfigFileState *fs=new ConfigFileState;
fs->oldState=YY_CURRENT_BUFFER;
fs->fileName=g_yyFileName;
fs->file=f;
// push the state on the stack
g_includeStack.push(fs);
// set the scanner to the include file
yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE));
fs->newState=YY_CURRENT_BUFFER;
g_yyFileName=inc;
g_includeDepth++;
}
else
{
config_err("Error: @INCLUDE = %s: not found!\n",inc.toLatin1().data());
exit(1);
}
}
%}
%option nounput
%option noyywrap
%option yylineno
%x Start
%x SkipComment
%x SkipInvalid
%x GetString
%x GetStrList
%x GetQuotedString
%x GetEnvVar
%x Include
%%
<*>\0x0d
<Start,GetString,GetStrList,SkipInvalid>"#" { BEGIN(SkipComment); }
<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { QString cmd = g_codec->toUnicode(yytext);
cmd=cmd.left(cmd.length()-1).trimmed();
g_curOption = g_options->value(cmd);
if (g_curOption==0) // oops not known
{
config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n",
qPrintable(cmd),yylineno,qPrintable(g_yyFileName));
BEGIN(SkipInvalid);
}
else // known tag
{
//option->setEncoding(encoding);
g_arg = &g_curOption->value();
switch(g_curOption->kind())
{
case Input::StrList:
g_elemStr = QString();
*g_arg = QStringList();
BEGIN(GetStrList);
break;
case Input::String:
BEGIN(GetString);
break;
case Input::Int:
BEGIN(GetString);
break;
case Input::Bool:
BEGIN(GetString);
break;
case Input::Obsolete:
config_err("Warning: Tag `%s' at line %d of file %s has become obsolete.\n"
"To avoid this warning please update your configuration "
"file using \"doxygen -u\"\n", qPrintable(cmd),
yylineno,qPrintable(g_yyFileName));
BEGIN(SkipInvalid);
break;
}
}
}
<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"+=" { QString cmd=g_codec->toUnicode(yytext);
cmd=cmd.left(cmd.length()-2).trimmed();
g_curOption = g_options->value(cmd);
if (g_curOption==0) // oops not known
{
config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n",
yytext,yylineno,qPrintable(g_yyFileName));
BEGIN(SkipInvalid);
}
else // known tag
{
switch(g_curOption->kind())
{
case Input::StrList:
g_arg = &g_curOption->value();
g_elemStr=QString();
BEGIN(GetStrList);
break;
case Input::String:
case Input::Int:
case Input::Bool:
config_err("Warning: operator += not supported for `%s'. Ignoring line at line %d, file %s\n",
yytext,yylineno,qPrintable(g_yyFileName));
BEGIN(SkipInvalid);
break;
case Input::Obsolete:
config_err("Warning: Tag `%s' at line %d of file %s has become obsolete.\n"
"To avoid this warning please update your configuration "
"file using \"doxygen -u\"\n",
qPrintable(cmd),yylineno,qPrintable(g_yyFileName));
BEGIN(SkipInvalid);
break;
}
}
}
<Start>"@INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); g_arg=&g_includePathList; *g_arg = QStringList(); g_elemStr=QString(); }
/* include a config file */
<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
readIncludeFile(g_codec->toUnicode(yytext));
BEGIN(Start);
}
<<EOF>> {
//printf("End of include file\n");
//printf("Include stack depth=%d\n",g_includeStack.count());
if (g_includeStack.isEmpty())
{
//printf("Terminating scanner!\n");
yyterminate();
}
else
{
ConfigFileState *fs = g_includeStack.pop();
fclose(fs->file);
YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
yy_switch_to_buffer( fs->oldState );
yy_delete_buffer( oldBuf );
g_yyFileName=fs->fileName;
delete fs;
g_includeDepth--;
}
}
<Start>[a-z_A-Z0-9]+ { config_err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yylineno,qPrintable(g_yyFileName)); }
<GetString,SkipInvalid>\n { BEGIN(Start); }
<GetStrList>\n {
if (!g_elemStr.isEmpty())
{
//printf("elemStr1=`%s'\n",elemStr.toLatin1().data());
*g_arg = QVariant(g_arg->toStringList() << g_elemStr);
}
BEGIN(Start);
}
<GetStrList>[ \t]+ {
if (!g_elemStr.isEmpty())
{
//printf("elemStr2=`%s'\n",elemStr.toLatin1().data());
*g_arg = QVariant(g_arg->toStringList() << g_elemStr);
}
g_elemStr = QString();
}
<GetString>[^ \"\t\r\n]+ {
*g_arg = QVariant(g_codec->toUnicode(yytext));
checkEncoding();
}
<GetString,GetStrList,SkipInvalid>"\"" { g_lastState=YY_START;
BEGIN(GetQuotedString);
g_tmpString="";
}
<GetQuotedString>"\""|"\n" {
// we add a bogus space to signal that the string was quoted. This space will be stripped later on.
g_tmpString+=" ";
//printf("Quoted String = `%s'\n",tmpString.toLatin1().data());
if (g_lastState==GetString)
{
*g_arg = g_codec->toUnicode(g_tmpString);
checkEncoding();
}
else
{
g_elemStr+=g_codec->toUnicode(g_tmpString);
}
if (*yytext=='\n')
{
config_err("Warning: Missing end quote (\") on line %d, file %s\n",yylineno,
qPrintable(g_yyFileName));
}
BEGIN(g_lastState);
}
<GetQuotedString>"\\\"" {
g_tmpString+='"';
}
<GetQuotedString>. { g_tmpString+=*yytext; }
<GetStrList>[^ \#\"\t\r\n]+ {
g_elemStr+=g_codec->toUnicode(yytext);
}
<SkipComment>\n { BEGIN(Start); }
<SkipComment>\\[ \r\t]*\n { BEGIN(Start); }
<*>\\[ \r\t]*\n { }
<*>\n
<*>.
%%
/*@ ----------------------------------------------------------------------------
*/
static void substEnvVarsInString(QString &s)
{
static QRegExp re(QString::fromAscii("\\$\\([a-z_A-Z0-9]+\\)"));
if (s.isEmpty()) return;
int p=0;
int i,l;
//printf("substEnvVarInString(%s) start\n",s.toLatin1().data());
while ((i=re.indexIn(s,p))!=-1)
{
l = re.matchedLength();
//printf("Found environment var s.mid(%d,%d)=`%s'\n",i+2,l-3,s.mid(i+2,l-3).toLatin1().data());
QString env=g_codec->toUnicode(getenv(s.mid(i+2,l-3).toLatin1()));
substEnvVarsInString(env); // recursively expand variables if needed.
s = s.left(i)+env+s.right(s.length()-i-l);
p=i+env.length(); // next time start at the end of the expanded string
}
s=s.trimmed(); // to strip the bogus space that was added when an argument
// has quotes
//printf("substEnvVarInString(%s) end\n",s.toLatin1().data());
}
static void substEnvVarsInStrList(QStringList &sl)
{
QStringList out;
foreach (QString result, sl)
{
// an argument with quotes will have an extra space at the end, so wasQuoted will be TRUE.
bool wasQuoted = (result.indexOf(QChar::fromAscii(' '))!=-1) ||
(result.indexOf(QChar::fromAscii('\t'))!=-1);
// here we strip the quote again
substEnvVarsInString(result);
//printf("Result %s was quoted=%d\n",result.toLatin1().data(),wasQuoted);
if (!wasQuoted) /* as a result of the expansion, a single string
may have expanded into a list, which we'll
add to sl. If the orginal string already
contained multiple elements no further
splitting is done to allow quoted items with spaces! */
{
int l=result.length();
int i,p=0;
// skip spaces
// search for a "word"
for (i=0;i<l;i++)
{
QChar c=0;
// skip until start of new word
while (i<l && ((c=result.at(i))==QChar::fromAscii(' ') || c==QChar::fromAscii('\t'))) i++;
p=i; // p marks the start index of the word
// skip until end of a word
while (i<l && ((c=result.at(i))!=QChar::fromAscii(' ') &&
c!=QChar::fromAscii('\t') &&
c!=QChar::fromAscii('"'))) i++;
if (i<l) // not at the end of the string
{
if (c==QChar::fromAscii('"')) // word within quotes
{
p=i+1;
for (i++;i<l;i++)
{
c=result.at(i);
if (c==QChar::fromAscii('"')) // end quote
{
out += result.mid(p,i-p);
p=i+1;
break;
}
else if (c==QChar::fromAscii('\\')) // skip escaped stuff
{
i++;
}
}
}
else if (c==QChar::fromAscii(' ') || c==QChar::fromAscii('\t')) // separator
{
out += result.mid(p,i-p);
p=i+1;
}
}
}
if (p!=l) // add the leftover as a string
{
out += result.right(l-p);
}
}
else // just goto the next element in the list
{
out += result;
}
}
sl = out;
}
//--------------------------------------------------------------------------
bool parseConfig(
const QString &fileName,
const QHash<QString,Input *> &options
)
{
QHashIterator<QString, Input*> i(options);
g_file = fopen(fileName.toLocal8Bit(),"r");
if (g_file==NULL) return false;
// reset all values
i.toFront();
while (i.hasNext())
{
i.next();
if (i.value())
{
i.value()->reset();
}
}
// parse config file
g_options = &options;
g_yyFileName = fileName;
g_includeStack.clear();
g_includeDepth = 0;
configrestart( configin );
BEGIN( Start );
configlex();
// update the values in the UI
i.toFront();
while (i.hasNext())
{
i.next();
if (i.value())
{
//printf("Updating: %s\n",qPrintable(i.key()));
i.value()->update();
}
else
{
printf("Invalid option: %s\n",qPrintable(i.key()));
}
}
fclose(g_file);
return true;
}
void writeStringValue(QTextStream &t,QTextCodec *codec,const QString &s)
{
QChar c;
bool needsEscaping=FALSE;
// convert the string back to it original encoding
//QByteArray se = codec->fromUnicode(s);
t.setCodec(codec);
const QChar *p=s.data();
if (!s.isEmpty() && !p->isNull())
{
while (!(c=*p++).isNull() && !needsEscaping)
{
needsEscaping = (c==QChar::fromAscii(' ') ||
c==QChar::fromAscii('\n') ||
c==QChar::fromAscii('\t') ||
c==QChar::fromAscii('"'));
}
if (needsEscaping)
{
t << "\"";
p=s.data();
while (!p->isNull())
{
if (*p ==QChar::fromAscii(' ') &&
*(p+1)==QChar::fromAscii('\0')) break; // skip inserted space at the end
if (*p ==QChar::fromAscii('"')) t << "\\"; // escape quotes
t << *p++;
}
t << "\"";
}
else
{
t << s;
}
}
}
...@@ -20,7 +20,7 @@ doxygen_version_minor=6 ...@@ -20,7 +20,7 @@ doxygen_version_minor=6
doxygen_version_revision=2 doxygen_version_revision=2
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package. #NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=20100208 doxygen_version_mmn=20100216
bin_dirs=`echo $PATH | sed -e "s/:/ /g"` bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
......
...@@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other ...@@ -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 than English (the default). The output language is chosen through the
configuration file (with default name and known as Doxyfile). configuration file (with default name and known as Doxyfile).
Currently (version 1.6.1), 38 languages Currently (version 1.6.2), 38 languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
Afrikaans, Arabic, Brazilian Portuguese, Catalan, Chinese, Chinese Afrikaans, Arabic, Brazilian Portuguese, Catalan, Chinese, Chinese
Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto,
......
...@@ -173,7 +173,7 @@ class Transl: ...@@ -173,7 +173,7 @@ class Transl:
self.missingMethods = None # list of prototypes to be implemented self.missingMethods = None # list of prototypes to be implemented
self.implementedMethods = None # list of implemented required methods self.implementedMethods = None # list of implemented required methods
self.adaptMinClass = None # The newest adapter class that can be used self.adaptMinClass = None # The newest adapter class that can be used
self.isDecodedTranslator = None # Flag related to internal usage of UTF-8
def __tokenGenerator(self): def __tokenGenerator(self):
"""Generator that reads the file and yields tokens as 4-tuples. """Generator that reads the file and yields tokens as 4-tuples.
...@@ -1094,6 +1094,13 @@ class Transl: ...@@ -1094,6 +1094,13 @@ class Transl:
else: else:
self.missingMethods.append(p) self.missingMethods.append(p)
# Set the least important note first if the translator is decoded.
# If yes, then it means that the implementation should be switched
# to UTF-8 later (suggestion).
self.isDecodedTranslator = self.classId in self.manager.decodedTranslators
if self.isDecodedTranslator:
self.note = 'Reimplementation using UTF-8 suggested.'
# Check whether adapter must be used or suggest the newest one. # Check whether adapter must be used or suggest the newest one.
# Change the status and set the note accordingly. # Change the status and set the note accordingly.
if self.baseClassId != 'Translator': if self.baseClassId != 'Translator':
...@@ -1277,10 +1284,44 @@ class TrManager: ...@@ -1277,10 +1284,44 @@ class TrManager:
self.numLang = None # excluding coupled En-based self.numLang = None # excluding coupled En-based
self.doxVersion = None # Doxygen version self.doxVersion = None # Doxygen version
# Capture the knowledge about translators that are not implemented
# to use UTF-8 internally.
self.decodedTranslators = self.getDecodedTranslators()
# Build objects where each one is responsible for one translator. # Build objects where each one is responsible for one translator.
self.__build() self.__build()
def getDecodedTranslators(self):
"""Parses language.cpp to find what translators do not use UTF-8 yet"""
decodedTranslators = []
# Regular expression to detect the lines like
# theTranslator=new TranslatorDecoder(new TranslatorSwedish);
rex = re.compile(r'^\s*theTranslator\s*=\s*new\s+.*$')
# Regular expression to get the (optional) TranslatorDecoder and TranslatorXXX
rex2 = re.compile(r'\bTranslator\w+')
# Parse the lines in the specific source code.
f = open(os.path.join(self.src_path, 'language.cpp'), 'rU')
for line in f:
if rex.match(line):
lst = rex2.findall(line)
if lst[0] == 'TranslatorDecoder':
decodedTranslators.append(lst[1])
f.close()
# Display warning when all translator implementations were converted
# to UTF-8.
if len(decodedTranslators) == 0:
print 'This script should be updated. All translators do use UTF-8'
print 'internally. The TranslatorDecoder adapter should be removed'
print 'from the code and its usage should not be checked any more.'
return decodedTranslators
def __build(self): def __build(self):
"""Find the translator files and build the objects for translators.""" """Find the translator files and build the objects for translators."""
......
(1.6.1) (1.6.2)
Doxygen supports the following 38 languages (sorted alphabetically): Doxygen supports the following 38 languages (sorted alphabetically):
...@@ -19,13 +19,13 @@ alphabetically). This means that they derive from the Translator class ...@@ -19,13 +19,13 @@ alphabetically). This means that they derive from the Translator class
and they implement all 221 of the required methods. Anyway, there and they implement all 221 of the required methods. Anyway, there
still may be some details listed even for them: still may be some details listed even for them:
TranslatorBrazilian TranslatorBrazilian -- Reimplementation using UTF-8 suggested.
TranslatorCzech TranslatorCzech
TranslatorDutch TranslatorDutch
TranslatorEnglish TranslatorEnglish
TranslatorFrench -- The MAX_DOT_GRAPH_HEIGHT found in trLegendDocs() TranslatorFrench -- Reimplementation using UTF-8 suggested.
TranslatorKorean TranslatorKorean -- Reimplementation using UTF-8 suggested.
TranslatorPolish -- Remove the obsolete methods (never used). TranslatorPolish -- Reimplementation using UTF-8 suggested.
---------------------------------------------------------------------- ----------------------------------------------------------------------
The following translator classes need some maintenance (the most The following translator classes need some maintenance (the most
...@@ -36,34 +36,80 @@ must be implemented to become up-to-date: ...@@ -36,34 +36,80 @@ must be implemented to become up-to-date:
TranslatorVietnamese 1.6.0 5 methods to implement (2 %) TranslatorVietnamese 1.6.0 5 methods to implement (2 %)
TranslatorTurkish 1.6.0 5 methods to implement (2 %) TranslatorTurkish 1.6.0 5 methods to implement (2 %)
TranslatorSwedish 1.6.0 5 methods to implement (2 %) TranslatorSwedish 1.6.0 5 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorSpanish 1.6.0 5 methods to implement (2 %) TranslatorSpanish 1.6.0 5 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorSerbian 1.6.0 5 methods to implement (2 %) TranslatorSerbian 1.6.0 5 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorSerbianCyrilic 1.6.0 5 methods to implement (2 %) TranslatorSerbianCyrilic 1.6.0 5 methods to implement (2 %)
TranslatorRussian 1.6.0 5 methods to implement (2 %) TranslatorRussian 1.6.0 5 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorRomanian 1.6.0 5 methods to implement (2 %) TranslatorRomanian 1.6.0 5 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorPersian 1.6.0 5 methods to implement (2 %) TranslatorPersian 1.6.0 5 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorMacedonian 1.6.0 5 methods to implement (2 %) TranslatorMacedonian 1.6.0 5 methods to implement (2 %)
TranslatorJapanese 1.6.0 5 methods to implement (2 %) TranslatorJapanese 1.6.0 5 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorItalian 1.6.0 5 methods to implement (2 %) TranslatorItalian 1.6.0 5 methods to implement (2 %)
TranslatorGerman 1.6.0 5 methods to implement (2 %) TranslatorGerman 1.6.0 5 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorFinnish 1.6.0 5 methods to implement (2 %) TranslatorFinnish 1.6.0 5 methods to implement (2 %)
TranslatorEsperanto 1.6.0 5 methods to implement (2 %) TranslatorEsperanto 1.6.0 5 methods to implement (2 %)
TranslatorCroatian 1.6.0 5 methods to implement (2 %) TranslatorCroatian 1.6.0 5 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorChinese 1.6.0 5 methods to implement (2 %) TranslatorChinese 1.6.0 5 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorChinesetraditional 1.6.0 5 methods to implement (2 %) TranslatorChinesetraditional 1.6.0 5 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorCatalan 1.6.0 5 methods to implement (2 %) TranslatorCatalan 1.6.0 5 methods to implement (2 %)
TranslatorAfrikaans 1.6.0 5 methods to implement (2 %) TranslatorAfrikaans 1.6.0 5 methods to implement (2 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorGreek 1.5.4 27 methods to implement (12 %) TranslatorGreek 1.5.4 27 methods to implement (12 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorDanish 1.5.4 27 methods to implement (12 %) TranslatorDanish 1.5.4 27 methods to implement (12 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorSlovene 1.4.6 29 methods to implement (13 %) TranslatorSlovene 1.4.6 29 methods to implement (13 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorNorwegian 1.4.6 28 methods to implement (12 %) TranslatorNorwegian 1.4.6 28 methods to implement (12 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorLithuanian 1.4.6 29 methods to implement (13 %) TranslatorLithuanian 1.4.6 29 methods to implement (13 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorIndonesian 1.4.6 28 methods to implement (12 %) TranslatorIndonesian 1.4.6 28 methods to implement (12 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorHungarian 1.4.6 29 methods to implement (13 %) TranslatorHungarian 1.4.6 29 methods to implement (13 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorArabic 1.4.6 28 methods to implement (12 %) TranslatorArabic 1.4.6 28 methods to implement (12 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorUkrainian 1.4.1 29 methods to implement (13 %) TranslatorUkrainian 1.4.1 29 methods to implement (13 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorPortuguese 1.3.3 40 methods to implement (18 %) TranslatorPortuguese 1.3.3 40 methods to implement (18 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorSlovak 1.2.18 49 methods to implement (22 %) TranslatorSlovak 1.2.18 49 methods to implement (22 %)
Note: Reimplementation using UTF-8 suggested.
---------------------------------------------------------------------- ----------------------------------------------------------------------
The following translator classes derive directly from the The following translator classes derive directly from the
...@@ -71,8 +117,8 @@ TranslatorEnglish. The class identifier has the suffix 'En' that says ...@@ -71,8 +117,8 @@ TranslatorEnglish. The class identifier has the suffix 'En' that says
that this is intentional. Usually, there is also a non-English based that this is intentional. Usually, there is also a non-English based
version of the translator for the language: version of the translator for the language:
TranslatorJapaneseEn implements 5 methods TranslatorJapaneseEn implements 5 methods -- Reimplementation using UTF-8 suggested.
TranslatorKoreanEn implements 5 methods TranslatorKoreanEn implements 5 methods -- Reimplementation using UTF-8 suggested.
====================================================================== ======================================================================
WARNING: The following translator methods are declared in the WARNING: The following translator methods are declared in the
...@@ -154,6 +200,12 @@ TranslatorArabic (TranslatorAdapter_1_4_6) 28 methods to implement (12 %) ...@@ -154,6 +200,12 @@ TranslatorArabic (TranslatorAdapter_1_4_6) 28 methods to implement (12 %)
virtual QCString trNoDescriptionAvailable() virtual QCString trNoDescriptionAvailable()
TranslatorBrazilian (Translator)
-------------------
Implements 221 of the required methods (100 %).
TranslatorCatalan (TranslatorAdapter_1_6_0) 5 methods to implement (2 %) TranslatorCatalan (TranslatorAdapter_1_6_0) 5 methods to implement (2 %)
----------------- -----------------
...@@ -483,6 +535,12 @@ TranslatorJapaneseEn (TranslatorEnglish) 216 methods to implement (97 %) ...@@ -483,6 +535,12 @@ TranslatorJapaneseEn (TranslatorEnglish) 216 methods to implement (97 %)
virtual QCString latexLanguageSupportCommand() virtual QCString latexLanguageSupportCommand()
TranslatorKorean (Translator)
----------------
Implements 221 of the required methods (100 %).
TranslatorKoreanEn (TranslatorEnglish) 216 methods to implement (97 %) TranslatorKoreanEn (TranslatorEnglish) 216 methods to implement (97 %)
------------------ ------------------
......
...@@ -773,7 +773,7 @@ stylesheet in the HTML output directory as well, or it will be erased! ...@@ -773,7 +773,7 @@ stylesheet in the HTML output directory as well, or it will be erased!
If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
page will contain the date and time when the page was generated. Setting page will contain the date and time when the page was generated. Setting
this to NO can help when comparing the output of multiple runs. this to NO can help when comparing the output of multiple runs.
' defval='0' depends='GENERATE_HTML'/> ' defval='1' depends='GENERATE_HTML'/>
<option type='bool' id='HTML_ALIGN_MEMBERS' docs=' <option type='bool' id='HTML_ALIGN_MEMBERS' docs='
If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
files or namespaces will be aligned in HTML using tables. If set to files or namespaces will be aligned in HTML using tables. If set to
......
...@@ -1105,7 +1105,7 @@ void addConfigOptions(Config *cfg) ...@@ -1105,7 +1105,7 @@ void addConfigOptions(Config *cfg)
"If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML\n" "If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML\n"
"page will contain the date and time when the page was generated. Setting\n" "page will contain the date and time when the page was generated. Setting\n"
"this to NO can help when comparing the output of multiple runs.", "this to NO can help when comparing the output of multiple runs.",
FALSE TRUE
); );
cb->addDependency("GENERATE_HTML"); cb->addDependency("GENERATE_HTML");
//---- //----
......
...@@ -20,8 +20,11 @@ ...@@ -20,8 +20,11 @@
Define::Define() Define::Define()
{ {
undef=FALSE;
fileDef=0; fileDef=0;
lineNr=1;
nargs=-1;
undef=FALSE;
varArgs=FALSE;
isPredefined=FALSE; isPredefined=FALSE;
nonRecursive=FALSE; nonRecursive=FALSE;
} }
...@@ -33,6 +36,9 @@ Define::Define(const Define &d) ...@@ -33,6 +36,9 @@ Define::Define(const Define &d)
lineNr=d.lineNr; lineNr=d.lineNr;
nargs=d.nargs; nargs=d.nargs;
undef=d.undef; undef=d.undef;
varArgs=d.varArgs;
isPredefined=d.isPredefined;
nonRecursive=d.nonRecursive;
fileDef=0; fileDef=0;
} }
......
...@@ -1146,6 +1146,7 @@ void Definition::makePartOfGroup(GroupDef *gd) ...@@ -1146,6 +1146,7 @@ void Definition::makePartOfGroup(GroupDef *gd)
void Definition::setRefItems(const QList<ListItemInfo> *sli) void Definition::setRefItems(const QList<ListItemInfo> *sli)
{ {
//printf("%s::setRefItems()\n",name().data());
if (sli) if (sli)
{ {
makeResident(); makeResident();
...@@ -1166,6 +1167,7 @@ void Definition::setRefItems(const QList<ListItemInfo> *sli) ...@@ -1166,6 +1167,7 @@ void Definition::setRefItems(const QList<ListItemInfo> *sli)
void Definition::mergeRefItems(Definition *d) void Definition::mergeRefItems(Definition *d)
{ {
//printf("%s::mergeRefItems()\n",name().data());
LockingPtr< QList<ListItemInfo> > xrefList = d->xrefListItems(); LockingPtr< QList<ListItemInfo> > xrefList = d->xrefListItems();
if (xrefList!=0) if (xrefList!=0)
{ {
......
...@@ -999,7 +999,7 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path, ...@@ -999,7 +999,7 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
} }
//output << "}\n"; //output << "}\n";
output << ":\\begin{figure}[H]\n" output << "\\begin{figure}[H]\n"
"\\begin{center}\n" "\\begin{center}\n"
"\\leavevmode\n"; "\\leavevmode\n";
output << "\\includegraphics[height=" << realHeight << "cm]{" output << "\\includegraphics[height=" << realHeight << "cm]{"
......
...@@ -6617,6 +6617,7 @@ static void addEnumValuesToEnums(EntryNav *rootNav) ...@@ -6617,6 +6617,7 @@ static void addEnumValuesToEnums(EntryNav *rootNav)
fmd->setMaxInitLines(root->initLines); fmd->setMaxInitLines(root->initLines);
fmd->setMemberGroupId(root->mGrpId); fmd->setMemberGroupId(root->mGrpId);
fmd->setExplicitExternal(root->explicitExternal); fmd->setExplicitExternal(root->explicitExternal);
fmd->setRefItems(root->sli);
if (fmd) if (fmd)
{ {
md->insertEnumField(fmd); md->insertEnumField(fmd);
...@@ -7737,6 +7738,16 @@ static void findDirDocumentation(EntryNav *rootNav) ...@@ -7737,6 +7738,16 @@ static void findDirDocumentation(EntryNav *rootNav)
QCString normalizedName = root->name; QCString normalizedName = root->name;
normalizedName = substitute(normalizedName,"\\","/"); normalizedName = substitute(normalizedName,"\\","/");
//printf("root->docFile=%s normalizedName=%s\n",
// root->docFile.data(),normalizedName.data());
if (root->docFile==normalizedName) // current dir?
{
int lastSlashPos=normalizedName.findRev('/');
if (lastSlashPos!=-1) // strip file name
{
normalizedName=normalizedName.left(lastSlashPos);
}
}
if (normalizedName.at(normalizedName.length()-1)!='/') if (normalizedName.at(normalizedName.length()-1)!='/')
{ {
normalizedName+='/'; normalizedName+='/';
...@@ -7774,7 +7785,7 @@ static void findDirDocumentation(EntryNav *rootNav) ...@@ -7774,7 +7785,7 @@ static void findDirDocumentation(EntryNav *rootNav)
else else
{ {
warn(root->fileName,root->startLine,"Warning: No matching " warn(root->fileName,root->startLine,"Warning: No matching "
"directory found for command \\dir %s\n",root->name.data()); "directory found for command \\dir %s\n",normalizedName.data());
} }
rootNav->releaseEntry(); rootNav->releaseEntry();
} }
......
...@@ -371,35 +371,44 @@ hr.footer { ...@@ -371,35 +371,44 @@ hr.footer {
.memname { .memname {
white-space: nowrap; white-space: nowrap;
font-weight: bold; font-weight: bold;
} margin-left: 6px;
.memproto, .memdoc {
border: 1px solid #84b0c7;
} }
.memproto { .memproto {
border-top: 1px solid #84b0c7;
border-left: 1px solid #84b0c7;
border-right: 1px solid #84b0c7;
padding: 0; padding: 0;
background-color: #d5e1e8; background-color: #d5e1e8;
font-weight: bold; font-weight: bold;
-webkit-border-top-left-radius: 8px; /* firefox specific markup */
-webkit-border-top-right-radius: 8px; background-image: -moz-linear-gradient(rgba(228, 233, 245, 1.0) 0%, rgba(193, 205, 232, 1.0) 100%);
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-moz-border-radius-topleft: 8px;
-moz-border-radius-topright: 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-moz-border-radius-topright: 8px;
-moz-border-radius-topleft: 8px;
/* webkit specific markup */
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(228, 233, 245, 1.0)), to(rgba(193, 205, 232, 1.0)));
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-webkit-border-top-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
} }
.memdoc { .memdoc {
border-bottom: 1px solid #84b0c7;
border-left: 1px solid #84b0c7;
border-right: 1px solid #84b0c7;
padding: 2px 5px; padding: 2px 5px;
background-color: #eef3f5; background-color: #eef3f5;
border-top-width: 0; border-top-width: 0;
-webkit-border-bottom-left-radius: 8px; /* firefox specific markup */
-webkit-border-bottom-right-radius: 8px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-moz-border-radius-bottomleft: 8px; -moz-border-radius-bottomleft: 8px;
-moz-border-radius-bottomright: 8px; -moz-border-radius-bottomright: 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
/* webkit specific markup */
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
} }
.paramkey { .paramkey {
......
...@@ -371,35 +371,44 @@ ...@@ -371,35 +371,44 @@
".memname {\n" ".memname {\n"
" white-space: nowrap;\n" " white-space: nowrap;\n"
" font-weight: bold;\n" " font-weight: bold;\n"
"}\n" " margin-left: 6px;\n"
"\n"
".memproto, .memdoc {\n"
" border: 1px solid #84b0c7; \n"
"}\n" "}\n"
"\n" "\n"
".memproto {\n" ".memproto {\n"
" border-top: 1px solid #84b0c7; \n"
" border-left: 1px solid #84b0c7; \n"
" border-right: 1px solid #84b0c7; \n"
" padding: 0;\n" " padding: 0;\n"
" background-color: #d5e1e8;\n" " background-color: #d5e1e8;\n"
" font-weight: bold;\n" " font-weight: bold;\n"
" -webkit-border-top-left-radius: 8px;\n" " /* firefox specific markup */\n"
" -webkit-border-top-right-radius: 8px;\n" " background-image: -moz-linear-gradient(rgba(228, 233, 245, 1.0) 0%, rgba(193, 205, 232, 1.0) 100%);\n"
" -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n"
" -moz-border-radius-topleft: 8px;\n"
" -moz-border-radius-topright: 8px;\n"
" -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\n" " -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\n"
" -moz-border-radius-topright: 8px;\n"
" -moz-border-radius-topleft: 8px;\n"
" /* webkit specific markup */\n"
" background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(228, 233, 245, 1.0)), to(rgba(193, 205, 232, 1.0)));\n"
" -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n"
" -webkit-border-top-right-radius: 8px;\n"
" -webkit-border-top-left-radius: 8px;\n"
"\n" "\n"
"}\n" "}\n"
"\n" "\n"
".memdoc {\n" ".memdoc {\n"
" border-bottom: 1px solid #84b0c7; \n"
" border-left: 1px solid #84b0c7; \n"
" border-right: 1px solid #84b0c7; \n"
" padding: 2px 5px;\n" " padding: 2px 5px;\n"
" background-color: #eef3f5;\n" " background-color: #eef3f5;\n"
" border-top-width: 0;\n" " border-top-width: 0;\n"
" -webkit-border-bottom-left-radius: 8px;\n" " /* firefox specific markup */\n"
" -webkit-border-bottom-right-radius: 8px;\n"
" -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n"
" -moz-border-radius-bottomleft: 8px;\n" " -moz-border-radius-bottomleft: 8px;\n"
" -moz-border-radius-bottomright: 8px;\n" " -moz-border-radius-bottomright: 8px;\n"
" -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\n" " -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\n"
" /* webkit specific markup */\n"
" -webkit-border-bottom-left-radius: 8px;\n"
" -webkit-border-bottom-right-radius: 8px;\n"
" -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n"
"}\n" "}\n"
"\n" "\n"
".paramkey {\n" ".paramkey {\n"
......
...@@ -93,6 +93,7 @@ FileDef::FileDef(const char *p,const char *nm, ...@@ -93,6 +93,7 @@ FileDef::FileDef(const char *p,const char *nm,
docname.prepend(stripFromPath(path.copy())); docname.prepend(stripFromPath(path.copy()));
} }
m_isJava = name().right(5)==".java"; m_isJava = name().right(5)==".java";
m_isCSharp = name().right(5)==".cs";
memberGroupSDict = 0; memberGroupSDict = 0;
acquireFileVersion(); acquireFileVersion();
m_subGrouping=Config_getBool("SUBGROUPING"); m_subGrouping=Config_getBool("SUBGROUPING");
...@@ -1550,3 +1551,23 @@ bool FileDef::isLinkableInProject() const ...@@ -1550,3 +1551,23 @@ bool FileDef::isLinkableInProject() const
return hasDocumentation() && !isReference() && showFiles; return hasDocumentation() && !isReference() && showFiles;
} }
bool FileDef::includes(FileDef *incFile,QDict<FileDef> *includedFiles) const
{
if (incFile==this) return TRUE;
//printf("%s::includes(%s)\n",name().data(),incFile->name().data());
includedFiles->insert(absFilePath(),this);
if (includeList)
{
QListIterator<IncludeInfo> ili(*includeList);
IncludeInfo *ii;
for (;(ii=ili.current());++ili)
{
if (ii->fileDef &&
includedFiles->find(ii->fileDef->absFilePath())==0 &&
ii->fileDef->includes(incFile,includedFiles)) return TRUE;
}
}
return FALSE;
}
...@@ -125,6 +125,7 @@ class FileDef : public Definition ...@@ -125,6 +125,7 @@ class FileDef : public Definition
bool isIncluded(const QCString &name) const; bool isIncluded(const QCString &name) const;
bool isJava() const { return m_isJava; } bool isJava() const { return m_isJava; }
bool isCSharp() const { return m_isCSharp; }
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
void writeMemberPages(OutputList &ol); void writeMemberPages(OutputList &ol);
...@@ -164,6 +165,7 @@ class FileDef : public Definition ...@@ -164,6 +165,7 @@ class FileDef : public Definition
void addListReferences(); void addListReferences();
bool isDocumentationFile() const; bool isDocumentationFile() const;
bool includes(FileDef *incFile,QDict<FileDef> *includedFiles) const;
MemberList *getMemberList(MemberList::ListType lt) const; MemberList *getMemberList(MemberList::ListType lt) const;
const QList<MemberList> &getMemberLists() const { return m_memberLists; } const QList<MemberList> &getMemberLists() const { return m_memberLists; }
...@@ -216,6 +218,7 @@ class FileDef : public Definition ...@@ -216,6 +218,7 @@ class FileDef : public Definition
QIntDict<MemberDef> *srcMemberDict; QIntDict<MemberDef> *srcMemberDict;
bool isSource; bool isSource;
bool m_isJava; bool m_isJava;
bool m_isCSharp;
QCString fileVersion; QCString fileVersion;
PackageDef *package; PackageDef *package;
DirDef *dir; DirDef *dir;
......
...@@ -1658,6 +1658,7 @@ void LatexGenerator::startClassDiagram() ...@@ -1658,6 +1658,7 @@ void LatexGenerator::startClassDiagram()
{ {
//if (Config_getBool("COMPACT_LATEX")) t << "\\subsubsection"; else t << "\\subsection"; //if (Config_getBool("COMPACT_LATEX")) t << "\\subsubsection"; else t << "\\subsection";
//t << "{"; //t << "{";
newParagraph();
} }
void LatexGenerator::endClassDiagram(const ClassDiagram &d, void LatexGenerator::endClassDiagram(const ClassDiagram &d,
...@@ -1812,6 +1813,7 @@ void LatexGenerator::endMemberGroup(bool hasHeader) ...@@ -1812,6 +1813,7 @@ void LatexGenerator::endMemberGroup(bool hasHeader)
void LatexGenerator::startDotGraph() void LatexGenerator::startDotGraph()
{ {
newParagraph();
} }
void LatexGenerator::endDotGraph(const DotClassGraph &g) void LatexGenerator::endDotGraph(const DotClassGraph &g)
......
...@@ -100,6 +100,7 @@ void ManGenerator::init() ...@@ -100,6 +100,7 @@ void ManGenerator::init()
static QCString buildFileName(const char *name) static QCString buildFileName(const char *name)
{ {
QCString fileName; QCString fileName;
if (name==0) return "noname";
const char *p=name; const char *p=name;
char c; char c;
...@@ -407,7 +408,7 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName, ...@@ -407,7 +408,7 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName,
// the name of the link file is derived from the name of the anchor: // the name of the link file is derived from the name of the anchor:
// - truncate after an (optional) :: // - truncate after an (optional) ::
QCString baseName = name; QCString baseName = name;
int i=baseName.findRev(':'); int i=baseName.findRev("::");
if (i!=-1) baseName=baseName.right(baseName.length()-i-1); if (i!=-1) baseName=baseName.right(baseName.length()-i-1);
// - remove dangerous characters and append suffix, then add dir prefix // - remove dangerous characters and append suffix, then add dir prefix
......
...@@ -2700,7 +2700,7 @@ void MemberDef::addListReference(Definition *) ...@@ -2700,7 +2700,7 @@ void MemberDef::addListReference(Definition *)
if (xrefItems!=0) if (xrefItems!=0)
{ {
addRefItem(xrefItems.pointer(), addRefItem(xrefItems.pointer(),
qualifiedName(), qualifiedName()+argsString(), // argsString is needed for overloaded functions (see bug 609624)
memLabel, memLabel,
getOutputFileBase()+"#"+anchor(),memName,memArgs); getOutputFileBase()+"#"+anchor(),memName,memArgs);
} }
......
...@@ -511,10 +511,12 @@ void MemberList::addListReferences(Definition *def) ...@@ -511,10 +511,12 @@ void MemberList::addListReferences(Definition *def)
LockingPtr<MemberList> enumFields = md->enumFieldList(); LockingPtr<MemberList> enumFields = md->enumFieldList();
if (md->memberType()==MemberDef::Enumeration && enumFields!=0) if (md->memberType()==MemberDef::Enumeration && enumFields!=0)
{ {
//printf(" Adding enum values!\n");
MemberListIterator vmli(*enumFields); MemberListIterator vmli(*enumFields);
MemberDef *vmd; MemberDef *vmd;
for ( ; (vmd=vmli.current()) ; ++vmli) for ( ; (vmd=vmli.current()) ; ++vmli)
{ {
//printf(" adding %s\n",vmd->name().data());
vmd->addListReference(def); vmd->addListReference(def);
} }
} }
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
struct FileState struct FileState
{ {
FileState(int size) : fileBuf(size), oldFileBuf(0), oldFileBufPos(0) {} FileState(int size) : fileBuf(size), oldFileBuf(0), oldFileBufPos(0),fileDef(0) {}
int lineNr; int lineNr;
//FILE *filePtr; //FILE *filePtr;
BufStr fileBuf; BufStr fileBuf;
...@@ -63,6 +63,7 @@ struct FileState ...@@ -63,6 +63,7 @@ struct FileState
//bool isPlainFile; //bool isPlainFile;
YY_BUFFER_STATE bufState; YY_BUFFER_STATE bufState;
QCString fileName; QCString fileName;
FileDef *fileDef;
}; };
/* ----------------------------------------------------------------- /* -----------------------------------------------------------------
...@@ -121,6 +122,7 @@ DefineDict* getFileDefineDict() ...@@ -121,6 +122,7 @@ DefineDict* getFileDefineDict()
return g_fileDefineDict; return g_fileDefineDict;
} }
#if 0
static void setFileName(const char *name) static void setFileName(const char *name)
{ {
bool ambig; bool ambig;
...@@ -130,6 +132,16 @@ static void setFileName(const char *name) ...@@ -130,6 +132,16 @@ static void setFileName(const char *name)
if (g_yyFileDef && g_yyFileDef->isReference()) g_yyFileDef=0; if (g_yyFileDef && g_yyFileDef->isReference()) g_yyFileDef=0;
g_insideCS = g_yyFileName.right(3)==".cs"; g_insideCS = g_yyFileName.right(3)==".cs";
} }
#endif
static void setFileName(FileState *fs)
{
g_yyFileName=fs->fileName;
g_yyFileDef=fs->fileDef;
//printf("^^ setFileName: %s->%p\n",g_yyFileName.data(),g_yyFileDef);
if (g_yyFileDef && g_yyFileDef->isReference()) g_yyFileDef=0;
g_insideCS = g_yyFileName.right(3)==".cs";
}
static void incrLevel() static void incrLevel()
{ {
...@@ -173,18 +185,42 @@ static void setCaseDone(bool value) ...@@ -173,18 +185,42 @@ static void setCaseDone(bool value)
g_levelGuard[g_level-1]=value; g_levelGuard[g_level-1]=value;
} }
static bool macroIsAccessible(Define *def)
{
//printf("macroIsAccessible(%s) input=%s def=%s\n",
// def->name.data(),g_inputFileDef?g_inputFileDef->name().data():"<none>",
// def->fileDef ? def->fileDef->name().data() : "<none>");
if (def && def->isPredefined) // predefined macro -> globally accessible
{
//printf("%s: predefined macro %s\n",g_inputFileDef->name().data(),def->name.data());
return TRUE;
}
if (g_inputFileDef && def && def->fileDef) // check if g_inputFileDef actually includes def->fileDef
{
QDict<FileDef> includedFiles(257);
bool b = g_inputFileDef->includes(def->fileDef,&includedFiles);
//printf("%s: Checking for accessibility of define '%s' (defined in %s): result=%d\n",
// g_inputFileDef->name().data(),def->name.data(),def->fileDef->name().data(),b);
return b;
}
return FALSE;
}
static Define *isDefined(const char *name) static Define *isDefined(const char *name)
{ {
Define *def=0;
if (name) if (name)
{ {
Define *def; def=g_fileDefineDict->find(name);
//if ((def=fileDefineCache->findDefine(g_yyFileName,name)) && !def->undef) //if ((def=fileDefineCache->findDefine(g_yyFileName,name)) && !def->undef)
// return def; // return def;
if ((def=g_fileDefineDict->find(name)) && !def->undef) return def; if (def && def->undef) def=0;
if (def && !macroIsAccessible(def)) def=0;
} }
return 0; return def;
} }
static QDict<void> g_allIncludes(10009); static QDict<void> g_allIncludes(10009);
static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyIncluded) static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyIncluded)
...@@ -245,6 +281,8 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude ...@@ -245,6 +281,8 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude
{ {
fs->oldFileBuf = g_inputBuf; fs->oldFileBuf = g_inputBuf;
fs->oldFileBufPos = g_inputBufPos; fs->oldFileBufPos = g_inputBufPos;
fs->fileDef = g_yyFileDef;
fs->fileName = g_yyFileName;
} }
} }
return fs; return fs;
...@@ -262,7 +300,7 @@ static FileState *findFile(const char *fileName,bool localInclude,bool &alreadyI ...@@ -262,7 +300,7 @@ static FileState *findFile(const char *fileName,bool localInclude,bool &alreadyI
FileState *fs = checkAndOpenFile(absName,alreadyIncluded); FileState *fs = checkAndOpenFile(absName,alreadyIncluded);
if (fs) if (fs)
{ {
setFileName(absName); setFileName(fs);
g_yyLineNr=1; g_yyLineNr=1;
return fs; return fs;
} }
...@@ -283,7 +321,7 @@ static FileState *findFile(const char *fileName,bool localInclude,bool &alreadyI ...@@ -283,7 +321,7 @@ static FileState *findFile(const char *fileName,bool localInclude,bool &alreadyI
FileState *fs = checkAndOpenFile(absName,alreadyIncluded); FileState *fs = checkAndOpenFile(absName,alreadyIncluded);
if (fs) if (fs)
{ {
setFileName(absName); setFileName(fs);
g_yyLineNr=1; g_yyLineNr=1;
return fs; return fs;
} }
...@@ -1066,8 +1104,11 @@ Define *newDefine() ...@@ -1066,8 +1104,11 @@ Define *newDefine()
def->definition = g_defText.stripWhiteSpace(); def->definition = g_defText.stripWhiteSpace();
def->nargs = g_defArgs; def->nargs = g_defArgs;
def->fileName = g_yyFileName; def->fileName = g_yyFileName;
def->fileDef = g_yyFileDef;
def->lineNr = g_yyLineNr; def->lineNr = g_yyLineNr;
def->varArgs = g_defVarArgs; def->varArgs = g_defVarArgs;
//printf("newDefine: %s->%s\n",def->name.data(),
// def->fileDef ? def->fileDef->name().data() : "<none>");
//printf("newDefine: `%s'->`%s'\n",def->name.data(),def->definition.data()); //printf("newDefine: `%s'->`%s'\n",def->name.data(),def->definition.data());
if (!def->name.isEmpty() && Doxygen::expandAsDefinedDict[def->name]) if (!def->name.isEmpty() && Doxygen::expandAsDefinedDict[def->name])
{ {
...@@ -1124,7 +1165,10 @@ void addDefine() ...@@ -1124,7 +1165,10 @@ void addDefine()
Doxygen::functionNameSDict->append(g_defName,mn); Doxygen::functionNameSDict->append(g_defName,mn);
} }
mn->append(md); mn->append(md);
if (g_yyFileDef) g_yyFileDef->insertMember(md); if (g_yyFileDef)
{
g_yyFileDef->insertMember(md);
}
//Define *d; //Define *d;
//if ((d=defineDict[g_defName])==0) defineDict.insert(g_defName,newDefine()); //if ((d=defineDict[g_defName])==0) defineDict.insert(g_defName,newDefine());
...@@ -1190,9 +1234,10 @@ static void readIncludeFile(const QCString &inc) ...@@ -1190,9 +1234,10 @@ static void readIncludeFile(const QCString &inc)
g_yyFileDef->addIncludedByDependency(oldFileDef,oldFileDef->docName(),localInclude,g_isImported); g_yyFileDef->addIncludedByDependency(oldFileDef,oldFileDef->docName(),localInclude,g_isImported);
} }
} }
fs->bufState=YY_CURRENT_BUFFER; fs->bufState = YY_CURRENT_BUFFER;
fs->lineNr=oldLineNr; fs->lineNr = oldLineNr;
fs->fileName=oldFileName; fs->fileName = oldFileName;
fs->fileDef = oldFileDef;
// push the state on the stack // push the state on the stack
g_includeStack.push(fs); g_includeStack.push(fs);
// set the scanner to the include file // set the scanner to the include file
...@@ -1398,6 +1443,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1398,6 +1443,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
(g_includeStack.isEmpty() || g_curlyCount>0) && (g_includeStack.isEmpty() || g_curlyCount>0) &&
g_macroExpansion && g_macroExpansion &&
(def=g_fileDefineDict->find(name)) && (def=g_fileDefineDict->find(name)) &&
macroIsAccessible(def) &&
(!g_expandOnlyPredef || def->isPredefined) (!g_expandOnlyPredef || def->isPredefined)
) )
) )
...@@ -1470,10 +1516,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1470,10 +1516,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
if ((g_includeStack.isEmpty() || g_curlyCount>0) && if ((g_includeStack.isEmpty() || g_curlyCount>0) &&
g_macroExpansion && g_macroExpansion &&
(def=g_fileDefineDict->find(yytext)) && (def=g_fileDefineDict->find(yytext)) &&
macroIsAccessible(def) &&
(!g_expandOnlyPredef || def->isPredefined) (!g_expandOnlyPredef || def->isPredefined)
) )
{ {
//printf("Found it!\n"); //printf("Found it! #args=%d\n",def->nargs);
g_roundCount=0; g_roundCount=0;
g_defArgsStr=yytext; g_defArgsStr=yytext;
if (def->nargs==-1) // no function macro if (def->nargs==-1) // no function macro
...@@ -1499,6 +1546,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1499,6 +1546,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_macroExpansion && g_macroExpansion &&
(def=g_fileDefineDict->find(yytext)) && (def=g_fileDefineDict->find(yytext)) &&
def->nargs==-1 && def->nargs==-1 &&
macroIsAccessible(def) &&
(!g_expandOnlyPredef || def->isPredefined) (!g_expandOnlyPredef || def->isPredefined)
) )
{ {
...@@ -2181,7 +2229,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -2181,7 +2229,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
//printf("new define!\n"); //printf("new define!\n");
g_fileDefineDict->insert(g_defName,newDefine()); g_fileDefineDict->insert(g_defName,newDefine());
} }
else if (def)// name already exists else if (def && macroIsAccessible(def))
// name already exists
{ {
//printf("existing define!\n"); //printf("existing define!\n");
//printf("define found\n"); //printf("define found\n");
...@@ -2271,11 +2320,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -2271,11 +2320,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER; YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
yy_switch_to_buffer( fs->bufState ); yy_switch_to_buffer( fs->bufState );
yy_delete_buffer( oldBuf ); yy_delete_buffer( oldBuf );
g_yyLineNr=fs->lineNr; g_yyLineNr = fs->lineNr;
//preYYin = fs->oldYYin; //preYYin = fs->oldYYin;
g_inputBuf = fs->oldFileBuf; g_inputBuf = fs->oldFileBuf;
g_inputBufPos = fs->oldFileBufPos; g_inputBufPos = fs->oldFileBufPos;
setFileName(fs->fileName.copy()); setFileName(fs);
//fprintf(stderr,"######## FileName %s\n",g_yyFileName.data()); //fprintf(stderr,"######## FileName %s\n",g_yyFileName.data());
// Deal with file changes due to // Deal with file changes due to
...@@ -2454,6 +2503,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output) ...@@ -2454,6 +2503,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
i_obrace<i_cbrace i_obrace<i_cbrace
) // predefined function macro definition ) // predefined function macro definition
{ {
//printf("predefined function macro '%s'\n",defStr);
QRegExp reId("[a-z_A-Z][a-z_A-Z0-9]*"); // regexp matching an id QRegExp reId("[a-z_A-Z][a-z_A-Z0-9]*"); // regexp matching an id
QDict<int> argDict(17); QDict<int> argDict(17);
argDict.setAutoDelete(TRUE); argDict.setAutoDelete(TRUE);
...@@ -2498,6 +2548,8 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output) ...@@ -2498,6 +2548,8 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
def->nargs = count; def->nargs = count;
def->isPredefined = TRUE; def->isPredefined = TRUE;
def->nonRecursive = nonRecursive; def->nonRecursive = nonRecursive;
def->fileDef = g_yyFileDef;
def->fileName = fileName;
g_fileDefineDict->insert(def->name,def); g_fileDefineDict->insert(def->name,def);
} }
...@@ -2509,6 +2561,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output) ...@@ -2509,6 +2561,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
!ds.isEmpty() && (int)ds.length()>i_equals !ds.isEmpty() && (int)ds.length()>i_equals
) // predefined non-function macro definition ) // predefined non-function macro definition
{ {
//printf("predefined normal macro '%s'\n",defStr);
Define *def = new Define; Define *def = new Define;
if (i_equals==-1) // simple define without argument if (i_equals==-1) // simple define without argument
{ {
...@@ -2526,6 +2579,8 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output) ...@@ -2526,6 +2579,8 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
def->nargs = -1; def->nargs = -1;
def->isPredefined = TRUE; def->isPredefined = TRUE;
def->nonRecursive = nonRecursive; def->nonRecursive = nonRecursive;
def->fileDef = g_yyFileDef;
def->fileName = fileName;
g_fileDefineDict->insert(def->name,def); g_fileDefineDict->insert(def->name,def);
} }
else else
...@@ -2566,8 +2621,14 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output) ...@@ -2566,8 +2621,14 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
g_yyLineNr = 1; g_yyLineNr = 1;
g_level = 0; g_level = 0;
g_ifcount = 0; g_ifcount = 0;
setFileName(fileName); QFileInfo fi(fileName);
bool ambig;
g_yyFileName = convertToQCString(fi.absFilePath());
g_yyFileDef = findFileDef(Doxygen::inputNameDict,g_yyFileName,ambig);
if (g_yyFileDef && g_yyFileDef->isReference()) g_yyFileDef=0;
g_insideCS = g_yyFileName.right(3)==".cs";
g_inputFileDef = g_yyFileDef; g_inputFileDef = g_yyFileDef;
BEGIN( Start ); BEGIN( Start );
g_expectGuard = TRUE; g_expectGuard = TRUE;
......
...@@ -4031,7 +4031,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -4031,7 +4031,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
// was: current->args.simplifyWhiteSpace(); // was: current->args.simplifyWhiteSpace();
current->fileName = yyFileName; current->fileName = yyFileName;
current->startLine = yyLineNr; current->startLine = yyLineNr;
static QRegExp re("([^)]*\\[*&][^)]*)"); // (...*...) static QRegExp re("([^)]*[*&][^)]*)"); // (...*...)
if (*yytext!=';' || (current_root->section&Entry::COMPOUND_MASK) ) if (*yytext!=';' || (current_root->section&Entry::COMPOUND_MASK) )
{ {
int tempArg=current->name.find('<'); int tempArg=current->name.find('<');
...@@ -4041,6 +4041,10 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -4041,6 +4041,10 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
(current->type.find(re,0)!=-1 || current->type.left(8)=="typedef ")) (current->type.find(re,0)!=-1 || current->type.left(8)=="typedef "))
{ {
//printf("Scanner.l: found in class variable: `%s' `%s' `%s'\n", current->type.data(),current->name.data(),current->args.data()); //printf("Scanner.l: found in class variable: `%s' `%s' `%s'\n", current->type.data(),current->name.data(),current->args.data());
if (isTypedef && current->type.left(8)!="typedef ")
{
current->type.prepend("typedef ");
}
current->section = Entry::VARIABLE_SEC ; current->section = Entry::VARIABLE_SEC ;
} }
else else
...@@ -4056,6 +4060,10 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -4056,6 +4060,10 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
if (!current->type.isEmpty() && if (!current->type.isEmpty() &&
(current->type.find(re,0)!=-1 || current->type.left(8)=="typedef ")) (current->type.find(re,0)!=-1 || current->type.left(8)=="typedef "))
{ {
if (isTypedef && current->type.left(8)!="typedef ")
{
current->type.prepend("typedef ");
}
//printf("Scanner.l: found function variable!\n"); //printf("Scanner.l: found function variable!\n");
current->section = Entry::VARIABLE_SEC; current->section = Entry::VARIABLE_SEC;
} }
......
...@@ -5829,7 +5829,7 @@ void addRefItem(const QList<ListItemInfo> *sli, ...@@ -5829,7 +5829,7 @@ void addRefItem(const QList<ListItemInfo> *sli,
const char *key, const char *key,
const char *prefix, const char *name,const char *title,const char *args) const char *prefix, const char *name,const char *title,const char *args)
{ {
//printf("addRefItem(sli=%p,prefix=%s,name=%s,title=%s,args=%s)\n",sli,prefix,name,title,args); //printf("addRefItem(sli=%p,key=%s,prefix=%s,name=%s,title=%s,args=%s)\n",sli,key,prefix,name,title,args);
if (sli) if (sli)
{ {
QListIterator<ListItemInfo> slii(*sli); QListIterator<ListItemInfo> slii(*sli);
......
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