summaryrefslogtreecommitdiffstats
path: root/Doc/libgl.tex
blob: c32ea6f581cb4103d7fcb031089c0acd6e0729e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
\section{Built-in Module \sectcode{gl}}
\bimodindex{gl}

This module provides access to the Silicon Graphics
{\em Graphics Library}.
It is available only on Silicon Graphics machines.

\strong{Warning:}
Some illegal calls to the GL library cause the Python interpreter to dump
core.
In particular, the use of most GL calls is unsafe before the first
window is opened.

The module is too large to document here in its entirety, but the
following should help you to get started.
The parameter conventions for the C functions are translated to Python as
follows:

\begin{itemize}
\item
All (short, long, unsigned) int values are represented by Python
integers.
\item
All float and double values are represented by Python floating point
numbers.
In most cases, Python integers are also allowed.
\item
All arrays are represented by one-dimensional Python lists.
In most cases, tuples are also allowed.
\item
\begin{sloppypar}
All string and character arguments are represented by Python strings,
for instance,
\code{winopen('Hi There!')}
and
\code{rotate(900, 'z')}.
\end{sloppypar}
\item
All (short, long, unsigned) integer arguments or return values that are
only used to specify the length of an array argument are omitted.
For example, the C call

\bcode\begin{verbatim}
lmdef(deftype, index, np, props)
\end{verbatim}\ecode

is translated to Python as

\bcode\begin{verbatim}
lmdef(deftype, index, props)
\end{verbatim}\ecode

\item
Output arguments are omitted from the argument list; they are
transmitted as function return values instead.
If more than one value must be returned, the return value is a tuple.
If the C function has both a regular return value (that is not omitted
because of the previous rule) and an output argument, the return value
comes first in the tuple.
Examples: the C call

\bcode\begin{verbatim}
getmcolor(i, &red, &green, &blue)
\end{verbatim}\ecode

is translated to Python as

\bcode\begin{verbatim}
red, green, blue = getmcolor(i)
\end{verbatim}\ecode

\end{itemize}

The following functions are non-standard or have special argument
conventions:

\renewcommand{\indexsubitem}{(in module gl)}
\begin{funcdesc}{varray}{argument}
%JHXXX the argument-argument added
Equivalent to but faster than a number of
\code{v3d()}
calls.
The \var{argument} is a list (or tuple) of points.
Each point must be a tuple of coordinates
\code{(\var{x}, \var{y}, \var{z})} or \code{(\var{x}, \var{y})}.
The points may be 2- or 3-dimensional but must all have the
same dimension.
Float and int values may be mixed however.
The points are always converted to 3D double precision points
by assuming \code{\var{z} = 0.0} if necessary (as indicated in the man page),
and for each point
\code{v3d()}
is called.
\end{funcdesc}

\begin{funcdesc}{nvarray}{}
Equivalent to but faster than a number of
\code{n3f}
and
\code{v3f}
calls.
The argument is an array (list or tuple) of pairs of normals and points.
Each pair is a tuple of a point and a normal for that point.
Each point or normal must be a tuple of coordinates
\code{(\var{x}, \var{y}, \var{z})}.
Three coordinates must be given.
Float and int values may be mixed.
For each pair,
\code{n3f()}
is called for the normal, and then
\code{v3f()}
is called for the point.
\end{funcdesc}

\begin{funcdesc}{vnarray}{}
Similar to 
\code{nvarray()}
but the pairs have the point first and the normal second.
\end{funcdesc}

\begin{funcdesc}{nurbssurface}{s_k\, t_k\, ctl\, s_ord\, t_ord\, type}
% XXX s_k[], t_k[], ctl[][]
%\itembreak
Defines a nurbs surface.
The dimensions of
\code{\var{ctl}[][]}
are computed as follows:
\code{[len(\var{s_k}) - \var{s_ord}]},
\code{[len(\var{t_k}) - \var{t_ord}]}.
\end{funcdesc}

\begin{funcdesc}{nurbscurve}{knots\, ctlpoints\, order\, type}
Defines a nurbs curve.
The length of ctlpoints is
\code{len(\var{knots}) - \var{order}}.
\end{funcdesc}

\begin{funcdesc}{pwlcurve}{points\, type}
Defines a piecewise-linear curve.
\var{points}
is a list of points.
\var{type}
must be
\code{N_ST}.
\end{funcdesc}

\begin{funcdesc}{pick}{n}
\funcline{select}{n}
The only argument to these functions specifies the desired size of the
pick or select buffer.
\end{funcdesc}

\begin{funcdesc}{endpick}{}
\funcline{endselect}{}
These functions have no arguments.
They return a list of integers representing the used part of the
pick/select buffer.
No method is provided to detect buffer overrun.
\end{funcdesc}

Here is a tiny but complete example GL program in Python:

\bcode\begin{verbatim}
import gl, GL, time

def main():
    gl.foreground()
    gl.prefposition(500, 900, 500, 900)
    w = gl.winopen('CrissCross')
    gl.ortho2(0.0, 400.0, 0.0, 400.0)
    gl.color(GL.WHITE)
    gl.clear()
    gl.color(GL.RED)
    gl.bgnline()
    gl.v2f(0.0, 0.0)
    gl.v2f(400.0, 400.0)
    gl.endline()
    gl.bgnline()
    gl.v2f(400.0, 0.0)
    gl.v2f(0.0, 400.0)
    gl.endline()
    time.sleep(5)

main()
\end{verbatim}\ecode

\section{Standard Modules \sectcode{GL} and \sectcode{DEVICE}}
\nodename{GL and DEVICE}
\stmodindex{GL}
\stmodindex{DEVICE}

These modules define the constants used by the Silicon Graphics
{\em Graphics Library}
that C programmers find in the header files
\file{<gl/gl.h>}
and
\file{<gl/device.h>}.
Read the module source files for details.
amp;id=12c4bdb0e8d96640423bd6878dac2aecacb2d741'>Misc/NEWS
@@ -201,6 +201,9 @@ Library
Extension Modules
-----------------
+
+- Issue #3366: Add gamma function to math module.
+
- Issue #6877: It is now possible to link the readline extension to the
libedit readline emulation on OSX 10.5 or later.
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.cDEFINED
+ \addindex EXPAND_AS_DEFINED + If the \c MACRO_EXPANSION and \c EXPAND_PREDEF_ONLY tags are set to \c YES then + this tag can be used to specify a list of macro names that should be expanded. + The macro definition that is found in the sources will be used. + Use the \c PREDEFINED tag if you want to use a different macro definition. \subsection config_extref External reference options diff --git a/doc/language.doc b/doc/language.doc index cdb3d1f..c3e04ca 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -59,7 +59,7 @@ Here is a list of the languages and their current maintainers: - bordeux@NOSPAM.lig.di.epfl.ch + bordeux@NOSPAM.lig.di.epfl.ch @@ -72,9 +72,9 @@ Here is a list of the languages and their current maintainers: - sahag96@NOSPAM.nts.mh.se
+ sahag96@NOSPAM.nts.mh.se
- xet@NOSPAM.hem.passagen.se + xet@NOSPAM.hem.passagen.se @@ -82,9 +82,12 @@ Here is a list of the languages and their current maintainers: Czech + Petr Prikryl
Vlastimil Havran + + prikrylp@NOSPAM.skil.cz havran@NOSPAM.fel.cvut.cz @@ -206,7 +209,8 @@ Here is a list of the languages and their current maintainers: Swedish & Samuel H\"agglund & {\tt sahag96@nts.mh.se} \\ & XeT Erixon & {\tt xet@hem.passagen.se} \\ \hline - Czech & Vlastimil Havran & {\tt havran@fel.cvut.cz} \\ + Czech & Petr Prikryl & {\tt prikrylp@skil.cz} \\ + & Vlastimil Havran & {\tt havran@fel.cvut.cz} \\ \hline Romanian & Ionutz Borcoman & {\tt borco@borco-ei.eng.hokudai.ac.jp} \\ \hline diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index 4909686..eeb5dfc 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,5 +1,5 @@ Name: doxygen -Version: 1.1.4-20000625 +Version: 1.1.5 Summary: documentation system for C, C++ and IDL Release: 1 Source0: doxygen-%{version}.src.tar.gz diff --git a/src/classdef.cpp b/src/classdef.cpp index daacfba..558d33b 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1605,8 +1605,14 @@ void ClassDef::determineImplUsageRelation() int brCount=1; while (te') brCount--; + if (type.at(te)=='<') + { + if (te') + { + if (te') te++; else brCount--; + } te++; } } @@ -1614,6 +1620,7 @@ void ClassDef::determineImplUsageRelation() if (te>ts) templSpec = type.mid(ts,te-ts); ClassDef *cd=getResolvedClass(name()+"::"+type.mid(i,l)); 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 { found=TRUE; diff --git a/src/code.l b/src/code.l index a057a23..79ddac7 100644 --- a/src/code.l +++ b/src/code.l @@ -118,6 +118,7 @@ static const char * g_currentFontClass; static bool g_searchingForBody; static bool g_insideBody; static int g_bodyCurlyCount; +static ClassDef * g_classVar; /*! 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 @@ -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, const char *memberName,OutputList &result, const char *text=0) @@ -375,10 +404,11 @@ static bool getLink(const char *className, } } 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()) { + g_classVar = stripClassName(md->typeString()); if (g_currentDefinition && g_currentMemberDef && md!=g_currentMemberDef && g_insideBody) { @@ -393,32 +423,47 @@ static bool getLink(const char *className, return FALSE; } -static ClassDef *stripClassName(const char *s) +static bool generateClassMemberLink(OutputList &ol,ClassDef *mcd,const char *memName) { - 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) + //printf("generateClassMemberLink(%s,%s)\n",mcd->name().data(),memName); + MemberName *mmn=memberNameDict[memName]; + if (mmn) { - 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) + MemberNameIterator mmni(*mmn); + MemberDef *mmd,*xmd=0; + ClassDef *xcd=0; + const int maxInheritanceDepth = 100000; + int mdist=maxInheritanceDepth; + for (;(mmd=mmni.current());++mmni) { - cd=getResolvedClass(clName); + int m=minClassDistance(mcd,mmd->memberClass()); + if (mmemberClass()->isLinkable()) + { + 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); + } + + // write the actual link + writeMultiLineCodeLink(ol,xcd->getReference(), + xcd->getOutputFileBase(),xmd->anchor(),memName); + return TRUE; } - p=i+l; } - return 0; + return FALSE; } 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()); if (mcd && mcd->isLinkable()) { + if (generateClassMemberLink(ol,mcd,memName)) return; +#if 0 //printf("Found class `%s'\n",mcd->name().data()); MemberName *mmn=memberNameDict[memName]; if (mmn) @@ -524,6 +571,7 @@ static void generateMemberLink(OutputList &ol,const char *varName, return; } } +#endif } } } @@ -925,9 +973,21 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" } {SCOPENAME}/{B}*"(" { if (!g_name.isEmpty()) + { 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 + { g_code->codify(yytext); + } g_name.resize(0);g_type.resize(0); g_bracketCount=0; BEGIN(FuncCall); @@ -1350,6 +1410,7 @@ void parseCode(OutputList &ol,const char *className,const QCString &s, g_bodyCurlyCount = 0; g_bracketCount = 0; g_sharpCount = 0; + g_classVar = 0; g_classScope = className; g_exampleBlock = exBlock; g_exampleName = exName; diff --git a/src/config.h b/src/config.h index 9330012..9665dbb 100644 --- a/src/config.h +++ b/src/config.h @@ -96,15 +96,17 @@ struct Config static QCString rtfOutputDir; // the directory to put the RTF files static bool compactRTFFlag; // generate more compact 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 QCString manOutputDir; // the directory to put the man pages static QCString manExtension; // extension the man page files static bool preprocessingFlag; // enable preprocessing static bool macroExpansionFlag; // expand macros in the source. + static bool onlyPredefinedFlag; // expand only predefined macros static bool searchIncludeFlag; // search for included files static QStrList includePath; // list of include paths 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 QCString genTagFile; // the tag file to generate static bool allExtFlag; // include all external classes flag diff --git a/src/config.l b/src/config.l index 780e9ce..57064e7 100644 --- a/src/config.l +++ b/src/config.l @@ -131,15 +131,17 @@ bool Config::generateRTF = TRUE; QCString Config::rtfOutputDir = "rtf"; bool Config::compactRTFFlag = FALSE; bool Config::rtfHyperFlag = FALSE; +QCString Config::rtfStylesheetFile; bool Config::generateMan = TRUE; QCString Config::manOutputDir = "man"; QCString Config::manExtension = ".3"; bool Config::preprocessingFlag = TRUE; bool Config::macroExpansionFlag = FALSE; +bool Config::onlyPredefinedFlag = FALSE; bool Config::searchIncludeFlag = TRUE; QStrList Config::includePath; QStrList Config::predefined; -bool Config::onlyPredefinedFlag = FALSE; +QStrList Config::expandAsDefinedList; QStrList Config::tagFileList; QCString Config::genTagFile; bool Config::allExtFlag = FALSE; @@ -175,8 +177,6 @@ static bool * b=0; static QStrList * l=0; static int lastState; static QCString elemStr; -//static QCString tabSizeString; -//static QCString colsInAlphaIndexString; static QCString tabSizeString; static QCString colsInAlphaIndexString; static QCString maxDotGraphWidthString; @@ -279,15 +279,17 @@ static int yyread(char *buf,int max_size) "RTF_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::rtfOutputDir; s->resize(0); } "COMPACT_RTF"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactRTFFlag; } "RTF_HYPERLINKS"[ \t]*"=" { BEGIN(GetBool); b=&Config::rtfHyperFlag; } +"RTF_STYLESHEET_FILE"[ \t]*"=" { BEGIN(GetString); s=&Config::rtfStylesheetFile; s->resize(0); } "GENERATE_MAN"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateMan; } "MAN_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::manOutputDir; s->resize(0); } "MAN_EXTENSION"[ \t]*"=" { BEGIN(GetString); s=&Config::manExtension; s->resize(0); } "ENABLE_PREPROCESSING"[ \t]*"=" { BEGIN(GetBool); b=&Config::preprocessingFlag; } "MACRO_EXPANSION"[ \t]*"=" { BEGIN(GetBool); b=&Config::macroExpansionFlag; } +"EXPAND_ONLY_PREDEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::onlyPredefinedFlag; } "SEARCH_INCLUDES"[ \t]*"=" { BEGIN(GetBool); b=&Config::searchIncludeFlag; } "INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::includePath; l->clear(); elemStr=""; } "PREDEFINED"[ \t]*"=" { BEGIN(GetStrList); l=&Config::predefined; l->clear(); elemStr=""; } -"EXPAND_ONLY_PREDEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::onlyPredefinedFlag; } +"EXPAND_AS_DEFINED"[ \t]*"=" { BEGIN(GetStrList); l=&Config::expandAsDefinedList; l->clear(); elemStr=""; } "TAGFILES"[ \t]*"=" { BEGIN(GetStrList); l=&Config::tagFileList; l->clear(); elemStr=""; } "GENERATE_TAGFILE"[ \t]*"=" { BEGIN(GetString); s=&Config::genTagFile; s->resize(0); } "ALLEXTERNALS"[ \t]*"=" { BEGIN(GetBool); b=&Config::allExtFlag; } @@ -546,6 +548,7 @@ void dumpConfig() printf("rtfOutputDir=`%s'\n",Config::rtfOutputDir.data()); printf("compactRTFFlag=`%d'\n",Config::compactRTFFlag); printf("rtfHyperFlag=`%d'\n",Config::rtfHyperFlag); + printf("rtfStylesheetFile=`%s'\n",Config::rtfStylesheetFile.data()); printf("# configuration options related to the man page output\n"); printf("generateMan=`%d'\n",Config::generateMan); printf("manOutputDir=`%s'\n",Config::manOutputDir.data()); @@ -553,6 +556,7 @@ void dumpConfig() printf("# Configuration options related to the preprocessor \n"); printf("preprocessingFlag=`%d'\n",Config::preprocessingFlag); printf("macroExpansionFlag=`%d'\n",Config::macroExpansionFlag); + printf("onlyPredefinedFlag=`%d'\n",Config::onlyPredefinedFlag); printf("searchIncludeFlag=`%d'\n",Config::searchIncludeFlag); { char *is=Config::includePath.first(); @@ -570,7 +574,14 @@ void dumpConfig() 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"); { char *is=Config::tagFileList.first(); @@ -677,15 +688,17 @@ void Config::init() Config::rtfOutputDir = "rtf"; Config::compactRTFFlag = FALSE; Config::rtfHyperFlag = FALSE; + Config::rtfStylesheetFile.resize(0); Config::generateMan = TRUE; Config::manOutputDir = "man"; Config::manExtension = ".3"; Config::preprocessingFlag = TRUE; Config::macroExpansionFlag = FALSE; + Config::onlyPredefinedFlag = FALSE; Config::searchIncludeFlag = TRUE; Config::includePath.clear(); Config::predefined.clear(); - Config::onlyPredefinedFlag = FALSE; + Config::expandAsDefinedList.clear(); Config::tagFileList.clear(); Config::genTagFile.resize(0); Config::allExtFlag = FALSE; @@ -1556,6 +1569,17 @@ void writeTemplateConfig(QFile *f,bool 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"; t << "# configuration options related to the man page output\n"; @@ -1614,7 +1638,8 @@ void writeTemplateConfig(QFile *f,bool sl) t << "\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 << "# 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 << "MACRO_EXPANSION = "; @@ -1623,6 +1648,17 @@ void writeTemplateConfig(QFile *f,bool 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 << "# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files \n"; t << "# in the INCLUDE_PATH (see below) will be search if a #include is found. \n"; t << "\n"; @@ -1657,13 +1693,14 @@ void writeTemplateConfig(QFile *f,bool 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 tag. \n"; + t << "# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then \n"; + t << "# this tag can be used to specify a list of macro names that should be expanded. \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 << "EXPAND_ONLY_PREDEF = "; - writeBoolValue(t,Config::onlyPredefinedFlag); + t << "EXPAND_AS_DEFINED = "; + writeStringList(t,Config::expandAsDefinedList); t << "\n"; if (!sl) { @@ -1942,6 +1979,56 @@ void configStrToVal() } 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) @@ -2073,10 +2160,12 @@ void substituteEnvironmentVars() substEnvVarsInStrList( Config::extraPackageList ); substEnvVarsInString( Config::latexHeaderFile ); substEnvVarsInString( Config::rtfOutputDir ); + substEnvVarsInString( Config::rtfStylesheetFile ); substEnvVarsInString( Config::manOutputDir ); substEnvVarsInString( Config::manExtension ); substEnvVarsInStrList( Config::includePath ); substEnvVarsInStrList( Config::predefined ); + substEnvVarsInStrList( Config::expandAsDefinedList ); substEnvVarsInStrList( Config::tagFileList ); substEnvVarsInString( Config::genTagFile ); substEnvVarsInString( Config::perlPath ); diff --git a/src/definition.cpp b/src/definition.cpp index 629a45a..1d663ab 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -143,7 +143,7 @@ static bool readCodeFragment(const char *fileName, { // skip until the opening bracket or lonely : is found bool found=FALSE; - char cn; + char cn=0; while (lineNr<=endLine && !f.atEnd() && !found) { while ((c=f.getch())!='{' && c!=':' && c!=-1) if (c=='\n') lineNr++; diff --git a/src/dot.cpp b/src/dot.cpp index a85e9bd..207aa38 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -996,7 +996,8 @@ static void findMaximalDotGraph(DotNode *root, readBoundingBoxDot(baseName+"_tmp.dot",&width,&height); width = width *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 compoundKeywordDict(7); // keywords recognised as compounds +QDict expandAsDefinedDict(257); // all macros that should be expanded OutputList *outputList = 0; // list of output generating objects PageInfo *mainPage = 0; @@ -906,6 +903,15 @@ static MemberDef *addVariableToClass( root->protection, 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 //if (scope.find('<')==-1 && cd->templateArguments()) //{ @@ -1332,7 +1338,7 @@ static void buildMemberList(Entry *root) ClassDef *cd=0; // 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", // root->parent->name.data(),getClass(root->parent->name), // root->type.find(re,0)); @@ -1896,7 +1902,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, templSpec=baseClassName.mid(i,e-i); baseClassName=baseClassName.left(i)+baseClassName.right(baseClassName.length()-e); baseClass=getResolvedClass(baseClassName); - //printf("baseClass=%p baseClass=%s templSpec=%s\n", + //printf("baseClass=%p -> baseClass=%s templSpec=%s\n", // baseClass,baseClassName.data(),templSpec.data()); } } @@ -2823,10 +2829,10 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl { Debug::print(Debug::FindMembers,0, "1. funcName=`%s'\n",funcName.data()); - //if (!funcTempList.isEmpty()) // try with member specialization - //{ - // mn=memberNameDict[funcName+funcTempList]; - //} + if (!funcTempList.isEmpty()) // try with member specialization + { + mn=memberNameDict[funcName+funcTempList]; + } if (mn==0) // try without specialization { mn=memberNameDict[funcName]; @@ -2978,15 +2984,39 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl "Warning: no matching class member found for \n %s", fullFuncDecl.data() ); + int candidates=0; if (mn->count()>0) { + md=mn->first(); + while (md) + { + ClassDef *cd=md->memberClass(); +