Commit adb81f79 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.1.5

parent 9b285300
DOXYGEN Version 1.1.4-20000625 DOXYGEN Version 1.1.5
CONTENTS CONTENTS
-------- --------
...@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX: ...@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX:
1. Unpack the archive, unless you already have: 1. Unpack the archive, unless you already have:
gunzip doxygen-1.1.4-20000625.src.tar.gz # uncompress the archive gunzip doxygen-1.1.5.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.4-20000625.src.tar # unpack it tar xf doxygen-1.1.5.src.tar # unpack it
2. Run the configure script: 2. Run the configure script:
...@@ -255,4 +255,4 @@ The latest version of doxygen can be obtained at ...@@ -255,4 +255,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (25 June 2000) Dimitri van Heesch (02 July 2000)
DOXYGEN Version 1.1.4-20000625 DOXYGEN Version 1.1.5
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at ...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (25 June 2000) Dimitri van Heesch (02 July 2000)
1.1.4-20000625 1.1.5
...@@ -82,8 +82,6 @@ static bool * b=0; ...@@ -82,8 +82,6 @@ static bool * b=0;
static QStrList * l=0; static QStrList * l=0;
static int lastState; static int lastState;
static QCString elemStr; static QCString elemStr;
//static QCString tabSizeString;
//static QCString colsInAlphaIndexString;
#CONFIG Static #CONFIG Static
/* ----------------------------------------------------------------- /* -----------------------------------------------------------------
...@@ -313,6 +311,56 @@ void configStrToVal() ...@@ -313,6 +311,56 @@ void configStrToVal()
} }
Config::colsInAlphaIndex=cols; Config::colsInAlphaIndex=cols;
} }
if (maxDotGraphWidthString.isEmpty())
{
Config::maxDotGraphWidth=1024;
}
else
{
bool ok;
int width =maxDotGraphWidthString.toInt(&ok);
if (!ok)
{
warn_cont("Warning: argument of MAX_DOT_GRAPH_WIDTH is not a valid number in the range [1..20]!\n"
"Using the default of 1024 pixels!\n");
width=1024;
}
else if (width<250) // clip to lower bound
{
width=250;
}
else if (width>30000) // clip to upper bound
{
width=30000;
}
Config::maxDotGraphWidth=width;
}
if (maxDotGraphHeightString.isEmpty())
{
Config::maxDotGraphHeight=1024;
}
else
{
bool ok;
int height =maxDotGraphHeightString.toInt(&ok);
if (!ok)
{
warn_cont("Warning: argument of MAX_DOT_GRAPH_WIDTH is not a valid number in the range [1..20]!\n"
"Using the default of 1024 pixels!\n");
height=1024;
}
else if (height<250) // clip to lower bound
{
height=250;
}
else if (height>30000) // clip to upper bound
{
height=30000;
}
Config::maxDotGraphHeight=height;
}
} }
static void substEnvVarsInString(QCString &s) static void substEnvVarsInString(QCString &s)
......
...@@ -1338,6 +1338,16 @@ void init() ...@@ -1338,6 +1338,16 @@ void init()
"Note: wordpad (write) and others do not support links. \n" "Note: wordpad (write) and others do not support links. \n"
); );
addDependency("rtfHyperFlag","generateRTF"); addDependency("rtfHyperFlag","generateRTF");
ConfigString::add("rtfStylesheetFile",
"RTF_STYLESHEET_FILE",
"",
"file to load stylesheet definitions from",
"Load stylesheet definitions from file. Syntax is similar to doxygen's \n"
"config file, i.e. a series of assigments. You only have to provide \n"
"replacements, missing definitions are set to their default value. \n",
ConfigString::File
);
addDependency("rtfStylesheetFile","generateRTF");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
ConfigInfo::add( "Man","configuration options related to the man page output"); ConfigInfo::add( "Man","configuration options related to the man page output");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
...@@ -1383,9 +1393,19 @@ void init() ...@@ -1383,9 +1393,19 @@ void init()
"expand macros in the source.", "expand macros in the source.",
"If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro \n" "If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro \n"
"names in the source code. If set to NO (the default) only conditional \n" "names in the source code. If set to NO (the default) only conditional \n"
"compilation will be performed. \n" "compilation will be performed. Macro expansion can be done in a controlled \n"
"way by setting EXPAND_ONLY_PREDEF to YES. \n"
); );
addDependency("macroExpansionFlag","preprocessingFlag"); addDependency("macroExpansionFlag","preprocessingFlag");
ConfigBool::add( "onlyPredefinedFlag",
"EXPAND_ONLY_PREDEF",
"FALSE",
"expand only predefined macros",
"If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES \n"
"then the macro expansion is limited to the macros specified with the \n"
"PREDEFINED and EXPAND_AS_PREDEFINED tags. \n"
);
addDependency("onlyPredefinedFlag","preprocessingFlag");
ConfigBool::add( "searchIncludeFlag", ConfigBool::add( "searchIncludeFlag",
"SEARCH_INCLUDES", "SEARCH_INCLUDES",
"TRUE", "TRUE",
...@@ -1415,15 +1435,15 @@ void init() ...@@ -1415,15 +1435,15 @@ void init()
"omitted =1 is assumed. \n" "omitted =1 is assumed. \n"
); );
addDependency("predefined","preprocessingFlag"); addDependency("predefined","preprocessingFlag");
ConfigBool::add( "onlyPredefinedFlag", ConfigList::add( "expandAsDefinedList",
"EXPAND_ONLY_PREDEF", "EXPAND_AS_DEFINED",
"FALSE", "",
"expand only predefined macros", "list of defines to expand",
"If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES \n" "If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then \n"
"then the macro expansion is limited to the macros specified with the \n" "this tag can be used to specify a list of macro names that should be expanded. \n"
"PREDEFINED tag. \n" "The macro definition that is found in the sources will be used. \n"
"Use the PREDEFINED tag if you want to use a different macro definition. \n"
); );
addDependency("onlyPredefinedFlag","preprocessingFlag");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
ConfigInfo::add( "External","Configuration::addtions related to external references "); ConfigInfo::add( "External","Configuration::addtions related to external references ");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
......
...@@ -353,6 +353,8 @@ if test "$f_shared" = NO; then ...@@ -353,6 +353,8 @@ if test "$f_shared" = NO; then
cat >> .tmakeconfig <<EOF cat >> .tmakeconfig <<EOF
TMAKE_LFLAGS = -non_shared TMAKE_LFLAGS = -non_shared
EOF EOF
elif test "$f_platform" = "solaris-cc"; then
TMAKE_LFLAGS = -Bstatic
else else
cat >> .tmakeconfig <<EOF cat >> .tmakeconfig <<EOF
TMAKE_LFLAGS = -static TMAKE_LFLAGS = -static
......
This diff is collapsed.
...@@ -82,9 +82,12 @@ Here is a list of the languages and their current maintainers: ...@@ -82,9 +82,12 @@ Here is a list of the languages and their current maintainers:
Czech Czech
</TD> </TD>
<TD> <TD>
Petr Prikryl<BR>
Vlastimil Havran Vlastimil Havran
</TD> </TD>
<TD> <TD>
<a href="mailto:prikrylp@NOSPAM.skil.cz">
prikrylp@NOSPAM.skil.cz</a>
<a href="mailto:havran@NOSPAM.fel.cvut.cz"> <a href="mailto:havran@NOSPAM.fel.cvut.cz">
havran@NOSPAM.fel.cvut.cz</a> havran@NOSPAM.fel.cvut.cz</a>
</TD> </TD>
...@@ -206,7 +209,8 @@ Here is a list of the languages and their current maintainers: ...@@ -206,7 +209,8 @@ Here is a list of the languages and their current maintainers:
Swedish & Samuel H\"agglund & {\tt sahag96@nts.mh.se} \\ Swedish & Samuel H\"agglund & {\tt sahag96@nts.mh.se} \\
& XeT Erixon & {\tt xet@hem.passagen.se} \\ & XeT Erixon & {\tt xet@hem.passagen.se} \\
\hline \hline
Czech & Vlastimil Havran & {\tt havran@fel.cvut.cz} \\ Czech & Petr Prikryl & {\tt prikrylp@skil.cz} \\
& Vlastimil Havran & {\tt havran@fel.cvut.cz} \\
\hline \hline
Romanian & Ionutz Borcoman & {\tt borco@borco-ei.eng.hokudai.ac.jp} \\ Romanian & Ionutz Borcoman & {\tt borco@borco-ei.eng.hokudai.ac.jp} \\
\hline \hline
......
Name: doxygen Name: doxygen
Version: 1.1.4-20000625 Version: 1.1.5
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 1 Release: 1
Source0: doxygen-%{version}.src.tar.gz Source0: doxygen-%{version}.src.tar.gz
......
...@@ -1605,8 +1605,14 @@ void ClassDef::determineImplUsageRelation() ...@@ -1605,8 +1605,14 @@ void ClassDef::determineImplUsageRelation()
int brCount=1; int brCount=1;
while (te<typeLen && brCount!=0) while (te<typeLen && brCount!=0)
{ {
if (type.at(te)=='<') brCount++; if (type.at(te)=='<')
if (type.at(te)=='>') brCount--; {
if (te<typeLen-1 && type.at(te+1)=='<') te++; else brCount++;
}
if (type.at(te)=='>')
{
if (te<typeLen-1 && type.at(te+1)=='>') te++; else brCount--;
}
te++; te++;
} }
} }
...@@ -1614,6 +1620,7 @@ void ClassDef::determineImplUsageRelation() ...@@ -1614,6 +1620,7 @@ void ClassDef::determineImplUsageRelation()
if (te>ts) templSpec = type.mid(ts,te-ts); if (te>ts) templSpec = type.mid(ts,te-ts);
ClassDef *cd=getResolvedClass(name()+"::"+type.mid(i,l)); ClassDef *cd=getResolvedClass(name()+"::"+type.mid(i,l));
if (cd==0) cd=getResolvedClass(type.mid(i,l)); // TODO: also try inbetween scopes! if (cd==0) cd=getResolvedClass(type.mid(i,l)); // TODO: also try inbetween scopes!
//printf("Search for class %s result=%p\n",type.mid(i,l).data(),cd);
if (cd) // class exists if (cd) // class exists
{ {
found=TRUE; found=TRUE;
......
...@@ -118,6 +118,7 @@ static const char * g_currentFontClass; ...@@ -118,6 +118,7 @@ static const char * g_currentFontClass;
static bool g_searchingForBody; static bool g_searchingForBody;
static bool g_insideBody; static bool g_insideBody;
static int g_bodyCurlyCount; static int g_bodyCurlyCount;
static ClassDef * g_classVar;
/*! start a new line of code, inserting a line number if g_sourceFileDef /*! start a new line of code, inserting a line number if g_sourceFileDef
* is TRUE. If a definition starts at the current line, then the line * is TRUE. If a definition starts at the current line, then the line
...@@ -341,6 +342,34 @@ static void generateClassLink(OutputList &ol,char *clName,int *clNameLen=0) ...@@ -341,6 +342,34 @@ static void generateClassLink(OutputList &ol,char *clName,int *clNameLen=0)
} }
} }
static ClassDef *stripClassName(const char *s)
{
QCString tmp=s;
if (tmp.isEmpty()) return 0;
static const QRegExp re("[a-z_A-Z][a-z_A-Z0-9:]*");
int p=0,i,l;
while ((i=re.match(tmp,p,&l))!=-1)
{
ClassDef *cd=0;
QCString clName = tmp.mid(i,l);
//printf("g_classScope=`%s' clName=`%s'\n",g_classScope.data(),clName.data());
if (!g_classScope.isEmpty())
{
cd=getResolvedClass(g_classScope+"::"+clName);
}
if (cd==0)
{
cd=getResolvedClass(clName);
}
if (cd)
{
return cd;
}
p=i+l;
}
return 0;
}
static bool getLink(const char *className, static bool getLink(const char *className,
const char *memberName,OutputList &result, const char *memberName,OutputList &result,
const char *text=0) const char *text=0)
...@@ -375,10 +404,11 @@ static bool getLink(const char *className, ...@@ -375,10 +404,11 @@ static bool getLink(const char *className,
} }
} }
Definition *d=0; Definition *d=0;
if (cd) d=cd; else if (cd) d=nd; else if (fd) d=fd; else d=gd; if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
if (d && d->isLinkable()) if (d && d->isLinkable())
{ {
g_classVar = stripClassName(md->typeString());
if (g_currentDefinition && g_currentMemberDef && if (g_currentDefinition && g_currentMemberDef &&
md!=g_currentMemberDef && g_insideBody) md!=g_currentMemberDef && g_insideBody)
{ {
...@@ -393,32 +423,47 @@ static bool getLink(const char *className, ...@@ -393,32 +423,47 @@ static bool getLink(const char *className,
return FALSE; return FALSE;
} }
static ClassDef *stripClassName(const char *s) static bool generateClassMemberLink(OutputList &ol,ClassDef *mcd,const char *memName)
{ {
QCString tmp=s; //printf("generateClassMemberLink(%s,%s)\n",mcd->name().data(),memName);
if (tmp.isEmpty()) return 0; MemberName *mmn=memberNameDict[memName];
static const QRegExp re("[a-z_A-Z][a-z_A-Z0-9:]*"); if (mmn)
int p=0,i,l;
while ((i=re.match(tmp,p,&l))!=-1)
{ {
ClassDef *cd=0; MemberNameIterator mmni(*mmn);
QCString clName = tmp.mid(i,l); MemberDef *mmd,*xmd=0;
//printf("g_classScope=`%s' clName=`%s'\n",g_classScope.data(),clName.data()); ClassDef *xcd=0;
if (!g_classScope.isEmpty()) const int maxInheritanceDepth = 100000;
int mdist=maxInheritanceDepth;
for (;(mmd=mmni.current());++mmni)
{ {
cd=getResolvedClass(g_classScope+"::"+clName); int m=minClassDistance(mcd,mmd->memberClass());
} if (m<mdist && mmd->memberClass()->isLinkable())
if (cd==0)
{ {
cd=getResolvedClass(clName); mdist=m;
xcd=mmd->memberClass();
xmd=mmd;
} }
if (cd) }
if (mdist!=maxInheritanceDepth)
{ {
return cd; // extract class definition of the return type in order to resolve
// a->b()->c() like call chains
g_classVar = stripClassName(xmd->typeString());
// add usage reference
if (g_currentDefinition && g_currentMemberDef &&
xmd!=g_currentMemberDef && g_insideBody)
{
xmd->addSourceReference(g_currentMemberDef);
} }
p=i+l;
// write the actual link
writeMultiLineCodeLink(ol,xcd->getReference(),
xcd->getOutputFileBase(),xmd->anchor(),memName);
return TRUE;
} }
return 0; }
return FALSE;
} }
static void generateMemberLink(OutputList &ol,const char *varName, static void generateMemberLink(OutputList &ol,const char *varName,
...@@ -493,6 +538,8 @@ static void generateMemberLink(OutputList &ol,const char *varName, ...@@ -493,6 +538,8 @@ static void generateMemberLink(OutputList &ol,const char *varName,
ClassDef *mcd=stripClassName(vmd->typeString()); ClassDef *mcd=stripClassName(vmd->typeString());
if (mcd && mcd->isLinkable()) if (mcd && mcd->isLinkable())
{ {
if (generateClassMemberLink(ol,mcd,memName)) return;
#if 0
//printf("Found class `%s'\n",mcd->name().data()); //printf("Found class `%s'\n",mcd->name().data());
MemberName *mmn=memberNameDict[memName]; MemberName *mmn=memberNameDict[memName];
if (mmn) if (mmn)
...@@ -524,6 +571,7 @@ static void generateMemberLink(OutputList &ol,const char *varName, ...@@ -524,6 +571,7 @@ static void generateMemberLink(OutputList &ol,const char *varName,
return; return;
} }
} }
#endif
} }
} }
} }
...@@ -925,9 +973,21 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -925,9 +973,21 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
} }
<MemberCall>{SCOPENAME}/{B}*"(" { <MemberCall>{SCOPENAME}/{B}*"(" {
if (!g_name.isEmpty()) if (!g_name.isEmpty())
{
generateMemberLink(*g_code,g_name,yytext); generateMemberLink(*g_code,g_name,yytext);
}
else if (g_classVar)
{
if (!generateClassMemberLink(*g_code,g_classVar,yytext))
{
g_code->codify(yytext);
}
g_classVar=0;
}
else else
{
g_code->codify(yytext); g_code->codify(yytext);
}
g_name.resize(0);g_type.resize(0); g_name.resize(0);g_type.resize(0);
g_bracketCount=0; g_bracketCount=0;
BEGIN(FuncCall); BEGIN(FuncCall);
...@@ -1350,6 +1410,7 @@ void parseCode(OutputList &ol,const char *className,const QCString &s, ...@@ -1350,6 +1410,7 @@ void parseCode(OutputList &ol,const char *className,const QCString &s,
g_bodyCurlyCount = 0; g_bodyCurlyCount = 0;
g_bracketCount = 0; g_bracketCount = 0;
g_sharpCount = 0; g_sharpCount = 0;
g_classVar = 0;
g_classScope = className; g_classScope = className;
g_exampleBlock = exBlock; g_exampleBlock = exBlock;
g_exampleName = exName; g_exampleName = exName;
......
...@@ -96,15 +96,17 @@ struct Config ...@@ -96,15 +96,17 @@ struct Config
static QCString rtfOutputDir; // the directory to put the RTF files static QCString rtfOutputDir; // the directory to put the RTF files
static bool compactRTFFlag; // generate more compact RTF static bool compactRTFFlag; // generate more compact RTF
static bool rtfHyperFlag; // generate hyper links in RTF static bool rtfHyperFlag; // generate hyper links in RTF
static QCString rtfStylesheetFile; // file to load stylesheet definitions from
static bool generateMan; // generate Man pages static bool generateMan; // generate Man pages
static QCString manOutputDir; // the directory to put the man pages static QCString manOutputDir; // the directory to put the man pages
static QCString manExtension; // extension the man page files static QCString manExtension; // extension the man page files
static bool preprocessingFlag; // enable preprocessing static bool preprocessingFlag; // enable preprocessing
static bool macroExpansionFlag; // expand macros in the source. static bool macroExpansionFlag; // expand macros in the source.
static bool onlyPredefinedFlag; // expand only predefined macros
static bool searchIncludeFlag; // search for included files static bool searchIncludeFlag; // search for included files
static QStrList includePath; // list of include paths static QStrList includePath; // list of include paths
static QStrList predefined; // list of predefined macro names. static QStrList predefined; // list of predefined macro names.
static bool onlyPredefinedFlag; // expand only predefined macros static QStrList expandAsDefinedList; // list of defines to expand
static QStrList tagFileList; // list of tag files static QStrList tagFileList; // list of tag files
static QCString genTagFile; // the tag file to generate static QCString genTagFile; // the tag file to generate
static bool allExtFlag; // include all external classes flag static bool allExtFlag; // include all external classes flag
......
...@@ -131,15 +131,17 @@ bool Config::generateRTF = TRUE; ...@@ -131,15 +131,17 @@ bool Config::generateRTF = TRUE;
QCString Config::rtfOutputDir = "rtf"; QCString Config::rtfOutputDir = "rtf";
bool Config::compactRTFFlag = FALSE; bool Config::compactRTFFlag = FALSE;
bool Config::rtfHyperFlag = FALSE; bool Config::rtfHyperFlag = FALSE;
QCString Config::rtfStylesheetFile;
bool Config::generateMan = TRUE; bool Config::generateMan = TRUE;
QCString Config::manOutputDir = "man"; QCString Config::manOutputDir = "man";
QCString Config::manExtension = ".3"; QCString Config::manExtension = ".3";
bool Config::preprocessingFlag = TRUE; bool Config::preprocessingFlag = TRUE;
bool Config::macroExpansionFlag = FALSE; bool Config::macroExpansionFlag = FALSE;
bool Config::onlyPredefinedFlag = FALSE;
bool Config::searchIncludeFlag = TRUE; bool Config::searchIncludeFlag = TRUE;
QStrList Config::includePath; QStrList Config::includePath;
QStrList Config::predefined; QStrList Config::predefined;
bool Config::onlyPredefinedFlag = FALSE; QStrList Config::expandAsDefinedList;
QStrList Config::tagFileList; QStrList Config::tagFileList;
QCString Config::genTagFile; QCString Config::genTagFile;
bool Config::allExtFlag = FALSE; bool Config::allExtFlag = FALSE;
...@@ -175,8 +177,6 @@ static bool * b=0; ...@@ -175,8 +177,6 @@ static bool * b=0;
static QStrList * l=0; static QStrList * l=0;
static int lastState; static int lastState;
static QCString elemStr; static QCString elemStr;
//static QCString tabSizeString;
//static QCString colsInAlphaIndexString;
static QCString tabSizeString; static QCString tabSizeString;
static QCString colsInAlphaIndexString; static QCString colsInAlphaIndexString;
static QCString maxDotGraphWidthString; static QCString maxDotGraphWidthString;
...@@ -279,15 +279,17 @@ static int yyread(char *buf,int max_size) ...@@ -279,15 +279,17 @@ static int yyread(char *buf,int max_size)
<Start>"RTF_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::rtfOutputDir; s->resize(0); } <Start>"RTF_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::rtfOutputDir; s->resize(0); }
<Start>"COMPACT_RTF"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactRTFFlag; } <Start>"COMPACT_RTF"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactRTFFlag; }
<Start>"RTF_HYPERLINKS"[ \t]*"=" { BEGIN(GetBool); b=&Config::rtfHyperFlag; } <Start>"RTF_HYPERLINKS"[ \t]*"=" { BEGIN(GetBool); b=&Config::rtfHyperFlag; }
<Start>"RTF_STYLESHEET_FILE"[ \t]*"=" { BEGIN(GetString); s=&Config::rtfStylesheetFile; s->resize(0); }
<Start>"GENERATE_MAN"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateMan; } <Start>"GENERATE_MAN"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateMan; }
<Start>"MAN_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::manOutputDir; s->resize(0); } <Start>"MAN_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::manOutputDir; s->resize(0); }
<Start>"MAN_EXTENSION"[ \t]*"=" { BEGIN(GetString); s=&Config::manExtension; s->resize(0); } <Start>"MAN_EXTENSION"[ \t]*"=" { BEGIN(GetString); s=&Config::manExtension; s->resize(0); }
<Start>"ENABLE_PREPROCESSING"[ \t]*"=" { BEGIN(GetBool); b=&Config::preprocessingFlag; } <Start>"ENABLE_PREPROCESSING"[ \t]*"=" { BEGIN(GetBool); b=&Config::preprocessingFlag; }
<Start>"MACRO_EXPANSION"[ \t]*"=" { BEGIN(GetBool); b=&Config::macroExpansionFlag; } <Start>"MACRO_EXPANSION"[ \t]*"=" { BEGIN(GetBool); b=&Config::macroExpansionFlag; }
<Start>"EXPAND_ONLY_PREDEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::onlyPredefinedFlag; }
<Start>"SEARCH_INCLUDES"[ \t]*"=" { BEGIN(GetBool); b=&Config::searchIncludeFlag; } <Start>"SEARCH_INCLUDES"[ \t]*"=" { BEGIN(GetBool); b=&Config::searchIncludeFlag; }
<Start>"INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::includePath; l->clear(); elemStr=""; } <Start>"INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::includePath; l->clear(); elemStr=""; }
<Start>"PREDEFINED"[ \t]*"=" { BEGIN(GetStrList); l=&Config::predefined; l->clear(); elemStr=""; } <Start>"PREDEFINED"[ \t]*"=" { BEGIN(GetStrList); l=&Config::predefined; l->clear(); elemStr=""; }
<Start>"EXPAND_ONLY_PREDEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::onlyPredefinedFlag; } <Start>"EXPAND_AS_DEFINED"[ \t]*"=" { BEGIN(GetStrList); l=&Config::expandAsDefinedList; l->clear(); elemStr=""; }
<Start>"TAGFILES"[ \t]*"=" { BEGIN(GetStrList); l=&Config::tagFileList; l->clear(); elemStr=""; } <Start>"TAGFILES"[ \t]*"=" { BEGIN(GetStrList); l=&Config::tagFileList; l->clear(); elemStr=""; }
<Start>"GENERATE_TAGFILE"[ \t]*"=" { BEGIN(GetString); s=&Config::genTagFile; s->resize(0); } <Start>"GENERATE_TAGFILE"[ \t]*"=" { BEGIN(GetString); s=&Config::genTagFile; s->resize(0); }
<Start>"ALLEXTERNALS"[ \t]*"=" { BEGIN(GetBool); b=&Config::allExtFlag; } <Start>"ALLEXTERNALS"[ \t]*"=" { BEGIN(GetBool); b=&Config::allExtFlag; }
...@@ -546,6 +548,7 @@ void dumpConfig() ...@@ -546,6 +548,7 @@ void dumpConfig()
printf("rtfOutputDir=`%s'\n",Config::rtfOutputDir.data()); printf("rtfOutputDir=`%s'\n",Config::rtfOutputDir.data());
printf("compactRTFFlag=`%d'\n",Config::compactRTFFlag); printf("compactRTFFlag=`%d'\n",Config::compactRTFFlag);
printf("rtfHyperFlag=`%d'\n",Config::rtfHyperFlag); printf("rtfHyperFlag=`%d'\n",Config::rtfHyperFlag);
printf("rtfStylesheetFile=`%s'\n",Config::rtfStylesheetFile.data());
printf("# configuration options related to the man page output\n"); printf("# configuration options related to the man page output\n");
printf("generateMan=`%d'\n",Config::generateMan); printf("generateMan=`%d'\n",Config::generateMan);
printf("manOutputDir=`%s'\n",Config::manOutputDir.data()); printf("manOutputDir=`%s'\n",Config::manOutputDir.data());
...@@ -553,6 +556,7 @@ void dumpConfig() ...@@ -553,6 +556,7 @@ void dumpConfig()
printf("# Configuration options related to the preprocessor \n"); printf("# Configuration options related to the preprocessor \n");
printf("preprocessingFlag=`%d'\n",Config::preprocessingFlag); printf("preprocessingFlag=`%d'\n",Config::preprocessingFlag);
printf("macroExpansionFlag=`%d'\n",Config::macroExpansionFlag); printf("macroExpansionFlag=`%d'\n",Config::macroExpansionFlag);
printf("onlyPredefinedFlag=`%d'\n",Config::onlyPredefinedFlag);
printf("searchIncludeFlag=`%d'\n",Config::searchIncludeFlag); printf("searchIncludeFlag=`%d'\n",Config::searchIncludeFlag);
{ {
char *is=Config::includePath.first(); char *is=Config::includePath.first();
...@@ -570,7 +574,14 @@ void dumpConfig() ...@@ -570,7 +574,14 @@ void dumpConfig()
is=Config::predefined.next(); is=Config::predefined.next();
} }
} }
printf("onlyPredefinedFlag=`%d'\n",Config::onlyPredefinedFlag); {
char *is=Config::expandAsDefinedList.first();
while (is)
{
printf("expandAsDefinedList=`%s'\n",is);
is=Config::expandAsDefinedList.next();
}
}
printf("# Configuration::addtions related to external references \n"); printf("# Configuration::addtions related to external references \n");
{ {
char *is=Config::tagFileList.first(); char *is=Config::tagFileList.first();
...@@ -677,15 +688,17 @@ void Config::init() ...@@ -677,15 +688,17 @@ void Config::init()
Config::rtfOutputDir = "rtf"; Config::rtfOutputDir = "rtf";
Config::compactRTFFlag = FALSE; Config::compactRTFFlag = FALSE;
Config::rtfHyperFlag = FALSE; Config::rtfHyperFlag = FALSE;
Config::rtfStylesheetFile.resize(0);
Config::generateMan = TRUE; Config::generateMan = TRUE;
Config::manOutputDir = "man"; Config::manOutputDir = "man";
Config::manExtension = ".3"; Config::manExtension = ".3";
Config::preprocessingFlag = TRUE; Config::preprocessingFlag = TRUE;
Config::macroExpansionFlag = FALSE; Config::macroExpansionFlag = FALSE;
Config::onlyPredefinedFlag = FALSE;
Config::searchIncludeFlag = TRUE; Config::searchIncludeFlag = TRUE;
Config::includePath.clear(); Config::includePath.clear();
Config::predefined.clear(); Config::predefined.clear();
Config::onlyPredefinedFlag = FALSE; Config::expandAsDefinedList.clear();
Config::tagFileList.clear(); Config::tagFileList.clear();
Config::genTagFile.resize(0); Config::genTagFile.resize(0);
Config::allExtFlag = FALSE; Config::allExtFlag = FALSE;
...@@ -1554,6 +1567,17 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -1554,6 +1567,17 @@ void writeTemplateConfig(QFile *f,bool sl)
writeBoolValue(t,Config::rtfHyperFlag); writeBoolValue(t,Config::rtfHyperFlag);
t << "\n"; t << "\n";
if (!sl) if (!sl)
{
t << "\n";
t << "# Load stylesheet definitions from file. Syntax is similar to doxygen's \n";
t << "# config file, i.e. a series of assigments. You only have to provide \n";
t << "# replacements, missing definitions are set to their default value. \n";
t << "\n";
}
t << "RTF_STYLESHEET_FILE = ";
writeStringValue(t,Config::rtfStylesheetFile);
t << "\n";
if (!sl)
{ {
t << "\n"; t << "\n";
} }
...@@ -1614,13 +1638,25 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -1614,13 +1638,25 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "\n"; t << "\n";
t << "# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro \n"; t << "# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro \n";
t << "# names in the source code. If set to NO (the default) only conditional \n"; t << "# names in the source code. If set to NO (the default) only conditional \n";
t << "# compilation will be performed. \n"; t << "# compilation will be performed. Macro expansion can be done in a controlled \n";
t << "# way by setting EXPAND_ONLY_PREDEF to YES. \n";
t << "\n"; t << "\n";
} }
t << "MACRO_EXPANSION = "; t << "MACRO_EXPANSION = ";
writeBoolValue(t,Config::macroExpansionFlag); writeBoolValue(t,Config::macroExpansionFlag);
t << "\n"; t << "\n";
if (!sl) if (!sl)
{
t << "\n";
t << "# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES \n";
t << "# then the macro expansion is limited to the macros specified with the \n";
t << "# PREDEFINED and EXPAND_AS_PREDEFINED tags. \n";
t << "\n";
}
t << "EXPAND_ONLY_PREDEF = ";
writeBoolValue(t,Config::onlyPredefinedFlag);
t << "\n";
if (!sl)
{ {
t << "\n"; t << "\n";
t << "# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files \n"; t << "# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files \n";
...@@ -1657,13 +1693,14 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -1657,13 +1693,14 @@ void writeTemplateConfig(QFile *f,bool sl)
if (!sl) if (!sl)
{ {
t << "\n"; t << "\n";
t << "# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES \n"; t << "# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then \n";
t << "# then the macro expansion is limited to the macros specified with the \n"; t << "# this tag can be used to specify a list of macro names that should be expanded. \n";
t << "# PREDEFINED tag. \n"; t << "# The macro definition that is found in the sources will be used. \n";
t << "# Use the PREDEFINED tag if you want to use a different macro definition. \n";
t << "\n"; t << "\n";
} }
t << "EXPAND_ONLY_PREDEF = "; t << "EXPAND_AS_DEFINED = ";
writeBoolValue(t,Config::onlyPredefinedFlag); writeStringList(t,Config::expandAsDefinedList);
t << "\n"; t << "\n";
if (!sl) if (!sl)
{ {
...@@ -1942,6 +1979,56 @@ void configStrToVal() ...@@ -1942,6 +1979,56 @@ void configStrToVal()
} }
Config::colsInAlphaIndex=cols; Config::colsInAlphaIndex=cols;
} }
if (maxDotGraphWidthString.isEmpty())
{
Config::maxDotGraphWidth=1024;
}
else
{
bool ok;
int width =maxDotGraphWidthString.toInt(&ok);
if (!ok)
{
warn_cont("Warning: argument of MAX_DOT_GRAPH_WIDTH is not a valid number in the range [1..20]!\n"
"Using the default of 1024 pixels!\n");
width=1024;
}
else if (width<250) // clip to lower bound
{
width=250;
}
else if (width>30000) // clip to upper bound
{
width=30000;
}
Config::maxDotGraphWidth=width;
}
if (maxDotGraphHeightString.isEmpty())
{
Config::maxDotGraphHeight=1024;
}
else
{
bool ok;
int height =maxDotGraphHeightString.toInt(&ok);
if (!ok)
{
warn_cont("Warning: argument of MAX_DOT_GRAPH_WIDTH is not a valid number in the range [1..20]!\n"
"Using the default of 1024 pixels!\n");
height=1024;
}
else if (height<250) // clip to lower bound
{
height=250;
}
else if (height>30000) // clip to upper bound
{
height=30000;
}
Config::maxDotGraphHeight=height;
}
} }
static void substEnvVarsInString(QCString &s) static void substEnvVarsInString(QCString &s)
...@@ -2073,10 +2160,12 @@ void substituteEnvironmentVars() ...@@ -2073,10 +2160,12 @@ void substituteEnvironmentVars()
substEnvVarsInStrList( Config::extraPackageList ); substEnvVarsInStrList( Config::extraPackageList );
substEnvVarsInString( Config::latexHeaderFile ); substEnvVarsInString( Config::latexHeaderFile );
substEnvVarsInString( Config::rtfOutputDir ); substEnvVarsInString( Config::rtfOutputDir );
substEnvVarsInString( Config::rtfStylesheetFile );
substEnvVarsInString( Config::manOutputDir ); substEnvVarsInString( Config::manOutputDir );
substEnvVarsInString( Config::manExtension ); substEnvVarsInString( Config::manExtension );
substEnvVarsInStrList( Config::includePath ); substEnvVarsInStrList( Config::includePath );
substEnvVarsInStrList( Config::predefined ); substEnvVarsInStrList( Config::predefined );
substEnvVarsInStrList( Config::expandAsDefinedList );
substEnvVarsInStrList( Config::tagFileList ); substEnvVarsInStrList( Config::tagFileList );
substEnvVarsInString( Config::genTagFile ); substEnvVarsInString( Config::genTagFile );
substEnvVarsInString( Config::perlPath ); substEnvVarsInString( Config::perlPath );
......
...@@ -143,7 +143,7 @@ static bool readCodeFragment(const char *fileName, ...@@ -143,7 +143,7 @@ static bool readCodeFragment(const char *fileName,
{ {
// skip until the opening bracket or lonely : is found // skip until the opening bracket or lonely : is found
bool found=FALSE; bool found=FALSE;
char cn; char cn=0;
while (lineNr<=endLine && !f.atEnd() && !found) while (lineNr<=endLine && !f.atEnd() && !found)
{ {
while ((c=f.getch())!='{' && c!=':' && c!=-1) if (c=='\n') lineNr++; while ((c=f.getch())!='{' && c!=':' && c!=-1) if (c=='\n') lineNr++;
......
...@@ -996,7 +996,8 @@ static void findMaximalDotGraph(DotNode *root, ...@@ -996,7 +996,8 @@ static void findMaximalDotGraph(DotNode *root,
readBoundingBoxDot(baseName+"_tmp.dot",&width,&height); readBoundingBoxDot(baseName+"_tmp.dot",&width,&height);
width = width *96/72; // 96 pixels/inch, 72 points/inch width = width *96/72; // 96 pixels/inch, 72 points/inch
height = height*96/72; // 96 pixels/inch, 72 points/inch height = height*96/72; // 96 pixels/inch, 72 points/inch
//printf("Found bounding box (%d,%d)\n",width,height); //printf("Found bounding box (%d,%d) max (%d,%d)\n",width,height,
// Config::maxDotGraphWidth,Config::maxDotGraphHeight);
lastFit=(width<Config::maxDotGraphWidth && height<Config::maxDotGraphHeight); lastFit=(width<Config::maxDotGraphWidth && height<Config::maxDotGraphHeight);
if (lastFit) // image is small enough if (lastFit) // image is small enough
......
...@@ -81,10 +81,6 @@ MemberNameDict functionNameDict(10007); // all functions ...@@ -81,10 +81,6 @@ MemberNameDict functionNameDict(10007); // all functions
StringDict substituteDict(1009); // class name substitutes StringDict substituteDict(1009); // class name substitutes
SectionDict sectionDict(257); // all page sections SectionDict sectionDict(257); // all page sections
StringDict excludeNameDict(1009); // sections StringDict excludeNameDict(1009); // sections
//FileNameDict inputNameDict(1009); // sections
//FileNameDict includeNameDict(1009); // include names
//FileNameDict exampleNameDict(1009); // examples
//FileNameDict imageNameDict(257); // images
FileNameDict *inputNameDict; // sections FileNameDict *inputNameDict; // sections
FileNameDict *includeNameDict; // include names FileNameDict *includeNameDict; // include names
FileNameDict *exampleNameDict; // examples FileNameDict *exampleNameDict; // examples
...@@ -96,6 +92,7 @@ FormulaDict formulaNameDict(1009); // the label name of all formulas ...@@ -96,6 +92,7 @@ FormulaDict formulaNameDict(1009); // the label name of all formulas
StringDict tagDestinationDict(257); // all tag locations StringDict tagDestinationDict(257); // all tag locations
// a member group // a member group
QDict<void> compoundKeywordDict(7); // keywords recognised as compounds QDict<void> compoundKeywordDict(7); // keywords recognised as compounds
QDict<void> expandAsDefinedDict(257); // all macros that should be expanded
OutputList *outputList = 0; // list of output generating objects OutputList *outputList = 0; // list of output generating objects
PageInfo *mainPage = 0; PageInfo *mainPage = 0;
...@@ -906,6 +903,15 @@ static MemberDef *addVariableToClass( ...@@ -906,6 +903,15 @@ static MemberDef *addVariableToClass(
root->protection, root->protection,
fromAnnScope fromAnnScope
); );
// class friends may be templatized
//QCString name=n;
//int i;
//if (root->type.left(7)=="friend " && (i=name.find('<'))!=-1)
//{
// name=name.left(i);
//}
// add template names, if the class is a non-specialized template // add template names, if the class is a non-specialized template
//if (scope.find('<')==-1 && cd->templateArguments()) //if (scope.find('<')==-1 && cd->templateArguments())
//{ //{
...@@ -1332,7 +1338,7 @@ static void buildMemberList(Entry *root) ...@@ -1332,7 +1338,7 @@ static void buildMemberList(Entry *root)
ClassDef *cd=0; ClassDef *cd=0;
// check if this function's parent is a class // check if this function's parent is a class
QRegExp re("([a-zA-Z0-9: ]*[ *]*[ ]*"); QRegExp re("([a-z_A-Z0-9: ]*[ *]*[ ]*");
//printf("root->parent=`%s' cd=%p root->type.find(re,0)=%d\n", //printf("root->parent=`%s' cd=%p root->type.find(re,0)=%d\n",
// root->parent->name.data(),getClass(root->parent->name), // root->parent->name.data(),getClass(root->parent->name),
// root->type.find(re,0)); // root->type.find(re,0));
...@@ -1896,7 +1902,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, ...@@ -1896,7 +1902,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
templSpec=baseClassName.mid(i,e-i); templSpec=baseClassName.mid(i,e-i);
baseClassName=baseClassName.left(i)+baseClassName.right(baseClassName.length()-e); baseClassName=baseClassName.left(i)+baseClassName.right(baseClassName.length()-e);
baseClass=getResolvedClass(baseClassName); baseClass=getResolvedClass(baseClassName);
//printf("baseClass=%p baseClass=%s templSpec=%s\n", //printf("baseClass=%p -> baseClass=%s templSpec=%s\n",
// baseClass,baseClassName.data(),templSpec.data()); // baseClass,baseClassName.data(),templSpec.data());
} }
} }
...@@ -2823,10 +2829,10 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl ...@@ -2823,10 +2829,10 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
{ {
Debug::print(Debug::FindMembers,0, Debug::print(Debug::FindMembers,0,
"1. funcName=`%s'\n",funcName.data()); "1. funcName=`%s'\n",funcName.data());
//if (!funcTempList.isEmpty()) // try with member specialization if (!funcTempList.isEmpty()) // try with member specialization
//{ {
// mn=memberNameDict[funcName+funcTempList]; mn=memberNameDict[funcName+funcTempList];
//} }
if (mn==0) // try without specialization if (mn==0) // try without specialization
{ {
mn=memberNameDict[funcName]; mn=memberNameDict[funcName];
...@@ -2978,15 +2984,39 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl ...@@ -2978,15 +2984,39 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
"Warning: no matching class member found for \n %s", "Warning: no matching class member found for \n %s",
fullFuncDecl.data() fullFuncDecl.data()
); );
int candidates=0;
if (mn->count()>0) if (mn->count()>0)
{
md=mn->first();
while (md)
{
ClassDef *cd=md->memberClass();
if (cd!=0 && cd->name()==className) candidates++;
md=mn->next();
}
}
if (candidates>0)
{ {
warn_cont("Possible candidates:\n"); warn_cont("Possible candidates:\n");
md=mn->first(); md=mn->first();
while (md) while (md)
{ {
ClassDef *cd=md->memberClass(); ClassDef *cd=md->memberClass();
if (!cd || cd->name()==className) if (cd!=0 && cd->name()==className)
warn_cont(" %s\n",md->declaration()); {
warn_cont(" %s",md->declaration());
#if 0
if (cd->name().at(0)!='@')
{
warn_cont(" in class %s",cd->name().data());
}
if (!md->getDefFileName().isEmpty() && md->getDefLine()!=-1)
{
warn_cont(" defined at line %d of file %s",md->getDefLine(),md->getDefFileName().data());
}
#endif
warn_cont("\n");
}
md=mn->next(); md=mn->next();
} }
} }
...@@ -3207,7 +3237,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl ...@@ -3207,7 +3237,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
static void findMemberDocumentation(Entry *root) static void findMemberDocumentation(Entry *root)
{ {
int i=-1,l; int i=-1,l;
QRegExp re("([a-zA-Z0-9: ]*\\*+[ \\*]*"); QRegExp re("([a-z_A-Z0-9: ]*\\*+[ \\*]*");
Debug::print(Debug::FindMembers,0, Debug::print(Debug::FindMembers,0,
"root->type=`%s' root->inside=`%s' root->name=`%s' root->args=`%s' section=%x root->memSpec=%d root->mGrpId=%d\n", "root->type=`%s' root->inside=`%s' root->name=`%s' root->args=`%s' section=%x root->memSpec=%d root->mGrpId=%d\n",
root->type.data(),root->inside.data(),root->name.data(),root->args.data(),root->section,root->memSpec,root->mGrpId root->type.data(),root->inside.data(),root->name.data(),root->args.data(),root->section,root->memSpec,root->mGrpId
...@@ -4374,6 +4404,12 @@ static void generateGroupDocs() ...@@ -4374,6 +4404,12 @@ static void generateGroupDocs()
{ {
//printf("group %s #members=%d\n",gd->name().data(),gd->countMembers()); //printf("group %s #members=%d\n",gd->name().data(),gd->countMembers());
if (gd->countMembers()>0) gd->writeDocumentation(*outputList); if (gd->countMembers()>0) gd->writeDocumentation(*outputList);
else
{
warn(gd->getDefFileName(),gd->getDefLine(),
"Warning: group %s does not have any (documented) members.",
gd->name().data());
}
} }
} }
...@@ -4540,7 +4576,8 @@ static void generateSearchIndex() ...@@ -4540,7 +4576,8 @@ static void generateSearchIndex()
if (f.open(IO_WriteOnly)) if (f.open(IO_WriteOnly))
{ {
QTextStream t(&f); QTextStream t(&f);
t << Config::docURL << endl << Config::cgiURL << "/" << Config::cgiName << endl; t << Config::docURL << endl << Config::cgiURL
<< "/" << Config::cgiName << endl;
f.close(); f.close();
} }
else else
...@@ -5276,9 +5313,21 @@ int main(int argc,char **argv) ...@@ -5276,9 +5313,21 @@ int main(int argc,char **argv)
&inputFiles,0); &inputFiles,0);
s=Config::inputSources.next(); s=Config::inputSources.next();
} }
//msg("Input size %d bytes\n",inputSize);
// add predefined macro name to a dictionary
s=Config::expandAsDefinedList.first();
while (s)
{
if (expandAsDefinedDict[s]==0)
{
expandAsDefinedDict.insert(s,(void *)666);
}
s=Config::expandAsDefinedList.next();
}
BufStr input(inputSize+1); // Add one byte extra for \0 termination BufStr input(inputSize+1); // Add one byte extra for \0 termination
// read and preprocess all input files
readFiles(input); readFiles(input);
if (input.isEmpty()) if (input.isEmpty())
...@@ -5288,9 +5337,10 @@ int main(int argc,char **argv) ...@@ -5288,9 +5337,10 @@ int main(int argc,char **argv)
} }
else else
{ {
msg("Read %d bytes\n",input.length()); msg("Read %d bytes\n",input.curPos());
} }
/************************************************************************** /**************************************************************************
* Handle Tag Files * * Handle Tag Files *
**************************************************************************/ **************************************************************************/
......
...@@ -126,6 +126,7 @@ extern PageInfo *mainPage; ...@@ -126,6 +126,7 @@ extern PageInfo *mainPage;
extern StringDict tagDestinationDict; extern StringDict tagDestinationDict;
extern QIntDict<QCString> memberHeaderDict; // dictionary of the member groups heading extern QIntDict<QCString> memberHeaderDict; // dictionary of the member groups heading
extern QIntDict<QCString> memberDocDict; // dictionary of the member groups heading extern QIntDict<QCString> memberDocDict; // dictionary of the member groups heading
extern QDict<void> expandAsDefinedDict;
extern int annotatedClasses; extern int annotatedClasses;
extern int hierarchyClasses; extern int hierarchyClasses;
......
...@@ -203,7 +203,7 @@ QCString unhtmlify(const char *str) ...@@ -203,7 +203,7 @@ QCString unhtmlify(const char *str)
<Start>^"<h1 align=center>" { // Qt variant <Start>^"<h1 align=center>" { // Qt variant
BEGIN( ReadClassName ); BEGIN( ReadClassName );
} }
<Start>^"<h1>" { // Doxygen variant <Start>^("<hr>")?"<h1>" { // Doxygen variant
BEGIN( ReadClassName ); BEGIN( ReadClassName );
} }
<Start>^"Inherits " { <Start>^"Inherits " {
...@@ -223,7 +223,7 @@ QCString unhtmlify(const char *str) ...@@ -223,7 +223,7 @@ QCString unhtmlify(const char *str)
BEGIN( SkipHTMLTag ); BEGIN( SkipHTMLTag );
} }
<Start>"&"[a-zA-Z]+";" <Start>"&"[a-zA-Z]+";"
<Start>[a-z_A-Z][a-z_A-Z0-9]* { <Start,SkipPreformated>[a-z_A-Z][a-z_A-Z0-9]* {
//printf("tag: %s#%s ref: %s word: `%s'\n", //printf("tag: %s#%s ref: %s word: `%s'\n",
// docBaseLink.data(),docAnchor.data(), // docBaseLink.data(),docAnchor.data(),
// docRefName.data(),yytext); // docRefName.data(),yytext);
...@@ -235,7 +235,7 @@ QCString unhtmlify(const char *str) ...@@ -235,7 +235,7 @@ QCString unhtmlify(const char *str)
<SkipPreformated>"</pre>" { <SkipPreformated>"</pre>" {
BEGIN( Start ); BEGIN( Start );
} }
<SkipPreformated>[^\<]+ <SkipPreformated>[^\<\n]+
<CheckConstructor>[a-z_A-Z0-9~:]+ { <CheckConstructor>[a-z_A-Z0-9~:]+ {
QCString s=yytext; QCString s=yytext;
if (s.find("::")!=-1) if (s.find("::")!=-1)
......
...@@ -80,7 +80,8 @@ void HtmlGenerator::startFile(const char *name,const char *title,bool external) ...@@ -80,7 +80,8 @@ void HtmlGenerator::startFile(const char *name,const char *title,bool external)
"<title>" << title << "</title>\n"; "<title>" << title << "</title>\n";
t << "<link "; t << "<link ";
if (external) if (external)
t << "doxygen=\"_doc:\" href=\"/"; t << "doxygen=\"_doc:" << Config::docURL
<< "\" href=\"" << Config::docURL << "/";
else else
t << "href=\""; t << "href=\"";
if (Config::htmlStyleSheet.isEmpty()) if (Config::htmlStyleSheet.isEmpty())
...@@ -147,7 +148,8 @@ void HtmlGenerator::writeFooter(int part,bool external) ...@@ -147,7 +148,8 @@ void HtmlGenerator::writeFooter(int part,bool external)
t << endl << "<img "; t << endl << "<img ";
if (external) if (external)
{ {
t << "doxygen=\"_doc:\" src=\"/"; t << "doxygen=\"_doc:" << Config::docURL
<< "\" src=\"" << Config::docURL << "/";
} }
else else
{ {
......
...@@ -547,7 +547,7 @@ int countNamespaces() ...@@ -547,7 +547,7 @@ int countNamespaces()
NamespaceDef *nd; NamespaceDef *nd;
for (;(nd=nli.current());++nli) for (;(nd=nli.current());++nli)
{ {
if (nd->isLinkableInProject()) count++; if (nd->isLinkableInProject() && nd->countMembers()>0) count++;
} }
return count; return count;
} }
...@@ -583,7 +583,7 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -583,7 +583,7 @@ void writeNamespaceIndex(OutputList &ol)
NamespaceDef *nd=namespaceList.first(); NamespaceDef *nd=namespaceList.first();
while (nd) while (nd)
{ {
if (nd->isLinkableInProject()) if (nd->isLinkableInProject() && nd->countMembers()>0)
{ {
ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name()); ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
ol.docify(" ("); ol.docify(" (");
...@@ -1456,7 +1456,6 @@ int countGroups() ...@@ -1456,7 +1456,6 @@ int countGroups()
for (;(gd=gli.current());++gli) for (;(gd=gli.current());++gli)
{ {
if (gd->countMembers()>0) count++; if (gd->countMembers()>0) count++;
gd=groupList.next();
} }
return count; return count;
} }
...@@ -1513,7 +1512,6 @@ void writeGroupIndex(OutputList &ol) ...@@ -1513,7 +1512,6 @@ void writeGroupIndex(OutputList &ol)
htmlHelp->incContentsDepth(); htmlHelp->incContentsDepth();
} }
parseText(ol,theTranslator->trModulesDescription()); parseText(ol,theTranslator->trModulesDescription());
//ol.newParagraph();
ol.endTextBlock(); ol.endTextBlock();
writeGroupList(ol); writeGroupList(ol);
if (hasHtmlHelp) if (hasHtmlHelp)
...@@ -1521,7 +1519,6 @@ void writeGroupIndex(OutputList &ol) ...@@ -1521,7 +1519,6 @@ void writeGroupIndex(OutputList &ol)
htmlHelp->decContentsDepth(); htmlHelp->decContentsDepth();
} }
endFile(ol); endFile(ol);
//ol.enable(OutputGenerator::Man);
ol.popGeneratorState(); ol.popGeneratorState();
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
* *
*/ */
#include "message.h"
#include "language.h" #include "language.h"
#if !defined(ENGLISH_ONLY) #if !defined(ENGLISH_ONLY)
#include "translator_nl.h" #include "translator_nl.h"
...@@ -51,6 +52,10 @@ bool setTranslator(const char *langName) ...@@ -51,6 +52,10 @@ bool setTranslator(const char *langName)
} }
else if (L_EQUAL("czech")) else if (L_EQUAL("czech"))
{ {
#ifndef _WIN32
err("Warning: The Czech translation uses the windows code page 1250 encoding.\n"
"Please convert translator_cz.h to ISO Latin-2 to use it under UNIX.\n");
#endif
theTranslator=new TranslatorCzech; theTranslator=new TranslatorCzech;
} }
else if (L_EQUAL("french")) else if (L_EQUAL("french"))
......
...@@ -216,10 +216,29 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -216,10 +216,29 @@ void LatexGenerator::startIndexSection(IndexSections is)
<< " linkcolor=blue" << endl << " linkcolor=blue" << endl
<< " ]{hyperref}" << endl; << " ]{hyperref}" << endl;
} }
// Try to get the command for switching on the language
// support
QCString sLanguageSupportCommand(
theTranslator->latexLanguageSupportCommand());
if (!sLanguageSupportCommand.isEmpty())
{
// The command is not empty. The language does
// not want to use the babel package. Use this
// command instead.
t << sLanguageSupportCommand;
}
else
{
if (!theTranslator->latexBabelPackage().isEmpty()) if (!theTranslator->latexBabelPackage().isEmpty())
{ {
// The result of the LatexLanguageSupportCommand()
// is empty, which means that the language prefers
// the babel package, or no package is needed at all.
if (theTranslator->latexBabelPackage()=="russian") if (theTranslator->latexBabelPackage()=="russian")
{ {
// The russian babel package also needs an encoding.
// Assume the encoding matched the platform.
#if defined(_WIN32) #if defined(_WIN32)
t << "\\usepackage[cp1251]{inputenc}\n"; t << "\\usepackage[cp1251]{inputenc}\n";
#else #else
...@@ -228,6 +247,7 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -228,6 +247,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
} }
t << "\\usepackage[" << theTranslator->latexBabelPackage() << "]{babel}\n"; t << "\\usepackage[" << theTranslator->latexBabelPackage() << "]{babel}\n";
} }
}
const char *s=Config::extraPackageList.first(); const char *s=Config::extraPackageList.first();
while (s) while (s)
...@@ -425,7 +445,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -425,7 +445,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
bool found=FALSE; bool found=FALSE;
while (gd && !found) while (gd && !found)
{ {
if (gd->isLinkableInProject() || gd->countMembers()>0) if (gd->countMembers()>0)
{ {
t << "}\n\\input{" << gd->getOutputFileBase() << "}\n"; t << "}\n\\input{" << gd->getOutputFileBase() << "}\n";
found=TRUE; found=TRUE;
...@@ -434,7 +454,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -434,7 +454,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
} }
while (gd) while (gd)
{ {
if (gd->isLinkableInProject() || gd->countMembers()>0) if (gd->countMembers()>0)
{ {
if (Config::compactLatexFlag) t << "\\input"; else t << "\\include"; if (Config::compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << gd->getOutputFileBase() << "}\n"; t << "{" << gd->getOutputFileBase() << "}\n";
...@@ -602,14 +622,14 @@ void LatexGenerator::writeStyleInfo(int part) ...@@ -602,14 +622,14 @@ void LatexGenerator::writeStyleInfo(int part)
break; break;
case 2: case 2:
{ {
t << " Dimitri van Heesch (c) 1997-2000}]{}\n"; t << " Dimitri van Heesch \\copyright{} 1997-2000}]{}\n";
//QCString dtString=dateToString(FALSE); //QCString dtString=dateToString(FALSE);
t << "\\lfoot[]{\\fancyplain{}{\\bfseries\\scriptsize "; t << "\\lfoot[]{\\fancyplain{}{\\bfseries\\scriptsize ";
} }
break; break;
case 4: case 4:
{ {
t << " Dimitri van Heesch (c) 1997-2000}}\n"; t << " Dimitri van Heesch \\copyright{} 1997-2000}}\n";
t << "\\cfoot{}\n"; t << "\\cfoot{}\n";
t << "\\newenvironment{CompactList}\n"; t << "\\newenvironment{CompactList}\n";
t << "{\\begin{list}{}{\n"; t << "{\\begin{list}{}{\n";
...@@ -812,7 +832,7 @@ void LatexGenerator::startPageRef() ...@@ -812,7 +832,7 @@ void LatexGenerator::startPageRef()
void LatexGenerator::endPageRef(const char *clname, const char *anchor) void LatexGenerator::endPageRef(const char *clname, const char *anchor)
{ {
t << "~\\pageref{"; t << "\\,\\pageref{";
if (clname) t << clname; if (clname) t << clname;
if (anchor) t << "_" << anchor; if (anchor) t << "_" << anchor;
t << "})}"; t << "})}";
...@@ -998,7 +1018,8 @@ void LatexGenerator::writeSectionRef(const char *,const char *lab, ...@@ -998,7 +1018,8 @@ void LatexGenerator::writeSectionRef(const char *,const char *lab,
{ {
if (strcmp(lab,text)!=0) // lab!=text if (strcmp(lab,text)!=0) // lab!=text
{ {
t << "{\\bf " << text << " (\\ref " << lab << ")}}"; // todo: don't hardcode p. here!
t << "{\\bf " << text << "} (p.\\,\\pageref{" << lab << "})";
} }
else else
{ {
...@@ -1022,7 +1043,7 @@ void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab, ...@@ -1022,7 +1043,7 @@ void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab,
startBold(); startBold();
docify(title); docify(title);
endBold(); endBold();
t << " (p.~\\pageref{" << lab << "})" << endl; t << " (p.\\,\\pageref{" << lab << "})" << endl;
} }
//void LatexGenerator::docify(const char *str) //void LatexGenerator::docify(const char *str)
...@@ -1033,9 +1054,10 @@ void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab, ...@@ -1033,9 +1054,10 @@ void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab,
//void LatexGenerator::docifyStatic(QTextStream &t,const char *str) //void LatexGenerator::docifyStatic(QTextStream &t,const char *str)
void LatexGenerator::docify(const char *str) void LatexGenerator::docify(const char *str)
{ {
static bool isJapanese = theTranslator->latexBabelPackage()=="a4j"; static bool isCzech = theTranslator->idLanguage()=="czech";
static bool isRussian = theTranslator->latexBabelPackage()=="russian"; static bool isJapanese = theTranslator->idLanguage()=="japanese";
static bool isGerman = theTranslator->latexBabelPackage()=="german"; static bool isRussian = theTranslator->idLanguage()=="russian";
static bool isGerman = theTranslator->idLanguage()=="german";
if (str) if (str)
{ {
const unsigned char *p=(const unsigned char *)str; const unsigned char *p=(const unsigned char *)str;
......
...@@ -445,8 +445,9 @@ void MemberDef::setMemberDefTemplateArguments(ArgumentList *tal) ...@@ -445,8 +445,9 @@ void MemberDef::setMemberDefTemplateArguments(ArgumentList *tal)
void MemberDef::writeLink(OutputList &ol,ClassDef *cd,NamespaceDef *nd, void MemberDef::writeLink(OutputList &ol,ClassDef *cd,NamespaceDef *nd,
FileDef *fd,GroupDef *gd) FileDef *fd,GroupDef *gd)
{ {
Definition *d; Definition *d=0;
if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else if (gd) d=gd; if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else if (gd) d=gd;
if (d==0) return;
ol.writeObjectLink(d->getReference(),d->getOutputFileBase(),anchor(),name()); ol.writeObjectLink(d->getReference(),d->getOutputFileBase(),anchor(),name());
} }
......
...@@ -758,6 +758,10 @@ Define *newDefine() ...@@ -758,6 +758,10 @@ Define *newDefine()
def->fileName = g_yyFileName; def->fileName = g_yyFileName;
def->lineNr = g_yyLineNr; def->lineNr = g_yyLineNr;
def->varArgs = g_defVarArgs; def->varArgs = g_defVarArgs;
if (!def->name.isEmpty() && expandAsDefinedDict[def->name])
{
def->isPredefined=TRUE;
}
return def; return def;
} }
...@@ -1505,7 +1509,8 @@ BN [ \t\r\n] ...@@ -1505,7 +1509,8 @@ BN [ \t\r\n]
{ {
addDefine(); addDefine();
} }
if (/*!Config::onlyPredefinedFlag &&*/ (def=g_fileDefineDict->find(g_defName))==0) def=g_fileDefineDict->find(g_defName);
if (def==0) // new define
{ {
g_fileDefineDict->insert(g_defName,newDefine()); g_fileDefineDict->insert(g_defName,newDefine());
} }
......
This diff is collapsed.
...@@ -1758,12 +1758,11 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -1758,12 +1758,11 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{ {
//outDoc->writeSectionRefAnchor(sec->fileName,sec->label,text); //outDoc->writeSectionRefAnchor(sec->fileName,sec->label,text);
outDoc->writeObjectLink(0,sec->fileName,sec->label,text); outDoc->writeObjectLink(0,sec->fileName,sec->label,text);
//printf("Writing page ref `%s'\n",sec->label.data());
writePageRef(*outDoc,sec->label,0); writePageRef(*outDoc,sec->label,0);
} }
else else
{ {
//printf(" ref sec=%p sec->fileName=%s\n",sec,sec->fileName.data()); //printf(" ref sec=%p sec->fileName=%s text=%s\n",sec,sec->fileName.data(),text.data());
outDoc->writeSectionRef(sec->fileName,sec->label,text); outDoc->writeSectionRef(sec->fileName,sec->label,text);
} }
} }
...@@ -3246,7 +3245,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -3246,7 +3245,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
<MemberSpec>([*&]*{BN}*)*{ID}("["[a-z_A-Z0-9]*"]")* { // the [] part could be improved. <MemberSpec>([*&]*{BN}*)*{ID}("["[a-z_A-Z0-9]*"]")* { // the [] part could be improved.
lineCount(); lineCount();
int i=0,l=yyleng,j; int i=0,l=yyleng,j;
while (i<l && (!isalpha(yytext[i]))) i++; while (i<l && (!isId(yytext[i]))) i++;
msName = yytext; msName = yytext;
msName = msName.right(msName.length()-i); msName = msName.right(msName.length()-i);
j=msName.find("["); j=msName.find("[");
...@@ -3300,7 +3299,14 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -3300,7 +3299,14 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
// current->parent->section & Entry::COMPOUND_MASK) // current->parent->section & Entry::COMPOUND_MASK)
// varEntry->type+=current->parent->name+"::"; // varEntry->type+=current->parent->name+"::";
if (isTypedef) if (isTypedef)
{
varEntry->type.prepend("typedef "); varEntry->type.prepend("typedef ");
//printf("current->name = %s %s\n",current->name.data(),msName.data());
if (!current->name.isEmpty() && current->name.at(0)!='@')
{
typedefDict.insert(msName,new QCString(current->name));
}
}
varEntry->type+=current->name+msType; varEntry->type+=current->name+msType;
varEntry->fileName = yyFileName; varEntry->fileName = yyFileName;
varEntry->startLine = yyLineNr; varEntry->startLine = yyLineNr;
...@@ -4671,12 +4677,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -4671,12 +4677,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
<Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc>("\\\\"|"@@")"f"[$\[\]] { <Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc>("\\\\"|"@@")"f"[$\[\]] {
current->doc += &yytext[1]; current->doc += &yytext[1];
} }
<Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc>{CMD}"f$" { <Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief>{CMD}"f$" {
lastFormulaContext = YY_START; lastFormulaContext = YY_START;
formulaText="$"; formulaText="$";
BEGIN(ReadFormulaShort); BEGIN(ReadFormulaShort);
} }
<Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc>{CMD}"f[" { <Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief>{CMD}"f[" {
lastFormulaContext = YY_START; lastFormulaContext = YY_START;
formulaText="\\["; formulaText="\\[";
BEGIN(ReadFormulaLong); BEGIN(ReadFormulaLong);
...@@ -4685,7 +4691,9 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -4685,7 +4691,9 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
formulaText+="$"; formulaText+="$";
if (lastFormulaContext==ClassDocBrief || if (lastFormulaContext==ClassDocBrief ||
lastFormulaContext==LineDoc || lastFormulaContext==LineDoc ||
lastFormulaContext==JavaDoc lastFormulaContext==JavaDoc ||
lastFormulaContext==AfterDocBrief ||
lastFormulaContext==AfterDocLine
) )
current->brief += addFormula(); current->brief += addFormula();
else else
...@@ -4696,7 +4704,9 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -4696,7 +4704,9 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
formulaText+="\\]"; formulaText+="\\]";
if (lastFormulaContext==ClassDocBrief || if (lastFormulaContext==ClassDocBrief ||
lastFormulaContext==LineDoc || lastFormulaContext==LineDoc ||
lastFormulaContext==JavaDoc lastFormulaContext==JavaDoc ||
lastFormulaContext==AfterDocBrief ||
lastFormulaContext==AfterDocLine
) )
current->brief += addFormula(); current->brief += addFormula();
else else
......
...@@ -38,7 +38,7 @@ bool writeNumber(QFile &f,int num) ...@@ -38,7 +38,7 @@ bool writeNumber(QFile &f,int num)
(f.putch(num&0xff)==-1); (f.putch(num&0xff)==-1);
} }
bool writeEncodedNumber(QFile &f,uint number) static bool writeEncodedNumber(QFile &f,uint number)
{ {
bool error=FALSE; bool error=FALSE;
uint n=number; uint n=number;
...@@ -52,7 +52,7 @@ bool writeEncodedNumber(QFile &f,uint number) ...@@ -52,7 +52,7 @@ bool writeEncodedNumber(QFile &f,uint number)
return error; return error;
} }
int encodedNumberSize(uint number) static int encodedNumberSize(uint number)
{ {
uint n=number; uint n=number;
int size=1; int size=1;
......
...@@ -29,10 +29,6 @@ class IndexTree; ...@@ -29,10 +29,6 @@ class IndexTree;
enum WordRefMasks { WORDINNAME_MASK=4, INNAME_MASK=2, FULLWORD_MASK=1 }; enum WordRefMasks { WORDINNAME_MASK=4, INNAME_MASK=2, FULLWORD_MASK=1 };
enum WordRefBits { WORDINNAME_BIT=2, INNAME_BIT=1, FULLWORD_BIT=0 }; enum WordRefBits { WORDINNAME_BIT=2, INNAME_BIT=1, FULLWORD_BIT=0 };
// bool inName;
// bool fullWord;
// bool wordInName;
struct WordRef struct WordRef
{ {
int id; int id;
...@@ -77,7 +73,6 @@ class SuffixTree ...@@ -77,7 +73,6 @@ class SuffixTree
SuffixTree(); SuffixTree();
~SuffixTree(); ~SuffixTree();
void insertWord(const char *word,int index,bool inName); void insertWord(const char *word,int index,bool inName);
//void buildIndex();
void resolveForwardReferences(); void resolveForwardReferences();
void dump(); void dump();
int size(); // return the size of the (flat) tree in bytes int size(); // return the size of the (flat) tree in bytes
......
...@@ -25,38 +25,33 @@ ...@@ -25,38 +25,33 @@
class Translator class Translator
{ {
public: public:
//--------------------------------------------------------------------
// NOTICE:
// the following functions are now obsolete: these are no longer used and
// will disappear in future versions. You do not have to translate them!
virtual QCString trInherits()
{ return "Inherits"; }
virtual QCString trAnd()
{ return "and"; }
virtual QCString trInheritedBy()
{ return "Inherited By"; }
virtual QCString trReference()
{ return "Reference"; }
virtual QCString trReimplementedFrom()
{ return "Reimplemented from"; }
virtual QCString trReimplementedIn()
{ return "Reimplemented in"; }
virtual QCString trIncludeFile()
{ return "Include File"; }
virtual QCString trGeneratedFrom(const char *s,bool single)
{
QCString result=(QCString)"The documentation for this"+s+
" was generated from the following file";
if (single) result+=":"; else result+="s:";
return result;
}
// end of obsolete functions
//--------------------------------------------------------------------
// --- Language contol methods -------------------
/*! Used for identification of the language. May resemble
* the string returned by latexBabelPackage(), but it is not used
* for the same purpose. The identification should not be translated.
* It should be replaced by the name of the language in English
* (e.g. Czech, Japanese, Russian, etc.). It should be equal to
* the identification in language.h.
*/
virtual QCString idLanguage()
{ return "english"; }
/*! Used to get the command(s) for the language support. This method
* was designed for languages which do not prefer babel package.
* If this methods returns empty string, then the latexBabelPackage()
* method is used to generate the command for using the babel package.
*/
virtual QCString latexLanguageSupportCommand()
{
return "";
}
/*! returns the name of the package that is included by LaTeX */ /*! returns the name of the package that is included by LaTeX */
virtual QCString latexBabelPackage() virtual QCString latexBabelPackage()
{ return ""; } { return ""; }
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */ /*! used in the compound documentation before a list of related functions. */
virtual QCString trRelatedFunctions() virtual QCString trRelatedFunctions()
{ return "Related Functions"; } { return "Related Functions"; }
......
This diff is collapsed.
...@@ -25,26 +25,8 @@ ...@@ -25,26 +25,8 @@
class TranslatorGerman : public Translator class TranslatorGerman : public Translator
{ {
public: public:
//-------------------------------------------------------------------- QCString idLanguage()
// NOTICE: { return "german"; }
// the following functions are now obsolete: these are no longer used and
// will disappear in future versions. You do not have to translate them!
QCString trInherits()
{ return "Abgeleitet von "; }
QCString trAnd()
{ return "und"; }
QCString trInheritedBy()
{ return "Basisklasse f&uuml;r"; }
QCString trReference()
{ return "Verweis"; }
QCString trReimplementedFrom()
{ return "Implementiert von"; }
QCString trReimplementedIn()
{ return "erneute Implementation in"; }
QCString trIncludeFile()
{ return "Include-Datei"; }
// end of obsolete functions
//--------------------------------------------------------------------
QCString latexBabelPackage() QCString latexBabelPackage()
// returns the name of the package that is included by LaTeX // returns the name of the package that is included by LaTeX
......
...@@ -30,34 +30,8 @@ ...@@ -30,34 +30,8 @@
class TranslatorSpanish : public Translator class TranslatorSpanish : public Translator
{ {
public: public:
//-------------------------------------------------------------------- virtual QCString idLanguage()
// NOTICE: { return "spanish"; }
// the following functions are now obsolete: these are no longer used and
// will disappear in future versions. You do not have to translate them!
virtual QCString trInherits()
{ return "Inherits"; }
virtual QCString trAnd()
{ return "y"; }
virtual QCString trInheritedBy()
{ return "Inherited By"; }
virtual QCString trReference()
{ return "Referencia"; }
virtual QCString trReimplementedFrom()
{ return "Reimplementado de"; }
virtual QCString trReimplementedIn()
{ return "Reimplementado en"; }
virtual QCString trIncludeFile()
{ return "Include File"; }
virtual QCString trGeneratedFrom(const char *s,bool single)
{
QCString result=(QCString)"The documentation for this"+s+
" was generated from the following file";
if (single) result+=":"; else result+="s:";
return result;
}
// end of obsolete functions
//--------------------------------------------------------------------
/*! returns the name of the package that is included by LaTeX */ /*! returns the name of the package that is included by LaTeX */
virtual QCString latexBabelPackage() virtual QCString latexBabelPackage()
{ return ""; } { return ""; }
......
...@@ -79,6 +79,8 @@ positiiviset kommentit otetaan ilolla vastaan. ...@@ -79,6 +79,8 @@ positiiviset kommentit otetaan ilolla vastaan.
class TranslatorFinnish : public Translator class TranslatorFinnish : public Translator
{ {
public: public:
QCString idLanguage()
{ return "finnish"; }
QCString latexBabelPackage() QCString latexBabelPackage()
// returns the name of the package that is included by LaTeX // returns the name of the package that is included by LaTeX
{ return "finnish"; } { return "finnish"; }
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
class TranslatorFrench : public Translator class TranslatorFrench : public Translator
{ {
public: public:
QCString idLanguage()
{ return "french"; }
/*! returns the name of the package that is included by LaTeX */ /*! returns the name of the package that is included by LaTeX */
QCString latexBabelPackage() QCString latexBabelPackage()
{ return "french"; } { return "french"; }
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
class TranslatorCroatian : public Translator class TranslatorCroatian : public Translator
{ {
public: public:
QCString idLanguage()
{ return "croatian"; }
QCString latexBabelPackage() QCString latexBabelPackage()
{ return "croatian"; } { return "croatian"; }
QCString trRelatedFunctions() QCString trRelatedFunctions()
......
...@@ -33,34 +33,8 @@ ...@@ -33,34 +33,8 @@
class TranslatorItalian : public Translator class TranslatorItalian : public Translator
{ {
public: public:
//-------------------------------------------------------------------- QCString idLanguage()
// NOTICE: { return "italian"; }
// the following functions are now obsolete: these are no longer used and
// will disappear in future versions. You do not have to translate them!
QCString trInherits()
{ return "Inherits"; }
QCString trAnd()
{ return "and"; }
QCString trInheritedBy()
{ return "Inherited By"; }
QCString trReference()
{ return "Reference"; }
QCString trReimplementedFrom()
{ return "Reimplemented from"; }
QCString trReimplementedIn()
{ return "Reimplemented in"; }
QCString trIncludeFile()
{ return "Include File"; }
QCString trGeneratedFrom(const char *s,bool single)
{
QCString result=(QCString)"The documentation for this"+s+
" was generated from the following file";
if (single) result+=":"; else result+="s:";
return result;
}
// end of obsolete functions
//--------------------------------------------------------------------
/*! returns the name of the package that is included by LaTeX */ /*! returns the name of the package that is included by LaTeX */
QCString latexBabelPackage() QCString latexBabelPackage()
{ return "italian"; } { return "italian"; }
......
...@@ -23,33 +23,8 @@ ...@@ -23,33 +23,8 @@
class TranslatorJapanese : public Translator class TranslatorJapanese : public Translator
{ {
public: public:
//-------------------------------------------------------------------- QCString idLanguage()
// NOTICE: { return "japanese"; }
// the following functions are now obsolete: these are no longer used and
// will disappear in future versions. You do not have to translate them!
QCString trInherits()
{ return "継承"; }
QCString trAnd()
{ return "と"; }
QCString trInheritedBy()
{ return "次に継承されています。"; }
QCString trReference()
{ return "リファレンス"; }
QCString trReimplementedFrom()
{ return "次を再定義"; }
QCString trReimplementedIn()
{ return "次で再定義"; }
QCString trIncludeFile()
{ return "インクルードファイル"; }
QCString trGeneratedFrom(const char *s,bool)
{
QCString result=(QCString)"この"+s+
"に対するドキュメントは以下のファイルから生成されました。";
return result;
}
// end of obsolete functions
//--------------------------------------------------------------------
/*! returns the name of the package that is included by LaTeX */ /*! returns the name of the package that is included by LaTeX */
QCString latexBabelPackage() QCString latexBabelPackage()
{ return "a4j"; } { return "a4j"; }
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
class TranslatorDutch : public Translator class TranslatorDutch : public Translator
{ {
public: public:
QCString idLanguage()
{ return "dutch"; }
QCString latexBabelPackage() QCString latexBabelPackage()
{ return "dutch"; } { return "dutch"; }
QCString trRelatedFunctions() QCString trRelatedFunctions()
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
class TranslatorRussian : public Translator class TranslatorRussian : public Translator
{ {
public: public:
QCString idLanguage()
{ return "russian"; }
QCString latexBabelPackage() QCString latexBabelPackage()
{ return "russian"; } { return "russian"; }
QCString trRelatedFunctions() QCString trRelatedFunctions()
......
...@@ -67,6 +67,8 @@ Problem! ...@@ -67,6 +67,8 @@ Problem!
class TranslatorSwedish : public Translator class TranslatorSwedish : public Translator
{ {
public: public:
QCString idLanguage()
{ return "swedish"; }
QCString latexBabelPackage() QCString latexBabelPackage()
{ return "swedish"; } { return "swedish"; }
......
...@@ -212,6 +212,10 @@ ClassDef *getResolvedClass(const char *name) ...@@ -212,6 +212,10 @@ ClassDef *getResolvedClass(const char *name)
QCString *subst = typedefDict[name]; QCString *subst = typedefDict[name];
if (subst) // there is a typedef with this name if (subst) // there is a typedef with this name
{ {
if (*subst==name) // avoid resolving typedef struct foo foo;
{
return classDict[name];
}
int count=0; // recursion detection guard int count=0; // recursion detection guard
QCString *newSubst; QCString *newSubst;
while ((newSubst=typedefDict[*subst]) && count<10) while ((newSubst=typedefDict[*subst]) && count<10)
...@@ -241,11 +245,20 @@ QCString removeRedundantWhiteSpace(const QCString &s) ...@@ -241,11 +245,20 @@ QCString removeRedundantWhiteSpace(const QCString &s)
if (s.isEmpty()) return s; if (s.isEmpty()) return s;
QCString result; QCString result;
uint i; uint i;
for (i=0;i<s.length();i++) uint l=s.length();
for (i=0;i<l;i++)
{ {
char c=s.at(i); char c=s.at(i);
if (c!=' ' || if (i<l-2 && c=='<' && s.at(i+1)!='<')
(i!=0 && i!=s.length()-1 && isId(s.at(i-1)) && isId(s.at(i+1))) {
result+="< ";
}
else if (i>0 && c=='>' && s.at(i-1)!='>')
{
result+=" >";
}
else if (c!=' ' ||
(i!=0 && i!=l-1 && isId(s.at(i-1)) && isId(s.at(i+1)))
) )
{ {
if ((c=='*' || c=='&' || c=='@') && if ((c=='*' || c=='&' || c=='@') &&
...@@ -547,7 +560,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext) ...@@ -547,7 +560,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext)
//bool texEnabled = ol.isEnabled(OutputGenerator::Latex); //bool texEnabled = ol.isEnabled(OutputGenerator::Latex);
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
QCString extLink,absPath; QCString extLink,absPath;
if (ext) { extLink="_doc"; absPath="/"; } if (ext) { extLink="_doc"; absPath=Config::docURL+"/"; }
//if (manEnabled) ol.disable(OutputGenerator::Man); //if (manEnabled) ol.disable(OutputGenerator::Man);
//if (texEnabled) ol.disable(OutputGenerator::Latex); //if (texEnabled) ol.disable(OutputGenerator::Latex);
if (compact) ol.startCenter(); else ol.startItemList(); if (compact) ol.startCenter(); else ol.startItemList();
...@@ -651,7 +664,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext) ...@@ -651,7 +664,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext)
if (Config::searchEngineFlag) if (Config::searchEngineFlag)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem("_cgi",""); ol.startQuickIndexItem("_cgi",Config::cgiURL+"/"+Config::cgiName);
parseText(ol,theTranslator->trSearch()); parseText(ol,theTranslator->trSearch());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
...@@ -968,6 +981,8 @@ static void trimNamespaceScope(QCString &t1,QCString &t2) ...@@ -968,6 +981,8 @@ static void trimNamespaceScope(QCString &t1,QCString &t2)
void stripIrrelevantConstVolatile(QCString &s) void stripIrrelevantConstVolatile(QCString &s)
{ {
int i,j; int i,j;
if (s=="const") { s.resize(0); return; }
if (s=="volatile") { s.resize(0); return; }
i = s.find("const "); i = s.find("const ");
if (i!=-1) if (i!=-1)
{ {
...@@ -2323,8 +2338,10 @@ QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &te ...@@ -2323,8 +2338,10 @@ QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &te
QCString stripScope(const char *name) QCString stripScope(const char *name)
{ {
QCString result = name; QCString result = name;
int i=result.findRev("::"); int ti=result.find('<'); // find start of template
if (i!=-1) if (ti==-1) ti=result.length();
int i = ti>2 ? result.findRev("::",ti-2) : -1; // find scope just before template
if (i!=-1) // found scope
{ {
result=result.right(result.length()-i-2); result=result.right(result.length()-i-2);
} }
......
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