Commit 62d3c650 authored by dimitri's avatar dimitri

Release-1.2.15-20020430

parent ff31b2f1
DOXYGEN Version 1.2.15-20020421
DOXYGEN Version 1.2.15-20020430
Please read the installation section of the manual for instructions.
--------
Dimitri van Heesch (21 April 2002)
Dimitri van Heesch (30 April 2002)
DOXYGEN Version 1.2.15_20020421
DOXYGEN Version 1.2.15_20020430
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (21 April 2002)
Dimitri van Heesch (dimitri@stack.nl) (30 April 2002)
1.2.15-20020421
1.2.15-20020430
......@@ -681,11 +681,11 @@ class IFile : public ICompound
public:
virtual IGraph *includeDependencyGraph() const = 0;
virtual IGraph *includedByDependencyGraph() const = 0;
virtual IDocProgramListing *source() const = 0;
// file:
// includes()
// includedBy()
// IDocProgramListing *source()
// ICompound *innerNamespaces()
// ICompoundIterator *innerClasses()
};
......
......@@ -190,7 +190,6 @@ CompoundHandler::CompoundHandler(const QString &xmlDir)
addStartHandler("innerclass",this,&CompoundHandler::startInnerClass);
addEndHandler("innerclass");
}
CompoundHandler::~CompoundHandler()
......@@ -461,3 +460,8 @@ ICompoundIterator *CompoundHandler::nestedClasses() const
return new CompoundIdIterator(m_mainHandler,m_innerClasses);
}
IDocProgramListing *CompoundHandler::source() const
{
return m_programListing;
}
......@@ -123,6 +123,7 @@ class CompoundHandler : public IClass,
// IFile implementation
IGraph *includeDependencyGraph() const;
IGraph *includedByDependencyGraph() const;
IDocProgramListing *source() const;
private:
QList<RelatedCompound> m_superClasses;
......@@ -147,6 +148,7 @@ class CompoundHandler : public IClass,
GraphHandler *m_includeDependencyGraph;
GraphHandler *m_includedByDependencyGraph;
QList<QString> m_innerClasses;
ProgramListingHandler *m_source;
};
......
......@@ -627,7 +627,7 @@ void RefHandler::startRef(const QXmlAttributes& attrib)
{
m_parent->setDelegate(this);
m_refId = attrib.value("refid");
m_refId = attrib.value("external");
m_extId = attrib.value("external");
ASSERT(attrib.value("kindref")=="compound" ||
attrib.value("kindref")=="member");
m_targetKind = attrib.value("kindref")=="compound" ? Compound : Member;
......
......@@ -681,11 +681,11 @@ class IFile : public ICompound
public:
virtual IGraph *includeDependencyGraph() const = 0;
virtual IGraph *includedByDependencyGraph() const = 0;
virtual IDocProgramListing *source() const = 0;
// file:
// includes()
// includedBy()
// IDocProgramListing *source()
// ICompound *innerNamespaces()
// ICompoundIterator *innerClasses()
};
......
......@@ -588,6 +588,9 @@ int main(int argc,char **argv)
printf("==== included by dependency graph ==== \n");
DumpGraph(file->includedByDependencyGraph());
printf("==== source ====\n");
DumpDoc(file->source(),0);
}
comp->release();
......
......@@ -27,7 +27,7 @@ f_prefix=/usr
f_insttool=NO
f_english=NO
f_wizard=NO
f_langs=nl,se,cz,fr,it,de,jp,es,fi,ru,hr,pl,pt,hu,kr,ro,si,cn,no,br,dk,sk,ua,gr
f_langs=nl,se,cz,fr,it,de,jp,es,fi,ru,hr,pl,pt,hu,kr,ro,si,cn,no,br,dk,sk,ua,gr,tw
while test -n "$1"; do
case $1 in
......@@ -412,11 +412,11 @@ EOF
fi
fi
if test "$f_platform" = "win32-g++"; then
cat >> .tmakeconfig <<EOF
TMAKE_LFLAGS += -D_WIN32
EOF
fi
#if test "$f_platform" = "win32-g++"; then
# cat >> .tmakeconfig <<EOF
# TMAKE_LFLAGS += -D_WIN32
#EOF
#fi
if test "$f_english" = YES; then
cat >> .tmakeconfig <<EOF
......@@ -483,7 +483,7 @@ echo -n " Generating src/lang_cfg.h..."
echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>);
chomp @l;
@allowed=(NL,SE,CZ,FR,IT,DE,JP,ES,FI,RU,HR,PL,PT,HU,KR,RO,SI,CN,NO,BR,
DK,SK,UA,GR);
DK,SK,UA,GR,TW);
foreach my $elem (@l){
$elem =~ tr/a-z/A-Z/;
$r=0;
......
This diff is collapsed.
......@@ -25,13 +25,14 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
Currently (version 1.2.14-20020317), 25 languages
Currently (version 1.2.15-20020421), 26 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Chinese, Croatian, Czech, Danish,
Dutch, English, Finnish, French, German,
Greek, Hungarian, Italian, Japanese, Korean,
Norwegian, Polish, Portuguese, Romanian, Russian,
Slovak, Slovene, Spanish, Swedish, and Ukrainian.
Brazilian Portuguese, Chinese, Chinesetraditional, Croatian, Czech,
Danish, Dutch, English, Finnish, French,
German, Greek, Hungarian, Italian, Japanese,
Korean, Norwegian, Polish, Portuguese, Romanian,
Russian, Slovak, Slovene, Spanish, Swedish,
and Ukrainian.
The table of information related to the supported languages follows.
It is sorted by language alphabetically. The <b>Status</b> column
......@@ -62,6 +63,12 @@ when the translator was updated.
<TD>liuwei@NOSPAM.asiainfo.com<br>wangweihan@NOSPAM.capinfo.com.cn</TD>
<TD>1.2.13</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Chinesetraditional</TD>
<TD>Gary Lee</TD>
<TD>garylee@NOSPAM.ecosine.com.tw</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Croatian</TD>
<TD>Boris Bralo</TD>
......@@ -180,7 +187,7 @@ when the translator was updated.
<TD>Slovene</TD>
<TD>Matjaz Ostroversnik</TD>
<TD>matjaz.ostroversnik@NOSPAM.zrs-tk.si</TD>
<TD>1.2.13</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Spanish</TD>
......@@ -216,6 +223,8 @@ when the translator was updated.
Chinese & Wei Liu & {\tt liuwei@asiainfo.com} & 1.2.13 \\
& Wang Weihan & {\tt wangweihan@capinfo.com.cn} & \\
\hline
Chinesetraditional & Gary Lee & {\tt garylee@ecosine.com.tw} & up-to-date \\
\hline
Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} & up-to-date \\
\hline
Czech & Petr P\v{r}ikryl & {\tt prikrylp@skil.cz} & up-to-date \\
......@@ -257,7 +266,7 @@ when the translator was updated.
\hline
Slovak & Stanislav Kudl\'{a}\v{c} & {\tt skudlac@pobox.sk} & 1.2.13 \\
\hline
Slovene & Matjaz Ostroversnik & {\tt matjaz.ostroversnik@zrs-tk.si} & 1.2.13 \\
Slovene & Matjaz Ostroversnik & {\tt matjaz.ostroversnik@zrs-tk.si} & up-to-date \\
\hline
Spanish & Francisco Oltra Thennet & {\tt foltra@puc.cl} & 1.2.7 \\
\hline
......
......@@ -8,6 +8,9 @@ Chinese
Wei Liu: liuwei@asiainfo.com
Wang Weihan: wangweihan@capinfo.com.cn
ChineseTraditional
Gary Lee: garylee@ecosine.com.tw
Croatian
Boris Bralo: boris.bralo@zg.tel.hr
......
......@@ -46,6 +46,7 @@ SOURCES = adler32.c \
uncompr.c \
zutil.c
win32:INCLUDEPATH += .
win32-g++:TMAKE_CFLAGS += -D__CYGWIN__ -DALL_STATIC
DESTDIR = ../lib
TARGET = png
OBJECTS_DIR = ../objects
......
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.2.15_20020421
Version: 1.2.15_20020430
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -74,5 +74,6 @@ win32:SOURCES += qfile_win32.cpp \
INCLUDEPATH = .
TMAKE_CXXFLAGS += -DQT_NO_CODECS -DQT_LITE_UNICODE
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-g++:TMAKE_CXXFLAGS += -D_WIN32 -D__CYGWIN__ -DALL_STATIC
OBJECTS_DIR = ../objects
DESTDIR = ../lib
......@@ -33,7 +33,7 @@ class BufStr : public QCString
{
QCString::resize(size()+spareRoom);
}
data()[offset++]=c;
QCString::data()[offset++]=c;
}
void addArray(const char *a,int len)
{
......@@ -41,7 +41,7 @@ class BufStr : public QCString
{
QCString::resize(size()+len+spareRoom);
}
memcpy(data()+offset,a,len);
memcpy(QCString::data()+offset,a,len);
offset+=len;
}
uint curPos() { return offset; }
......
......@@ -24,6 +24,7 @@
#include <assert.h>
#include <ctype.h>
#include <qregexp.h>
#include <qdir.h>
#include "qtbc.h"
#include "scanner.h"
......@@ -1044,10 +1045,36 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
<ReadInclude>[^\n\"\>]+/(">"|"\"") {
//FileInfo *f;
bool ambig;
FileDef *fd;
bool found=FALSE;
FileDef *fd=0;
if ((fd=findFileDef(Doxygen::inputNameDict,yytext,ambig)) &&
fd->isLinkable())
{
if (ambig) // multiple input files match the name
{
//printf("===== yes %s is ambigious\n",yytext);
QCString name = convertToQCString(QDir::cleanDirPath(yytext));
if (!name.isEmpty() && g_sourceFileDef)
{
FileName *fn = Doxygen::inputNameDict->find(name);
FileNameIterator fni(*fn);
// for each include name
for (fni.toFirst();!found && (fd=fni.current());++fni)
{
// see if this source file actually includes the file
found = g_sourceFileDef->isIncluded(fd->absFilePath());
//printf(" include file %s found=%d\n",fd->absFilePath().data(),found);
}
}
}
else // not ambiguous
{
found = TRUE;
}
}
if (found)
{
//printf(" include file %s found=%d\n",fd->absFilePath().data(),found);
g_code->writeCodeLink(fd->getReference(),fd->getOutputFileBase(),0,yytext);
}
else
......
/*****************************************************************************
*
*
*
* Copyright (C) 1997-2002 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 _COMMENTCNV_H
#define _COMMNETCNV_H
class BufStr;
extern void convertCppComments(BufStr *inBuf,BufStr *outBuf);
#endif
/*****************************************************************************
*
*
*
* Copyright (C) 1997-2002 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.
*
*/
%{
#define YY_NEVER_INTERACTIVE 1
#include <stdio.h>
#include <stdlib.h>
#include "bufstr.h"
static BufStr *g_inBuf;
static BufStr *g_outBuf;
static int g_inBufPos;
static void replaceCommentMarker(const char *s,int len)
{
const char *p=s;
char c;
// copy blanks
while ((c=*p) && (c==' ' || c=='\t' || c=='\n'))
{
g_outBuf->addChar(c);
p++;
}
// replace start of comment marker by spaces
while ((c=*p) && (c=='/' || c=='!'))
{
g_outBuf->addChar(' ');
p++;
if (*p=='<') // comment-after-item marker
{
g_outBuf->addChar(' ');
p++;
}
if (c=='!') // end after first !
{
break;
}
}
// copy comment line to output
g_outBuf->addArray(p,len-(p-s));
}
static inline void copyToOutput(const char *s,int len)
{
g_outBuf->addArray(s,len);
}
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
static int yyread(char *buf,int max_size)
{
int bytesInBuf = g_inBuf->curPos()-g_inBufPos;
int bytesToCopy = QMIN(max_size,bytesInBuf);
memcpy(buf,g_inBuf->data()+g_inBufPos,bytesToCopy);
g_inBufPos+=bytesToCopy;
return bytesToCopy;
}
%}
%option noyywrap
%option nounput
%x Scan
%x SkipString
%x SComment
%x CComment
%x Verbatim
%%
<Scan>[^\"\/\n\\]* { /* eat anything that is not " / or \n */
copyToOutput(yytext,yyleng);
}
<Scan>"\"" { /* start of a string */
copyToOutput(yytext,yyleng);
BEGIN(SkipString);
}
<Scan>\n { /* new line */
copyToOutput(yytext,yyleng);
}
<Scan>("//!"|"///").*\n/[ \t]*"//" { /* start C++ style special comment block */
copyToOutput("/*!",3);
copyToOutput(yytext+3,yyleng-3);
BEGIN(SComment);
}
<Scan>"//".*\n { /* one line C++ comment */
copyToOutput(yytext,yyleng);
}
<Scan>"/*" { /* start of a C comment */
copyToOutput(yytext,yyleng);
BEGIN(CComment);
}
<Scan>"\\verbatim" { /* start of a verbatim block */
copyToOutput(yytext,yyleng);
BEGIN(Verbatim);
}
<Scan>. { /* any other character */
copyToOutput(yytext,yyleng);
}
<Verbatim>"\\endverbatim" { /* end of verbatim block */
copyToOutput(yytext,yyleng);
BEGIN(Scan);
}
<Verbatim>[^\\\n]* { /* any character not a backslash or new line */
copyToOutput(yytext,yyleng);
}
<Verbatim>\n { /* new line in verbatim block */
copyToOutput(yytext,yyleng);
}
<Verbatim>. { /* any other character */
copyToOutput(yytext,yyleng);
}
<SkipString>\\. { /* escaped character in string */
copyToOutput(yytext,yyleng);
}
<SkipString>"\"" { /* end of string */
copyToOutput(yytext,yyleng);
BEGIN(Scan);
}
<SkipString>. { /* any other string character */
copyToOutput(yytext,yyleng);
}
<SkipString>\n { /* new line inside string (illegal for some compilers) */
copyToOutput(yytext,yyleng);
}
<CComment>[^*\n]* { /* anything that is not a '*' */
copyToOutput(yytext,yyleng);
}
<CComment>"*"+[^*/\n]* { /* stars without slashes */
copyToOutput(yytext,yyleng);
}
<CComment>\n { /* new line in comment */
copyToOutput(yytext,yyleng);
}
<CComment>"*"+"/" { /* end of C comment */
copyToOutput(yytext,yyleng);
BEGIN(Scan);
}
<SComment>^[ \t]*"//".*/\n { /* second line of special comment */
replaceCommentMarker(yytext,yyleng);
}
<SComment>\n[ \t]*"//".*/\n { /* other line of special comment */
replaceCommentMarker(yytext,yyleng);
}
<SComment>\n { /* end of special comment */
copyToOutput(" */",3);
copyToOutput(yytext,yyleng);
BEGIN(Scan);
}
%%
void convertCppComments(BufStr *inBuf,BufStr *outBuf)
{
g_inBuf = inBuf;
g_outBuf = outBuf;
g_inBufPos = 0;
BEGIN(Scan);
yylex();
}
//----------------------------------------------------------------------------
extern "C" { // some bogus code to keep the compiler happy
void commentcnvYYdummy() { yy_flex_realloc(0,0); }
}
......@@ -1247,9 +1247,10 @@ void Config::create()
"documentation generated by doxygen is written. Doxygen will use this \n"
"information to generate all constant output in the proper language. \n"
"The default language is English, other supported languages are: \n"
"Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, \n"
"German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, \n"
"Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.\n",
"Brazilian, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, \n"
"Finnish, French, German, Greek, Hungarian, Italian, Japanese, Korean, \n"
"Norwegian, Polish, Portuguese, Romanian, Russian, Slovak, Slovene, \n"
"Spanish, Swedish and Ukrainian.\n",
"English"
);
#ifdef LANG_BR
......@@ -1258,6 +1259,9 @@ void Config::create()
#ifdef LANG_CN
ce->addValue("Chinese");
#endif
#ifdef LANG_TW
ce->addValue("Chinese-Traditional");
#endif
#ifdef LANG_HR
ce->addValue("Croatian");
#endif
......
......@@ -261,16 +261,37 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
//printf("g_curArgTypeName=`%s' i=%d\n",g_curArgTypeName.data(),i);
Argument *a = new Argument;
a->attrib = g_curArgAttrib.copy();
if (i>=0 && g_curArgTypeName.at(i)!=':')
//printf("a->type=%s a->name=%s i=%d l=%d\n",
// a->type.data(),a->name.data(),i,l);
a->array.resize(0);
if (i==l-1 && g_curArgTypeName.at(i)==')') // function argument
{
int bi=g_curArgTypeName.find('(');
int fi=bi-1;
//printf("func arg fi=%d\n",fi);
while (fi>=0 && isId(g_curArgTypeName.at(fi))) fi--;
if (fi>=0)
{
a->type = g_curArgTypeName.left(fi+1);
a->name = g_curArgTypeName.mid(fi+1,bi-fi-1);
a->array = g_curArgTypeName.right(l-bi);
}
else
{
a->type = g_curArgTypeName;
}
}
else if (i>=0 && g_curArgTypeName.at(i)!=':')
{ // type contains a name
a->type = removeRedundantWhiteSpace(g_curArgTypeName.left(i+1));
a->name = g_curArgTypeName.right(g_curArgTypeName.length()-i-1);
a->name = g_curArgTypeName.right(l-i-1);
}
else // assume only the type was specified, try to determine name later
{
a->type = removeRedundantWhiteSpace(g_curArgTypeName);
}
a->array = removeRedundantWhiteSpace(g_curArgArray);
//printf("a->type=%s a->name=%s a->array=%s\n",a->type.data(),a->name.data());
a->array += removeRedundantWhiteSpace(g_curArgArray);
a->defval = g_curArgDefValue.copy();
a->docs = g_curArgDocs.stripWhiteSpace();
//printf("Argument `%s' `%s' adding docs=`%s'\n",a->type.data(),a->name.data(),a->docs.data());
......
......@@ -1470,7 +1470,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
if (bfd)
{
in = bfd->absFilePath();
doc = bfd->isLinkableInProject();
doc = bfd->isLinkable();
src = bfd->generateSourceFile();
}
if (doc || src)
......
......@@ -60,6 +60,7 @@
#include "page.h"
#include "packagedef.h"
#include "bufstr.h"
#include "commentcnv.h"
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen
......@@ -1073,6 +1074,13 @@ static void findUsingDeclarations(Entry *root)
} while (scopeOffset>=0 && usingCd==0);
//printf("%s -> %p\n",root->name.data(),usingCd);
if (usingCd==0) // definition not in the input => add an artificial class
{
usingCd = new ClassDef(
"<generated>",1,
root->name,ClassDef::Class);
Doxygen::hiddenClasses.append(root->name,usingCd);
}
// add the namespace the correct scope
if (usingCd)
......@@ -1758,8 +1766,6 @@ void addMethodToClass(Entry *root,ClassDef *cd,
{
mn = new MemberName(name);
mn->append(md);
//Doxygen::memberNameDict.insert(name,mn);
//Doxygen::memberNameList.append(mn);
Doxygen::memberNameSDict.append(name,mn);
}
......@@ -1873,9 +1879,11 @@ static void buildFunctionList(Entry *root)
QCString nsName,rnsName;
if (nd) nsName = nd->name().copy();
if (rnd) rnsName = rnd->name().copy();
NamespaceList *unl = fd ? fd->getUsedNamespaces() : 0;
ClassList *ucl = fd ? fd->getUsedClasses() : 0;
//printf("matching arguments for %s\n",md->name().data());
if (
matchArguments(md->argumentList(),root->argList,0,nsName)
matchArguments(md->argumentList(),root->argList,0,nsName,FALSE,unl,ucl)
)
{
//printf("match!\n");
......@@ -2043,8 +2051,6 @@ static void buildFunctionList(Entry *root)
{
mn = new MemberName(name);
mn->append(md);
//Doxygen::functionNameDict.insert(name,mn);
//Doxygen::functionNameList.append(mn);
Doxygen::functionNameSDict.append(name,mn);
}
addMemberToGroups(root,md);
......@@ -3139,7 +3145,9 @@ static void computeClassRelations()
if ((cd==0 || (!cd->hasDocumentation() && !cd->isReference())) &&
bName.right(2)!="::")
{
if (!root->name.isEmpty() && root->name[0]!='@')
if (!root->name.isEmpty() && root->name[0]!='@' &&
(guessSection(root->fileName)==Entry::HEADER_SEC || Config_getBool("EXTRACT_LOCAL_CLASSES"))
)
warn_undoc(
root->fileName,root->startLine,
"Warning: Compound %s is not documented.",
......@@ -3572,6 +3580,7 @@ static bool findGlobalMember(Entry *root,
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
//printf("File %s\n",fd ? fd->name().data() : "<none>");
NamespaceList *nl = fd ? fd->getUsedNamespaces() : 0;
ClassList *cl = fd ? fd->getUsedClasses() : 0;
//printf("NamespaceList %p\n",nl);
// search in the list of namespaces that are imported via a
......@@ -3589,7 +3598,7 @@ static bool findGlobalMember(Entry *root,
bool matching=
(md->argumentList()==0 && root->argList->count()==0) ||
md->isVariable() || md->isTypedef() || /* in case of function pointers */
matchArguments(md->argumentList(),root->argList,0,nsName);
matchArguments(md->argumentList(),root->argList,0,nsName,FALSE,nl,cl);
// for static members we also check if the comment block was found in
// the same file. This is needed because static members with the same
......@@ -6280,26 +6289,31 @@ static void readFiles(BufStr &output)
int fileNameSize=fileName.length();
BufStr tempBuf(10000);
// add begin filename marker
output.addChar(0x06);
tempBuf.addChar(0x06);
// copy filename
output.addArray(fileName.data(),fileNameSize);
tempBuf.addArray(fileName.data(),fileNameSize);
// add end filename marker
output.addChar(0x06);
output.addChar('\n');
tempBuf.addChar(0x06);
tempBuf.addChar('\n');
if (Config_getBool("ENABLE_PREPROCESSING"))
{
msg("Preprocessing %s...\n",s->data());
preprocessFile(fileName,output);
preprocessFile(fileName,tempBuf);
}
else
{
msg("Reading %s...\n",s->data());
copyAndFilterFile(fileName,output);
copyAndFilterFile(fileName,tempBuf);
}
output.addChar('\n'); /* to prevent problems under Windows ? */
tempBuf.addChar('\n'); /* to prevent problems under Windows ? */
convertCppComments(&tempBuf,&output);
//output.addArray(tempBuf.data(),tempBuf.curPos());
s=inputFiles.next();
//printf("-------> adding new line\n");
......@@ -6989,6 +7003,10 @@ void parseInput()
s=excludeList.next();
}
/**************************************************************************
* Determine Input Files *
**************************************************************************/
msg("Reading input files...\n");
QDict<void> *killDict = new QDict<void>(10007);
int inputSize=0;
......@@ -7080,6 +7098,25 @@ void parseInput()
s=aliasList.next();
}
/**************************************************************************
* Handle Tag Files *
**************************************************************************/
Entry *root=new Entry;
msg("Reading tag files\n");
QStrList &tagFileList = Config_getList("TAGFILES");
s=tagFileList.first();
while (s)
{
readTagFile(root,s);
s=tagFileList.next();
}
/**************************************************************************
* Read Input Files *
**************************************************************************/
BufStr input(inputSize+1); // Add one byte extra for \0 termination
// read and preprocess all input files
......@@ -7201,25 +7238,8 @@ void parseInput()
readFormulaRepository();
}
Entry *root=new Entry;
root->program=input;
/**************************************************************************
* Handle Tag Files *
**************************************************************************/
msg("Reading tag files\n");
QStrList &tagFileList = Config_getList("TAGFILES");
s=tagFileList.first();
while (s)
{
readTagFile(root,s);
s=tagFileList.next();
}
/**************************************************************************
* Gather information *
**************************************************************************/
......
......@@ -26,6 +26,7 @@ win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib
win32-borland:LIBS += qtools.lib png.lib doxygen.lib doxycfg.lib shell32.lib
win32-borland:TMAKE_LFLAGS += -L..\lib -L$(BCB)\lib\psdk
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-g++:TMAKE_CXXFLAGS += -D_WIN32 -D__CYGWIN__ -DALL_STATIC
INCLUDEPATH += ../qtools ../libpng .
DESTDIR = ../bin
TARGET = doxygen
......
......@@ -27,6 +27,7 @@ win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib
win32-borland:LIBS += qtools.lib shell32.lib
win32-borland:TMAKE_LFLAGS += -L..\lib -L$(BCB)\lib\psdk
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-g++:TMAKE_CXXFLAGS += -D_WIN32
INCLUDEPATH += ../qtools
OBJECTS_DIR = ../objects
TARGET = ../bin/doxytag
......@@ -126,7 +126,9 @@ void FileDef::writeDocumentation(OutputList &ol)
Doxygen::tagFile << " <compound kind=\"file\">" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl;
Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << htmlFileExtension << "</filename>" << endl;
Doxygen::tagFile << " <filename>"
<< convertToXML(getOutputFileBase())
<< "</filename>" << endl;
}
ol.startTextBlock();
......@@ -186,9 +188,21 @@ void FileDef::writeDocumentation(OutputList &ol)
// Here we use the include file name as it appears in the file.
// we could also we the name as it is used within doxygen,
// then we should have used fd->docName() instead of ii->includeName
if (fd && fd->isLinkable() && fd->generateSourceFile())
if (fd && fd->isLinkable())
{
ol.writeObjectLink(fd->getReference(),fd->includeName(),0,ii->includeName);
ol.writeObjectLink(fd->getReference(),
fd->generateSourceFile() ? fd->includeName() : fd->getOutputFileBase(),
0,ii->includeName);
if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !fd->isReference())
{
const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no";
Doxygen::tagFile << " <includes id=\""
<< convertToXML(fd->getOutputFileBase())
<< "\" local=\"" << locStr << "\">"
<< convertToXML(ii->includeName)
<< "</includes>"
<< endl;
}
}
else
{
......@@ -623,6 +637,12 @@ void FileDef::addIncludedByDependency(FileDef *fd,const char *incName,bool local
}
}
bool FileDef::isIncluded(const QCString &name) const
{
if (name.isEmpty()) return FALSE;
return includeDict->find(name)!=0;
}
bool FileDef::generateSourceFile() const
{
QCString extension = name().right(4);
......
......@@ -117,6 +117,7 @@ class FileDef : public Definition
{
return isLinkableInProject() || isReference();
}
bool isIncluded(const QCString &name) const;
void writeDocumentation(OutputList &ol);
void writeSource(OutputList &ol);
......
......@@ -26,6 +26,7 @@
#include "htmlhelp.h"
#include "config.h"
#include "message.h"
#include "doxygen.h"
//----------------------------------------------------------------------------
......@@ -176,7 +177,7 @@ void HtmlHelpIndex::writeFields(QTextStream &t)
if (level2.isEmpty())
{
t << " <LI><OBJECT type=\"text/sitemap\">";
t << "<param name=\"Local\" value=\"" << f->url << ".html";
t << "<param name=\"Local\" value=\"" << f->url << htmlFileExtension;
if (!f->anchor.isEmpty()) t << "#" << f->anchor;
t << "\">";
t << "<param name=\"Name\" value=\"" << level1 << "\">"
......@@ -187,7 +188,7 @@ void HtmlHelpIndex::writeFields(QTextStream &t)
if (f->link)
{
t << " <LI><OBJECT type=\"text/sitemap\">";
t << "<param name=\"Local\" value=\"" << f->url << ".html\">";
t << "<param name=\"Local\" value=\"" << f->url << htmlFileExtension << "\">";
t << "<param name=\"Name\" value=\"" << level1 << "\">"
"</OBJECT>\n";
}
......@@ -213,7 +214,7 @@ void HtmlHelpIndex::writeFields(QTextStream &t)
if (level2Started)
{
t << " <LI><OBJECT type=\"text/sitemap\">";
t << "<param name=\"Local\" value=\"" << f->url << ".html";
t << "<param name=\"Local\" value=\"" << f->url << htmlFileExtension;
if (!f->anchor.isEmpty()) t << "#" << f->anchor;
t << "\">";
t << "<param name=\"Name\" value=\"" << level2 << "\">"
......@@ -307,8 +308,8 @@ void HtmlHelp::createProjectFile()
t.setEncoding(QTextStream::Latin1);
#endif
QCString indexName="index.html";
if (Config_getBool("GENERATE_TREEVIEW")) indexName="main.html";
QCString indexName="index"+htmlFileExtension;
if (Config_getBool("GENERATE_TREEVIEW")) indexName="main"+htmlFileExtension;
t << "[OPTIONS]\n"
"Compatibility=1.1\n"
"Full-text search=Yes\n"
......@@ -417,7 +418,7 @@ void HtmlHelp::addContentsItem(bool isDir,
cts << "<param name=\"Name\" value=\"" << name << "\">";
if (ref) // made ref optional param - KPW
{
cts << "<param name=\"Local\" value=\"" << ref << ".html";
cts << "<param name=\"Local\" value=\"" << ref << htmlFileExtension;
if (anchor) cts << "#" << anchor;
cts << "\">";
}
......
......@@ -117,7 +117,7 @@ void writeInstallScript()
t << "if ( ! @files ) {\n";
t << " if (opendir(D,\".\")) {\n";
t << " foreach $file ( readdir(D) ) {\n";
t << " $match = \".html\";\n";
t << " $match = \"" << Config_getString("HTML_FILE_EXTENSION") << "\";\n";
t << " next if ( $file =~ /^\\.\\.?$/ );\n";
t << " ($file =~ /$match/) && (push @files, $file);\n";
t << " ($file =~ \"tree.js\") && (push @files, $file);\n";
......
......@@ -22,3 +22,4 @@
#define LANG_SK
#define LANG_UA
#define LANG_GR
#define LANG_TW
......@@ -76,6 +76,9 @@
#ifdef LANG_CN
#include "translator_cn.h"
#endif
#ifdef LANG_TW
#include "translator_tw.h"
#endif
#ifdef LANG_NO
#include "translator_no.h"
#endif
......@@ -218,6 +221,12 @@ bool setTranslator(const char *langName)
theTranslator=new TranslatorChinese;
}
#endif
#ifdef LANG_TW
else if (L_EQUAL("chinese-traditional"))
{
theTranslator=new TranslatorChinesetraditional;
}
#endif
#ifdef LANG_NO
else if (L_EQUAL("norwegian"))
{
......
......@@ -1393,7 +1393,8 @@ void LatexGenerator::docify(const char *str)
static bool isKorean = theTranslator->idLanguage()=="korean";
static bool isRussian = theTranslator->idLanguage()=="russian";
static bool isUkrainian = theTranslator->idLanguage()=="ukrainian";
static bool isChinese = theTranslator->idLanguage()=="chinese";
static bool isChinese = theTranslator->idLanguage()=="chinese" ||
theTranslator->idLanguage()=="chinese-traditional";
static bool isLatin2 = theTranslator->idLanguageCharset()=="iso-8859-2";
static bool isGreek = theTranslator->idLanguage()=="greek";
if (str)
......
......@@ -19,6 +19,7 @@ CONFIG = console warn_on staticlib $extraopts
HEADERS = config.h
SOURCES = config.cpp
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-g++:TMAKE_CXXFLAGS += -D_WIN32 -D__CYGWIN__ -DALL_STATIC
INCLUDEPATH += ../qtools
win32:INCLUDEPATH += .
DESTDIR = ../lib
......
......@@ -20,6 +20,7 @@ HEADERS = bufstr.h \
classdef.h \
classlist.h \
code.h \
commentcnv.h \
constexp.h \
cppvalue.h \
debug.h \
......@@ -100,6 +101,7 @@ SOURCES = ce_lex.cpp \
classdef.cpp \
classlist.cpp \
code.cpp \
commentcnv.cpp \
cppvalue.cpp \
debug.cpp \
defgen.cpp \
......@@ -150,6 +152,7 @@ SOURCES = ce_lex.cpp \
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-msvc:TMAKE_CXXFLAGS += -Zm200
win32-g++:TMAKE_CXXFLAGS += -D_WIN32 -D__CYGWIN__ -DALL_STATIC
INCLUDEPATH += ../qtools
INCLUDEPATH += ../libpng
win32:INCLUDEPATH += .
......
......@@ -62,6 +62,9 @@ sub GenerateDep {
#$ GenerateDep("doc.cpp","doc.l");
$(LEX) -PdocYY -t doc.l >doc.cpp
#$ GenerateDep("commentcnv.cpp","commentcnv.l");
$(LEX) -PcommentcnvYY -t commentcnv.l >commentcnv.cpp
#$ GenerateDep("ce_lex.cpp","constexp.l","ce_parse.h");
$(LEX) -PcppExpYY -t constexp.l >ce_lex.cpp
......
......@@ -37,6 +37,9 @@
//#define DBG_RTF(x) x;
#define DBG_RTF(x)
// used for table column width calculation
#define PAGEWIDTH 8748
const int indentLevels = 10;
struct ListItemInfo
......@@ -121,6 +124,7 @@ void RTFGenerator::append(const OutputGenerator *g)
//insideTabbing=insideTabbing || ((RTFGenerator *)g)->insideTabbing;
m_listLevel=((RTFGenerator *)g)->m_listLevel;
m_omitParagraph=((RTFGenerator *)g)->m_omitParagraph;
m_columnNumbers=((RTFGenerator *)g)->m_columnNumbers;
//printf("RTFGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(),
// insideTabbing ? "TRUE" : "FALSE" );
}
......@@ -1641,6 +1645,59 @@ void RTFGenerator::endSubsubsection()
// t << "}";
//}
void RTFGenerator::startTable(bool,int colNumbers)
{
m_columnNumbers=colNumbers;
t<<"\\par\n";
}
void RTFGenerator::endTable(bool hasCaption)
{
if (!hasCaption)
t << "\n\\pard \\widctlpar\\intbl\\adjustright\n{\\row }\n";
t << "\\pard\n" << endl;
}
void RTFGenerator::startCaption()
{
endTableRow();
t<<"\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 \\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 \\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 \\trbrdrv\\brdrs\\brdrw10"<<endl;
t<<"\\clvertalt\\clbrdrt\\brdrs\\brdrw10 \\clbrdrl\\brdrs\\brdrw10 \\clbrdrb\\brdrs\\brdrw10 \\clbrdrr \\brdrs\\brdrw10 \\cltxlrtb \\cellx"<<PAGEWIDTH<<"\\pard \\qc\\nowidctlpar\\widctlpar\\intbl\\adjustright "<<endl;
nextTableColumn();
}
void RTFGenerator::endCaption()
{
endTableColumn();
endTableRow();
}
void RTFGenerator::nextTableRow()
{
unsigned long columnWidth=PAGEWIDTH/m_columnNumbers;
t<<"\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 \\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 \\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 \\trbrdrv\\brdrs\\brdrw10 "<<endl;
for (int i=1;i<=m_columnNumbers;i++)
{
t<<"\\clvertalt\\clbrdrt\\brdrs\\brdrw10 \\clbrdrl\\brdrs\\brdrw10 \\clbrdrb\\brdrs\\brdrw10 \\clbrdrr \\brdrs\\brdrw10 \\cltxlrtb \\cellx"<<i*columnWidth<<endl;
}
t<<"\\pard \\widctlpar\\intbl\\adjustright\n{";
}
void RTFGenerator::endTableRow()
{
t<<"\n\\pard \\widctlpar\\intbl\\adjustright\n{\\row }\n";
}
void RTFGenerator::nextTableColumn()
{
t<<"{ ";
}
void RTFGenerator::endTableColumn()
{
t<<" \\cell }";
}
void RTFGenerator::startTextLink(const char *f,const char *anchor)
{
if (Config_getBool("RTF_HYPERLINKS"))
......
......@@ -154,14 +154,14 @@ class RTFGenerator : public OutputGenerator
void endSubscript() { t << "}"; }
void startSuperscript() { t << "{\\super " << endl;}
void endSuperscript() { t << "}"; }
void startTable(bool,int) { /* not implemented */ }
void endTable(bool) { /* not implemented */ }
void startCaption() { /* not implemented */ }
void endCaption() { /* not implemented */ }
void nextTableRow() { /* not implemented */ }
void endTableRow() { /* not implemented */ }
void nextTableColumn() { /* not implemented */ }
void endTableColumn() { /* not implemented */ }
void startTable(bool,int);
void endTable(bool);
void startCaption();
void endCaption();
void nextTableRow();
void endTableRow();
void nextTableColumn();
void endTableColumn();
void writeCopyright() { t << "\251"; }
void writeQuote() { t << "\""; }
void writeUmlaut(char c);
......@@ -268,6 +268,7 @@ class RTFGenerator : public OutputGenerator
bool m_bstartedBody; // has startbody been called yet?
int m_listLevel; // // RTF does not really have a addative indent...manually set list level.
bool m_omitParagraph; // should a the next paragraph command be ignored?
int m_columnNumbers; // number of columns in a table
void beginRTFDocument();
void beginRTFChapter();
......
......@@ -3770,10 +3770,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<SkipSection>"//"|"*/"
<ClassDoc,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"elseif"/[^a-z_A-Z0-9] {
// previous section enabled => absorb else
// previous section enabled => skip now
depthIf=1;
BEGIN(SkipSection);
}
<ClassDoc,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"else"/[^a-z_A-Z0-9] {
// section was enable => skip now
// section was enabled => skip now
depthIf=1;
BEGIN(SkipSection);
}
......
......@@ -91,11 +91,19 @@ class TagPackageInfo
QStringList classList;
};
class TagIncludeInfo
{
public:
QString id;
QString name;
bool isLocal;
};
/*! Container for file specific info that can be read from a tagfile */
class TagFileInfo
{
public:
TagFileInfo() { members.setAutoDelete(TRUE); }
TagFileInfo() { members.setAutoDelete(TRUE); includes.setAutoDelete(TRUE); }
QString name;
QString path;
QString filename;
......@@ -103,6 +111,7 @@ class TagFileInfo
QList<TagMemberInfo> members;
QStringList classList;
QStringList namespaceList;
QList<TagIncludeInfo> includes;
};
/*! Container for group specific info that can be read from a tagfile */
......@@ -431,6 +440,25 @@ class TagFileParser : public QXmlDefaultHandler
err("Error: Unexpected tag `base' found\n");
}
}
void startIncludes(const QXmlAttributes& attrib )
{
if (m_state==InFile && m_curFile)
{
m_curIncludes = new TagIncludeInfo;
m_curIncludes->id = attrib.value("id");
m_curIncludes->isLocal = attrib.value("local")=="yes" ? TRUE : FALSE;
m_curFile->includes.append(m_curIncludes);
}
else
{
err("Error: Unexpected tag `includes' found\n");
}
m_curString="";
}
void endIncludes()
{
m_curIncludes->name = m_curString;
}
void endTemplateArg()
{
if (m_state==InClass && m_curClass)
......@@ -541,6 +569,7 @@ class TagFileParser : public QXmlDefaultHandler
m_startElementHandlers.insert("name", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("base", new StartElementHandler(this,&TagFileParser::startBase));
m_startElementHandlers.insert("filename", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("includes", new StartElementHandler(this,&TagFileParser::startIncludes));
m_startElementHandlers.insert("path", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("anchor", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("arglist", new StartElementHandler(this,&TagFileParser::startStringValue));
......@@ -560,6 +589,7 @@ class TagFileParser : public QXmlDefaultHandler
m_endElementHandlers.insert("name", new EndElementHandler(this,&TagFileParser::endName));
m_endElementHandlers.insert("base", new EndElementHandler(this,&TagFileParser::endBase));
m_endElementHandlers.insert("filename", new EndElementHandler(this,&TagFileParser::endFilename));
m_endElementHandlers.insert("includes", new EndElementHandler(this,&TagFileParser::endIncludes));
m_endElementHandlers.insert("path", new EndElementHandler(this,&TagFileParser::endPath));
m_endElementHandlers.insert("anchor", new EndElementHandler(this,&TagFileParser::endAnchor));
m_endElementHandlers.insert("arglist", new EndElementHandler(this,&TagFileParser::endArglist));
......@@ -612,6 +642,7 @@ class TagFileParser : public QXmlDefaultHandler
}
void dump();
void buildLists(Entry *root);
void addIncludes();
private:
void buildMemberList(Entry *ce,QList<TagMemberInfo> &members);
......@@ -631,6 +662,7 @@ class TagFileParser : public QXmlDefaultHandler
TagGroupInfo *m_curGroup;
TagPageInfo *m_curPage;
TagMemberInfo *m_curMember;
TagIncludeInfo *m_curIncludes;
QCString m_curString;
QString m_tagName;
State m_state;
......@@ -752,6 +784,13 @@ void TagFileParser::dump()
msg(" anchor: `%s'\n",md->anchor.data());
msg(" arglist: `%s'\n",md->arglist.data());
}
QListIterator<TagIncludeInfo> mii(fd->includes);
TagIncludeInfo *ii;
for (;(ii=mii.current());++mii)
{
msg(" includes id: %s name: %s\n",ii->id.data(),ii->name.data());
}
}
//============== GROUPS
......@@ -1113,6 +1152,44 @@ void TagFileParser::buildLists(Entry *root)
}
}
void TagFileParser::addIncludes()
{
TagFileInfo *tfi = m_tagFileFiles.first();
while (tfi)
{
FileName *fn = Doxygen::inputNameDict->find(tfi->name);
if (fn)
{
FileNameIterator fni(*fn);
FileDef *fd;
for (;(fd=fni.current());++fni)
{
if (fd->getPath()==QCString(m_tagName+":"+tfi->path))
{
QListIterator<TagIncludeInfo> mii(tfi->includes);
TagIncludeInfo *ii;
for (;(ii=mii.current());++mii)
{
FileName *ifn = Doxygen::inputNameDict->find(ii->name);
FileNameIterator ifni(*ifn);
FileDef *ifd;
for (;(ifd=ifni.current());++ifni)
{
printf("ifd->getOutputFileBase()=%s ii->id=%s\n",
ifd->getOutputFileBase().data(),ii->id.data());
if (ifd->getOutputFileBase()==QCString(ii->id))
{
fd->addIncludeDependency(ifd,ii->name,ii->isLocal);
}
}
}
}
}
}
tfi = m_tagFileFiles.next();
}
}
void parseTagFile(Entry *root,const char *fullName,const char *tagName)
{
QFileInfo fi(fullName);
......@@ -1126,5 +1203,6 @@ void parseTagFile(Entry *root,const char *fullName,const char *tagName)
reader.setErrorHandler( &errorHandler );
reader.parse( source );
handler.buildLists(root);
handler.addIncludes();
}
This diff is collapsed.
This diff is collapsed.
......@@ -1332,9 +1332,11 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
NamespaceList *usingNamespaces,
ClassList *usingClasses)
{
//printf("match argument start %s:%s <-> %s:%s\n",
//printf("match argument start %s:%s <-> %s:%s using nsp=%p class=%p\n",
// srcA->type.data(),srcA->name.data(),
// dstA->type.data(),dstA->name.data());
// dstA->type.data(),dstA->name.data(),
// usingNamespaces,
// usingClasses);
// TODO: resolve any typedefs names that are part of srcA->type
// before matching. This should use className and namespaceName
......
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