Commit ef99315d authored by dimitri's avatar dimitri

Release-1.2.0-20000806

parent e139c024
DOXYGEN Version 1.2.0-20000731
DOXYGEN Version 1.2.0-20000806
Please read the installation section of the manual for instructions.
--------
Dimitri van Heesch (31 July 2000)
Dimitri van Heesch (06 August 2000)
DOXYGEN Version 1.2.0-20000731
DOXYGEN Version 1.2.0-20000806
Please read INSTALL for compilation instructions.
......@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (31 July 2000)
Dimitri van Heesch (06 August 2000)
1.2.0-20000731
1.2.0-20000806
......@@ -21,7 +21,7 @@
#include <qstrlist.h>
#include <qfile.h>
extern void parseConfig(const QCString &config);
extern void parseConfig(const QCString &config,const char *fn);
extern void writeTemplateConfig(QFile *f,bool shortList);
extern void checkConfig();
extern void configStrToVal();
......
......@@ -27,6 +27,7 @@
#include <qdir.h>
#include <qtextstream.h>
#include <qregexp.h>
#include <qstack.h>
#include "config.h"
#include "version.h"
......@@ -58,6 +59,7 @@ void initWarningFormat()
#include "language.h"
#endif
#define MAX_INCLUDE_DEPTH 10
#define YY_NEVER_INTERACTIVE 1
#define YY_NO_UNPUT
......@@ -73,15 +75,30 @@ void initWarningFormat()
* static variables
*/
static const char * inputString;
struct ConfigFileState
{
int lineNr;
FILE *filePtr;
YY_BUFFER_STATE oldState;
YY_BUFFER_STATE newState;
QCString fileName;
};
static const char *inputString;
static int inputPosition;
static int yyLineNr;
static QCString yyFileName;
static QCString tmpString;
static QCString * s=0;
static bool * b=0;
static QStrList * l=0;
static QCString *s=0;
static bool *b=0;
static QStrList *l=0;
static int lastState;
static QCString elemStr;
static QCString includeName;
static QStrList includePathList;
static QStack<ConfigFileState> includeStack;
static int includeDepth;
#CONFIG Static
/* -----------------------------------------------------------------
......@@ -91,6 +108,9 @@ static QCString elemStr;
static int yyread(char *buf,int max_size)
{
// no file included
if (includeStack.isEmpty())
{
int c=0;
while( c < max_size && inputString[inputPosition] )
{
......@@ -98,8 +118,90 @@ static int yyread(char *buf,int max_size)
c++; buf++;
}
return c;
}
else
{
//assert(includeStack.current()->newState==YY_CURRENT_BUFFER);
return fread(buf,1,max_size,includeStack.current()->filePtr);
}
}
static FILE *tryPath(const char *path,const char *fileName)
{
QCString absName=(QCString)path+"/"+fileName;
QFileInfo fi(absName);
if (fi.exists() && fi.isFile())
{
FILE *f=fopen(absName,"r");
if (!f) err("Error: could not open file %s for reading\n",absName.data());
return f;
}
return 0;
}
static FILE *findFile(const char *fileName)
{
char *s=includePathList.first();
while (s) // try each of the include paths
{
FILE *f = tryPath(s,fileName);
if (f) return f;
s=includePathList.next();
}
// try cwd if includePathList fails
return tryPath(".",fileName);
}
static void readIncludeFile(const char *incName)
{
if (includeDepth==MAX_INCLUDE_DEPTH) {
err("Error: maximum include depth (%d) reached, %s is not included. Aborting...\n",
MAX_INCLUDE_DEPTH,incName);
exit(1);
}
QCString inc = incName;
inc = inc.stripWhiteSpace();
uint incLen = inc.length();
if (inc.at(0)=='"' && inc.at(incLen-1)=='"') // strip quotes
{
inc=inc.mid(1,incLen-2);
}
FILE *f;
//printf("Searching for `%s'\n",incFileName.data());
if ((f=findFile(inc))) // see if the include file can be found
{
// For debugging
#if SHOW_INCLUDES
for (i=0;i<includeStack.count();i++) msg(" ");
msg("@INCLUDE = %s: parsing...\n",inc.data());
#endif
// store the state of the old file
ConfigFileState *fs=new ConfigFileState;
fs->oldState=YY_CURRENT_BUFFER;
fs->lineNr=yyLineNr;
fs->fileName=yyFileName;
fs->filePtr=f;
// push the state on the stack
includeStack.push(fs);
// set the scanner to the include file
yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE));
fs->newState=YY_CURRENT_BUFFER;
yyFileName=inc;
includeDepth++;
}
else
{
err("Error: @INCLUDE = %s: not found!\n",inc.data());
exit(1);
}
}
%}
%option noyywrap
......@@ -111,13 +213,44 @@ static int yyread(char *buf,int max_size)
%x GetStrList
%x GetQuotedString
%x GetEnvVar
%x Include
%%
<*>\0x0d
<Start,GetString,GetStrList,GetBool>"#" { BEGIN(SkipComment); }
#CONFIG Rules
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d\n",yytext,yyLineNr); }
<Start>"@INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&includePathList; l->clear(); elemStr=""; }
/* include a config file */
<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
readIncludeFile(yytext);
BEGIN(Start);
}
<<EOF>> {
//printf("End of include file\n");
//printf("Include stack depth=%d\n",g_includeStack.count());
if (includeStack.isEmpty())
{
//printf("Terminating scanner!\n");
yyterminate();
}
else
{
ConfigFileState *fs=includeStack.pop();
pclose(fs->filePtr);
YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
yy_switch_to_buffer( fs->oldState );
yy_delete_buffer( oldBuf );
yyLineNr=fs->lineNr;
yyFileName=fs->fileName;
delete fs; fs=0;
includeDepth--;
}
}
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); }
<GetString,GetBool>\n { yyLineNr++; BEGIN(Start); }
<GetStrList>\n {
yyLineNr++;
......@@ -141,22 +274,6 @@ static int yyread(char *buf,int max_size)
BEGIN(GetQuotedString);
tmpString.resize(0);
}
/*
<GetString,GetStrList,GetQuotedString>"\$\(" {
//printf(">> Enter env\n");
lastEnvState=YY_START;
BEGIN(GetEnvVar);
}
<GetEnvVar>[a-z_A-Z0-9]+")" {
yytext[yyleng-1]='\0';
const char *env=getenv(yytext);
int i;
int l=strlen(env);
//printf("env name=`%s' text=`%s'\n",yytext,env);
for (i=l-1;i>=0;i--) unput(env[i]);
BEGIN(lastEnvState);
}
*/
<GetQuotedString>"\""|"\n" {
//printf("Quoted String = `%s'\n",tmpString.data());
if (lastState==GetString)
......@@ -165,7 +282,7 @@ static int yyread(char *buf,int max_size)
elemStr+=tmpString;
if (*yytext=='\n')
{
err("Warning: Missing end quote (\") on line %d\n",yyLineNr);
err("Warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data());
yyLineNr++;
}
BEGIN(lastState);
......@@ -185,8 +302,8 @@ static int yyread(char *buf,int max_size)
{
*b=FALSE;
warn_cont("Warning: Invalid value `%s' for "
"boolean tag in line %d; use YES or NO\n",
bs.data(),yyLineNr);
"boolean tag in line %d, file %s; use YES or NO\n",
bs.data(),yyLineNr,yyFileName.data());
}
}
<GetStrList>[^ \#\"\t\r\n]+ {
......@@ -378,7 +495,7 @@ static void substEnvVarsInString(QCString &s)
QCString env=getenv(s.mid(i+2,l-3));
substEnvVarsInString(env); // recursively expand variables if needed.
s = s.left(i)+env+s.right(s.length()-i-l);
p=i+l;
p=i+env.length(); // next time start at the end of the expanded string
}
//printf("substEnvVarInString(%s) end\n",s.data());
}
......@@ -866,11 +983,15 @@ void checkConfig()
}
void parseConfig(const QCString &s)
void parseConfig(const QCString &s,const char *fn)
{
inputString = s;
inputPosition = 0;
yyLineNr = 1;
yyFileName=fn;
includeStack.setAutoDelete(TRUE);
includeStack.clear();
includeDepth = 0;
configYYrestart( configYYin );
BEGIN( Start );
configYYlex();
......
......@@ -78,7 +78,7 @@ static bool loadConfig( QString loadFile )
// parse the config file
// this will initialize the various Config data members
parseConfig(contents);
parseConfig(contents,loadFile);
configStrToVal();
f.close();
......
......@@ -924,10 +924,6 @@ Public/Protected/Private/... section.
See section \ref autolink "autolink" for more information on automatically
generated links and valid link-objects.
\b Note:
Keep in mind that links are only meaningful in HTML text;
in \f$\mbox{\LaTeX}\f$ text, the link text is just written to the output.
<hr>
\subsection cmdref \ref <name> ["(text)"]
......@@ -1315,7 +1311,7 @@ Public/Protected/Private/... section.
\ref cmdlatexonly "\\latexonly".
<hr>
\subsection cmdimage \image <format> <file> [<sizeindication>=<size>]
\subsection cmdimage \image <format> <file> ["<caption>"] [<sizeindication>=<size>]
\addindex \image
Inserts an image into the documentation. This command is format
......@@ -1330,24 +1326,33 @@ Public/Protected/Private/... section.
after the \ref cfg_image_path "IMAGE_PATH" tag.
If the image is found it will be copied to the correct output directory.
If the image name contains spaces you'll have to put quotes (") around it.
The third argument can be used to specify the width or height of the
image. This is only useful for \f$\mbox{\LaTeX}\f$ output
(i.e. format=latex). \c sizeindication can be either
\c width or \c height. The size should be a valid
You can also specify an absolute URL instead of a file name, but then
doxygen does not copy the image or check its existance.
The third argument is optional and can be used to specify the caption
that is displayed below the image. This argument has to be specified
between quotes even if it does not contain any spaces. The quotes are
stripped before the caption is displayed.
The fourth argument is also optional and can be used to specify the
width or height of the image. This is only useful
for \f$\mbox{\LaTeX}\f$ output
(i.e. format=<code>latex</code>). The \c sizeindication can be
either \c width or \c height. The size should be a valid
size specifier in \f$\mbox{\LaTeX}\f$ (for example <code>10cm</code> or
<code>6in</code>).
<code>6in</code> or a symbolic width like <code>\\textwidth</code>).
Here is example of a comment block:
\verbatim
/*! Here is a snapshot of my new application:
* \image html application.jpg
* \image latex application.eps width=10cm
* \image latex application.eps "My application" width=10cm
*/
\endverbatim
And this is an example of how the configuration file may look:
And this is an example of how the relevant part of the configuration file
may look:
\verbatim
IMAGE_PATH = my_image_dir
......
......@@ -40,6 +40,19 @@ Multiple lines can be concatenated by inserting a backslash (\\)
as the last character of a line. Environment variables can be expanded
using the pattern \c $(ENV_VARIABLE_NAME).
You can also include part of a configuration file from another configuration
file using a <code>\@INCLUDE</code> tag as follows:
\verbatim
@INCLUDE = config_file_name
\endverbatim
The include file is searched in the current working directory. You can
also specify a list of directories that should be searched before looking
in the current working directory. Do this by putting a <code>\@INCLUDEPATH</code> tag
with these paths before the <code>\@INCLUDE</code> tag, e.g:
\verbatim
@INCLUDEPATH = my_config_dir
\endverbatim
The configuration options can be divided into several categories.
Below is an alphabetical index of the tags that are recognized
followed by the descriptions of the tags grouped by category.
......
......@@ -197,21 +197,22 @@ During parsing the following steps take place:
See section \ref htmlcmds for an overview of all supported HTML tags.
</ul>
Using a number of column-aligned minus signs at the start of a
line in a comment block will generate a bullet list.
Nested lists are also possible.
By putting a number of column-aligned minus signs at the start of a
line, a bullet list will automatically be generated.
Numbered lists can also be generated by using a minus followed by a hash.
Nesting of lists is allowed.<p>
Here is an example:
\verbatim
/*!
* A list of events:
* - mouse events
* - mouse move event
* - mouse click event
* - mouse double click event\n
* -# mouse move event
* -# mouse click event\n
* More info about the click event.
* -# mouse double click event
* - keyboard events
* - key down event
* - key up event
* -# key down event
* -# key up event
*
* More text here.
*/
......@@ -220,13 +221,13 @@ Using a number of column-aligned minus signs at the start of a
A list of events:
- mouse events
- mouse move event
- mouse click event\n
-# mouse move event
-# mouse click event\n
More info about the click event.
- mouse double click event
-# mouse double click event
- keyboard events
- key down event
- key up event
-# key down event
-# key up event
More text here.
......
Name: doxygen
Version: 1.2.0-20000731
Version: 1.2.0-20000806
Summary: documentation system for C, C++ and IDL
Release: 1
Source0: doxygen-%{version}.src.tar.gz
......
......@@ -39,7 +39,7 @@ clean: Makefile.doxygen Makefile.doxytag Makefile.doxysearch
$(MAKE) -f Makefile.doxysearch clean
distclean: clean
-$(RM) scanner.cpp code.cpp config.cpp pre.cpp ce_lex.cpp \
-$(RM) scanner.cpp doc.cpp code.cpp config.cpp pre.cpp ce_lex.cpp \
ce_parse.cpp ce_parse.h doxytag.cpp tag.cpp \
declinfo.cpp defargs.cpp
......
......@@ -21,7 +21,7 @@
#include "classdef.h"
#include "classlist.h"
#include "entry.h"
#include "scanner.h"
#include "doc.h"
#include "doxygen.h"
#include "membername.h"
#include "message.h"
......@@ -974,7 +974,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trMemberTypedefDocumentation());
ol.endGroupHeader();
typedefMembers.writeDocumentation(ol,name());
typedefMembers.writeDocumentation(ol,name(),this);
}
enumMembers.countDocMembers();
......@@ -984,7 +984,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trMemberEnumerationDocumentation());
ol.endGroupHeader();
enumMembers.writeDocumentation(ol,name());
enumMembers.writeDocumentation(ol,name(),this);
}
//enumValMembers.countDocMembers();
......@@ -1004,7 +1004,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trConstructorDocumentation());
ol.endGroupHeader();
constructors.writeDocumentation(ol,name());
constructors.writeDocumentation(ol,name(),this);
}
functionMembers.countDocMembers();
......@@ -1014,7 +1014,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trMemberFunctionDocumentation());
ol.endGroupHeader();
functionMembers.writeDocumentation(ol,name());
functionMembers.writeDocumentation(ol,name(),this);
}
relatedMembers.countDocMembers();
......@@ -1024,7 +1024,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trRelatedFunctionDocumentation());
ol.endGroupHeader();
relatedMembers.writeDocumentation(ol,name());
relatedMembers.writeDocumentation(ol,name(),this);
}
variableMembers.countDocMembers();
......@@ -1034,7 +1034,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trMemberDataDocumentation());
ol.endGroupHeader();
variableMembers.writeDocumentation(ol,name());
variableMembers.writeDocumentation(ol,name(),this);
}
ol.startTextBlock();
......@@ -1601,7 +1601,7 @@ void ClassDef::determineImplUsageRelation()
MemberDef *md=mi->memberDef;
if (md->isVariable()) // for each member variable in this class
{
QCString type=md->typeString();
QCString type=removeRedundantWhiteSpace(md->typeString());
int typeLen=type.length();
static const QRegExp re("[a-z_A-Z][a-z_A-Z0-9:]*");
//printf("in class %s found var type=`%s' name=`%s'\n",
......
......@@ -203,6 +203,7 @@ struct UsesClassDef
UsesClassDef(ClassDef *cd) : classDef(cd)
{
accessors = new QDict<void>(17);
containment = TRUE;
}
~UsesClassDef()
{
......@@ -218,6 +219,7 @@ struct UsesClassDef
ClassDef *classDef;
QDict<void> *accessors;
QCString templSpecifiers;
bool containment;
};
class UsesClassDict : public QDict<UsesClassDef>
......
......@@ -20,7 +20,7 @@
#include "util.h"
#include "outputlist.h"
#include "language.h"
#include "scanner.h"
#include "doc.h"
ClassList::ClassList() : QList<ClassDef>()
{
......
......@@ -410,7 +410,7 @@ static bool getLink(const char *className,
FileDef *fd;
NamespaceDef *nd;
GroupDef *gd;
QCString m=memberName;
QCString m=removeRedundantWhiteSpace(memberName);
QCString c=className;
//printf("Trying `%s'::`%s'\n",c.data(),m.data());
if (getDefs(c,m,"()",md,cd,fd,nd,gd) && md->isLinkable())
......@@ -574,39 +574,6 @@ static void generateMemberLink(OutputList &ol,const char *varName,
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)
{
MemberNameIterator mmni(*mmn);
MemberDef *mmd,*xmd=0;
ClassDef *xcd=0;
const int maxInheritanceDepth = 100000;
int mdist=maxInheritanceDepth;
for (;(mmd=mmni.current());++mmni)
{
int m=minClassDistance(mcd,mmd->getClassDef());
if (m<mdist && mmd->getClassDef()->isLinkable())
{
mdist=m;
xcd=mmd->getClassDef();
xmd=mmd;
}
}
if (mdist!=maxInheritanceDepth)
{
if (g_currentDefinition && g_currentMemberDef &&
xmd!=g_currentMemberDef && g_insideBody)
{
xmd->addSourceReference(g_currentMemberDef);
}
writeMultiLineCodeLink(ol,xcd->getReference(),
xcd->getOutputFileBase(),xmd->anchor(),memName);
return;
}
}
#endif
}
}
}
......@@ -617,27 +584,12 @@ static void generateMemberLink(OutputList &ol,const char *varName,
return;
}
static QCString removeWhiteSpace(const char *s)
{
QCString result;
if (s)
{
const char *p=s;
int c;
while ((c=*p++))
{
if (c!=' ' && c!='\n' && c!='\r' && c!='\t') result+=c;
}
}
return result;
}
static void generateFunctionLink(OutputList &ol,char *funcName)
{
OutputList result(&ol);
CodeClassDef *ccd=0;
QCString locScope=g_classScope.copy();
QCString locFunc=removeWhiteSpace(funcName);
QCString locFunc=removeRedundantWhiteSpace(funcName);
int i=locFunc.findRev("::");
if (i>0)
{
......@@ -970,7 +922,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
addType();
g_name+=yytext;
}
<Body>{SCOPENAME}{B}*"<"[^\n\>]*">"/{B}* { // A<T> *pt;
<Body>{SCOPENAME}{B}*"<"[^\n\"\>]*">"/{B}* { // A<T> *pt;
generateClassLink(*g_code,yytext);
addType();
g_name+=yytext;
......
/* This file was generated by configgen on Mon Jul 31 16:07:18 2000
/* This file was generated by configgen on Sat Aug 5 20:49:38 2000
* from config_templ.h
*
* DO NOT EDIT!
......@@ -27,7 +27,7 @@
#include <qstrlist.h>
#include <qfile.h>
extern void parseConfig(const QCString &config);
extern void parseConfig(const QCString &config,const char *fn);
extern void writeTemplateConfig(QFile *f,bool shortList);
extern void checkConfig();
extern void configStrToVal();
......
/* This file was generated by configgen on Mon Jul 31 16:11:27 2000
/* This file was generated by configgen on Sun Aug 6 16:28:57 2000
* from config_templ.l
*
* DO NOT EDIT!
......@@ -33,6 +33,7 @@
#include <qdir.h>
#include <qtextstream.h>
#include <qregexp.h>
#include <qstack.h>
#include "config.h"
#include "version.h"
......@@ -64,6 +65,7 @@ void initWarningFormat()
#include "language.h"
#endif
#define MAX_INCLUDE_DEPTH 10
#define YY_NEVER_INTERACTIVE 1
#define YY_NO_UNPUT
......@@ -179,15 +181,30 @@ QStrList Config::extDocPathList;
* static variables
*/
static const char * inputString;
struct ConfigFileState
{
int lineNr;
FILE *filePtr;
YY_BUFFER_STATE oldState;
YY_BUFFER_STATE newState;
QCString fileName;
};
static const char *inputString;
static int inputPosition;
static int yyLineNr;
static QCString yyFileName;
static QCString tmpString;
static QCString * s=0;
static bool * b=0;
static QStrList * l=0;
static QCString *s=0;
static bool *b=0;
static QStrList *l=0;
static int lastState;
static QCString elemStr;
static QCString includeName;
static QStrList includePathList;
static QStack<ConfigFileState> includeStack;
static int includeDepth;
static QCString tabSizeString;
static QCString colsInAlphaIndexString;
static QCString maxDotGraphWidthString;
......@@ -200,6 +217,9 @@ static QCString maxDotGraphHeightString;
static int yyread(char *buf,int max_size)
{
// no file included
if (includeStack.isEmpty())
{
int c=0;
while( c < max_size && inputString[inputPosition] )
{
......@@ -207,8 +227,90 @@ static int yyread(char *buf,int max_size)
c++; buf++;
}
return c;
}
else
{
//assert(includeStack.current()->newState==YY_CURRENT_BUFFER);
return fread(buf,1,max_size,includeStack.current()->filePtr);
}
}
static FILE *tryPath(const char *path,const char *fileName)
{
QCString absName=(QCString)path+"/"+fileName;
QFileInfo fi(absName);
if (fi.exists() && fi.isFile())
{
FILE *f=fopen(absName,"r");
if (!f) err("Error: could not open file %s for reading\n",absName.data());
return f;
}
return 0;
}
static FILE *findFile(const char *fileName)
{
char *s=includePathList.first();
while (s) // try each of the include paths
{
FILE *f = tryPath(s,fileName);
if (f) return f;
s=includePathList.next();
}
// try cwd if includePathList fails
return tryPath(".",fileName);
}
static void readIncludeFile(const char *incName)
{
if (includeDepth==MAX_INCLUDE_DEPTH) {
err("Error: maximum include depth (%d) reached, %s is not included. Aborting...\n",
MAX_INCLUDE_DEPTH,incName);
exit(1);
}
QCString inc = incName;
inc = inc.stripWhiteSpace();
uint incLen = inc.length();
if (inc.at(0)=='"' && inc.at(incLen-1)=='"') // strip quotes
{
inc=inc.mid(1,incLen-2);
}
FILE *f;
//printf("Searching for `%s'\n",incFileName.data());
if ((f=findFile(inc))) // see if the include file can be found
{
// For debugging
#if SHOW_INCLUDES
for (i=0;i<includeStack.count();i++) msg(" ");
msg("@INCLUDE = %s: parsing...\n",inc.data());
#endif
// store the state of the old file
ConfigFileState *fs=new ConfigFileState;
fs->oldState=YY_CURRENT_BUFFER;
fs->lineNr=yyLineNr;
fs->fileName=yyFileName;
fs->filePtr=f;
// push the state on the stack
includeStack.push(fs);
// set the scanner to the include file
yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE));
fs->newState=YY_CURRENT_BUFFER;
yyFileName=inc;
includeDepth++;
}
else
{
err("Error: @INCLUDE = %s: not found!\n",inc.data());
exit(1);
}
}
%}
%option noyywrap
......@@ -220,6 +322,7 @@ static int yyread(char *buf,int max_size)
%x GetStrList
%x GetQuotedString
%x GetEnvVar
%x Include
%%
......@@ -343,7 +446,37 @@ static int yyread(char *buf,int max_size)
<Start>"BIN_ABSPATH"[ \t]*"=" { BEGIN(GetString); s=&Config::binAbsPath; s->resize(0); }
<Start>"EXT_DOC_PATHS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::extDocPathList; l->clear(); elemStr=""; }
<Start>"EXT_DOC_PATHS"[ \t]*"+=" { BEGIN(GetStrList); l=&Config::extDocPathList; elemStr=""; }
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d\n",yytext,yyLineNr); }
<Start>"@INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&includePathList; l->clear(); elemStr=""; }
/* include a config file */
<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
readIncludeFile(yytext);
BEGIN(Start);
}
<<EOF>> {
//printf("End of include file\n");
//printf("Include stack depth=%d\n",g_includeStack.count());
if (includeStack.isEmpty())
{
//printf("Terminating scanner!\n");
yyterminate();
}
else
{
ConfigFileState *fs=includeStack.pop();
pclose(fs->filePtr);
YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
yy_switch_to_buffer( fs->oldState );
yy_delete_buffer( oldBuf );
yyLineNr=fs->lineNr;
yyFileName=fs->fileName;
delete fs; fs=0;
includeDepth--;
}
}
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); }
<GetString,GetBool>\n { yyLineNr++; BEGIN(Start); }
<GetStrList>\n {
yyLineNr++;
......@@ -367,22 +500,6 @@ static int yyread(char *buf,int max_size)
BEGIN(GetQuotedString);
tmpString.resize(0);
}
/*
<GetString,GetStrList,GetQuotedString>"\$\(" {
//printf(">> Enter env\n");
lastEnvState=YY_START;
BEGIN(GetEnvVar);
}
<GetEnvVar>[a-z_A-Z0-9]+")" {
yytext[yyleng-1]='\0';
const char *env=getenv(yytext);
int i;
int l=strlen(env);
//printf("env name=`%s' text=`%s'\n",yytext,env);
for (i=l-1;i>=0;i--) unput(env[i]);
BEGIN(lastEnvState);
}
*/
<GetQuotedString>"\""|"\n" {
//printf("Quoted String = `%s'\n",tmpString.data());
if (lastState==GetString)
......@@ -391,7 +508,7 @@ static int yyread(char *buf,int max_size)
elemStr+=tmpString;
if (*yytext=='\n')
{
err("Warning: Missing end quote (\") on line %d\n",yyLineNr);
err("Warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data());
yyLineNr++;
}
BEGIN(lastState);
......@@ -411,8 +528,8 @@ static int yyread(char *buf,int max_size)
{
*b=FALSE;
warn_cont("Warning: Invalid value `%s' for "
"boolean tag in line %d; use YES or NO\n",
bs.data(),yyLineNr);
"boolean tag in line %d, file %s; use YES or NO\n",
bs.data(),yyLineNr,yyFileName.data());
}
}
<GetStrList>[^ \#\"\t\r\n]+ {
......@@ -2160,7 +2277,7 @@ static void substEnvVarsInString(QCString &s)
QCString env=getenv(s.mid(i+2,l-3));
substEnvVarsInString(env); // recursively expand variables if needed.
s = s.left(i)+env+s.right(s.length()-i-l);
p=i+l;
p=i+env.length(); // next time start at the end of the expanded string
}
//printf("substEnvVarInString(%s) end\n",s.data());
}
......@@ -2689,11 +2806,15 @@ void checkConfig()
}
void parseConfig(const QCString &s)
void parseConfig(const QCString &s,const char *fn)
{
inputString = s;
inputPosition = 0;
yyLineNr = 1;
yyFileName=fn;
includeStack.setAutoDelete(TRUE);
includeStack.clear();
includeDepth = 0;
configYYrestart( configYYin );
BEGIN( Start );
configYYlex();
......
......@@ -23,7 +23,8 @@
#include "language.h"
#include "message.h"
#include "outputlist.h"
#include "scanner.h"
#include "doc.h"
#include "code.h"
#include <qregexp.h>
Definition::Definition(const char *df,int dl,
......@@ -39,6 +40,8 @@ Definition::Definition(const char *df,int dl,
bodyDef=0;
sourceRefList=0;
sourceRefDict=0;
m_todoId=0;
m_testId=0;
}
Definition::~Definition()
......
......@@ -101,6 +101,10 @@ class Definition
void writeSourceRefs(OutputList &ol,const char *scopeName);
void addSourceReference(MemberDef *d);
void setRefItems(int todoId,int testId) { m_todoId=todoId; m_testId=testId; }
int todoId() const { return m_todoId; }
int testId() const { return m_testId; }
/*! returns the file in which this definition was found */
QCString getDefFileName() const { return defFileName; }
/*! returns the line number at which the definition was found */
......@@ -124,6 +128,8 @@ class Definition
MemberList *sourceRefList; // list of entities that refer to this
// entity in their definition
MemberDict *sourceRefDict;
int m_testId; // id for test case
int m_todoId; // id for todo case
};
......
......@@ -475,7 +475,8 @@ void TreeDiagram::computeExtremes(uint *maxLabelLen,uint *maxXPos)
void TreeDiagram::drawBoxes(QTextStream &t,Image *image,
bool doBase,bool bitmap,
uint baseRows,uint superRows,
uint cellWidth,uint cellHeight)
uint cellWidth,uint cellHeight,
bool generateMap)
{
DiagramRow *dr=first();
if (!doBase) dr=next();
......@@ -543,7 +544,8 @@ void TreeDiagram::drawBoxes(QTextStream &t,Image *image,
bool hasDocs=di->getClassDef()->isLinkable();
writeBitmapBox(di,image,x,y,cellWidth,cellHeight,firstRow,
hasDocs,di->getChildren()->count()>0);
if (!firstRow) writeMapArea(t,di->getClassDef(),x,y,cellWidth,cellHeight);
if (!firstRow && generateMap)
writeMapArea(t,di->getClassDef(),x,y,cellWidth,cellHeight);
}
else
{
......@@ -575,7 +577,8 @@ void TreeDiagram::drawBoxes(QTextStream &t,Image *image,
}
bool hasDocs=di->getClassDef()->isLinkable();
writeBitmapBox(di,image,x,y,cellWidth,cellHeight,firstRow,hasDocs);
if (!firstRow) writeMapArea(t,di->getClassDef(),x,y,cellWidth,cellHeight);
if (!firstRow && generateMap)
writeMapArea(t,di->getClassDef(),x,y,cellWidth,cellHeight);
}
else
{
......@@ -1244,7 +1247,7 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
void ClassDiagram::writeImageMap(QTextStream &t,const char *path,
const char *fileName)
const char *fileName, bool generateMap)
{
uint baseRows=base->computeRows();
uint superRows=super->computeRows();
......@@ -1271,13 +1274,13 @@ void ClassDiagram::writeImageMap(QTextStream &t,const char *path,
Image image(imageWidth,imageHeight);
base->drawBoxes(t,&image,TRUE,TRUE,baseRows,superRows,cellWidth,cellHeight);
super->drawBoxes(t,&image,FALSE,TRUE,baseRows,superRows,cellWidth,cellHeight);
base->drawBoxes(t,&image,TRUE,TRUE,baseRows,superRows,cellWidth,cellHeight,generateMap);
super->drawBoxes(t,&image,FALSE,TRUE,baseRows,superRows,cellWidth,cellHeight,generateMap);
base->drawConnectors(t,&image,TRUE,TRUE,baseRows,superRows,cellWidth,cellHeight);
super->drawConnectors(t,&image,FALSE,TRUE,baseRows,superRows,cellWidth,cellHeight);
image.save((QCString)path+"/"+fileName+".gif");
t << "</map>" << endl;
if (generateMap) t << "</map>" << endl;
}
......@@ -104,7 +104,8 @@ class TreeDiagram : public QList<DiagramRow>
void drawBoxes(QTextStream &t,Image *image,
bool doBase,bool bitmap,
uint baseRows,uint superRows,
uint cellWidth,uint cellHeight);
uint cellWidth,uint cellHeight,
bool generateMap=TRUE);
void drawConnectors(QTextStream &t,Image *image,
bool doBase,bool bitmap,
uint baseRows,uint superRows,
......@@ -123,7 +124,7 @@ class ClassDiagram
void writeFigure(QTextStream &t,const char *path,
const char *file);
void writeImageMap(QTextStream &t,const char *path,
const char *file);
const char *file,bool generateMap=TRUE);
private:
TreeDiagram *base;
TreeDiagram *super;
......
/******************************************************************************
*
*
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#ifndef DOC_H
#define DOC_H
#include "qtbc.h"
class OutputList;
extern void parseDoc(OutputList &ol,
const char *fileName,int startLine,
const char *clName, const char *memName,
const QCString &docString);
extern void parseExample(OutputList &ol,const QCString &docString,
const char *fileName);
extern void parseText(OutputList &ol,const QCString &txtString);
#endif
This diff is collapsed.
This diff is collapsed.
......@@ -28,7 +28,6 @@
#include "classlist.h"
#include "membername.h"
#include "filename.h"
//#include "define.h"
#include "namespacedef.h"
#include "formula.h"
#include "section.h"
......@@ -37,7 +36,8 @@
struct PageInfo
{
PageInfo(const char *f, int l,const char *n,const char *d,const char *t) :
defFileName(f), defLine(l), name(n), doc(d), title(t) {}
defFileName(f), defLine(l), name(n), doc(d), title(t),
todoId(0), testId(0) {}
// where the page definition was found
QCString defFileName;
......@@ -47,6 +47,10 @@ struct PageInfo
QCString name;
QCString doc;
QCString title;
// ids
int todoId;
int testId;
};
class PageList : public QList<PageInfo>
......@@ -104,7 +108,6 @@ extern MemberNameDict functionNameDict;
extern StringDict substituteDict;
extern FileList fileList;
extern FileDict fileDict;
//extern DefineDict defineDict;
extern ClassDef unrelatedClass;
extern QTextStream tagFile;
extern SectionDict sectionDict;
......@@ -113,7 +116,6 @@ extern FileNameDict *includeNameDict;
extern FileNameDict *exampleNameDict;
extern FileNameDict *inputNameDict;
extern FileNameDict *imageNameDict;
//extern FileList includeFiles;
extern StringDict typedefDict;
extern GroupList groupList;
extern GroupDict groupDict;
......
......@@ -16,7 +16,7 @@
TEMPLATE = doxygen.t
CONFIG = console qt warn_on $extraopts
HEADERS = doxygen.h scanner.h classdef.h classlist.h memberdef.h \
HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \
membername.h index.h memberlist.h definition.h \
entry.h logos.h instdox.h message.h code.h \
filedef.h util.h cppvalue.h constexp.h \
......@@ -27,8 +27,8 @@ HEADERS = doxygen.h scanner.h classdef.h classlist.h memberdef.h \
translator_it.h formula.h debug.h membergroup.h htmlhelp.h \
translator_ru.h translator_pl.h dot.h rtfgen.h xml.h xml_dtd.h \
reflist.h
SOURCES = doxygen.cpp scanner.cpp classdef.cpp classlist.cpp memberdef.cpp \
membername.cpp index.cpp memberlist.cpp \
SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \
memberdef.cpp membername.cpp index.cpp memberlist.cpp \
entry.cpp logos.cpp instdox.cpp message.cpp code.cpp \
config.cpp filedef.cpp util.cpp groupdef.cpp \
outputgen.cpp outputlist.cpp htmlgen.cpp latexgen.cpp mangen.cpp \
......
......@@ -65,6 +65,9 @@ sub GenerateDep {
#$ GenerateDep("defargs.cpp","defargs.l");
$(LEX) -PdefargsYY -t defargs.l >defargs.cpp
#$ GenerateDep("doc.cpp","doc.l");
$(LEX) -PdocYY -t doc.l >doc.cpp
#$ GenerateDep("ce_lex.cpp","constexp.l","ce_parse.h");
$(LEX) -PcppExpYY -t constexp.l >ce_lex.cpp
......@@ -77,3 +80,4 @@ sub GenerateDep {
xml_dtd.h: doxygen.dtd
cat doxygen.dtd | sed -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >xml_dtd.h
......@@ -19,7 +19,7 @@
#include "memberlist.h"
#include "classlist.h"
#include "filedef.h"
#include "scanner.h"
#include "doc.h"
#include "doxygen.h"
#include "memberdef.h"
#include "classdef.h"
......@@ -29,6 +29,8 @@
#include "outputlist.h"
#include "dot.h"
#include "message.h"
#include "code.h"
#include "xml.h"
/*! create a new file definition, where \a p is the file path,
\a the file name, and \a ref is an HTML anchor name if the
......@@ -355,7 +357,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trDefineDocumentation());
ol.endGroupHeader();
defineMembers.writeDocumentation(ol,name());
defineMembers.writeDocumentation(ol,name(),this);
}
protoMembers.countDocMembers();
......@@ -365,7 +367,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trFunctionPrototypeDocumentation());
ol.endGroupHeader();
protoMembers.writeDocumentation(ol,name());
protoMembers.writeDocumentation(ol,name(),this);
}
typedefMembers.countDocMembers();
......@@ -375,7 +377,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trTypedefDocumentation());
ol.endGroupHeader();
typedefMembers.writeDocumentation(ol,name());
typedefMembers.writeDocumentation(ol,name(),this);
}
enumMembers.countDocMembers();
......@@ -385,7 +387,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trEnumerationTypeDocumentation());
ol.endGroupHeader();
enumMembers.writeDocumentation(ol,name());
enumMembers.writeDocumentation(ol,name(),this);
}
funcMembers.countDocMembers();
......@@ -395,7 +397,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trFunctionDocumentation());
ol.endGroupHeader();
funcMembers.writeDocumentation(ol,name());
funcMembers.writeDocumentation(ol,name(),this);
}
varMembers.countDocMembers();
......@@ -405,7 +407,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trVariableDocumentation());
ol.endGroupHeader();
varMembers.writeDocumentation(ol,name());
varMembers.writeDocumentation(ol,name(),this);
}
// write Author section (Man only)
......
......@@ -22,7 +22,7 @@
#include "filedef.h"
#include "classlist.h"
#include "outputlist.h"
#include "scanner.h"
#include "doc.h"
#include "namespacedef.h"
#include "language.h"
#include "util.h"
......@@ -373,7 +373,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trDefineDocumentation());
ol.endGroupHeader();
defineMembers.writeDocumentation(ol,name());
defineMembers.writeDocumentation(ol,name(),this);
}
protoMembers.countDocMembers();
......@@ -383,7 +383,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trFunctionPrototypeDocumentation());
ol.endGroupHeader();
protoMembers.writeDocumentation(ol,name());
protoMembers.writeDocumentation(ol,name(),this);
}
typedefMembers.countDocMembers();
......@@ -393,7 +393,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trTypedefDocumentation());
ol.endGroupHeader();
typedefMembers.writeDocumentation(ol,name());
typedefMembers.writeDocumentation(ol,name(),this);
}
enumMembers.countDocMembers();
......@@ -403,7 +403,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trEnumerationTypeDocumentation());
ol.endGroupHeader();
enumMembers.writeDocumentation(ol,name());
enumMembers.writeDocumentation(ol,name(),this);
}
//enumValMembers.countDocMembers();
......@@ -423,7 +423,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trFunctionDocumentation());
ol.endGroupHeader();
funcMembers.writeDocumentation(ol,name());
funcMembers.writeDocumentation(ol,name(),this);
}
varMembers.countDocMembers();
......@@ -433,7 +433,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trVariableDocumentation());
ol.endGroupHeader();
varMembers.writeDocumentation(ol,name());
varMembers.writeDocumentation(ol,name(),this);
}
endFile(ol);
......
......@@ -277,13 +277,13 @@ void HtmlGenerator::writeStyleInfo(int part)
}
}
void HtmlGenerator::startDoxyAnchor(const char *,const char *,
void HtmlGenerator::startDoxyAnchor(const char *,
const char *anchor, const char *name)
{
t << "<a name=\"" << anchor << "\" doxytag=\"" << name << "\"></a>";
}
void HtmlGenerator::endDoxyAnchor()
void HtmlGenerator::endDoxyAnchor(const char *,const char *)
{
}
......@@ -789,12 +789,11 @@ void HtmlGenerator::endAlphabeticalIndexList()
void HtmlGenerator::writeIndexHeading(const char *s)
{
//t << "<dt><b><big>" << s << "</big></b><dd>" << endl;
t << "<div class=\"ah\"><font color=\"white\"><b>&nbsp;&nbsp;" << s
<< "&nbsp;&nbsp;</b></font></div>";
}
void HtmlGenerator::writeImage(const char *name,const char *,const char *)
void HtmlGenerator::startImage(const char *name,const char *,bool hasCaption)
{
QCString baseName=name;
int i;
......@@ -802,7 +801,21 @@ void HtmlGenerator::writeImage(const char *name,const char *,const char *)
{
baseName=baseName.right(baseName.length()-i-1);
}
t << "<div align=\"center\">" << endl;
t << "<img src=\"" << name << "\" alt=\"" << baseName << "\">" << endl;
if (hasCaption)
{
t << "<p><strong>";
}
}
void HtmlGenerator::endImage(bool hasCaption)
{
if (hasCaption)
{
t << "</strong></p>" << endl;
}
t << "</div>" << endl;
}
void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *)
......
......@@ -142,9 +142,8 @@ class HtmlGenerator : public OutputGenerator
void endMemberDoc();
//void writeDoxyAnchor(const char *fName,const char *clName,
// const char *anchor,const char *name);
void startDoxyAnchor(const char *fName,const char *clName,
const char *anchor,const char *name);
void endDoxyAnchor();
void startDoxyAnchor(const char *fName,const char *anchor,const char *name);
void endDoxyAnchor(const char *fName,const char *anchor);
void startCodeAnchor(const char *label) { t << "<a name=\"" << label << "\"></a>"; }
void endCodeAnchor() { }
void writeLatexSpacing() {}
......@@ -201,7 +200,8 @@ class HtmlGenerator : public OutputGenerator
void endQuickIndexItem();
void writeFormula(const char *,const char *);
void writeNonBreakableSpace() { t << "&nbsp;&nbsp;&nbsp;"; }
void writeImage(const char *,const char *,const char *);
void startImage(const char *,const char *,bool);
void endImage(bool);
void startDescTable()
{ t << "<table border=0 cellspacing=2 cellpadding=0>" << endl; }
......
......@@ -24,7 +24,7 @@
#include "message.h"
#include "index.h"
#include "doxygen.h"
#include "scanner.h"
#include "doc.h"
#include "code.h"
#include "config.h"
#include "filedef.h"
......@@ -634,7 +634,7 @@ void writeNamespaceIndex(OutputList &ol)
ol.endEmphasis();
}
ol.docify(")");
ol.writeEndAnnoItem(nd->name());
ol.writeEndAnnoItem(nd->getOutputFileBase());
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(nd->name(),nd->getOutputFileBase());
......@@ -710,7 +710,7 @@ void writeAnnotatedClassList(OutputList &ol)
ol.endEmphasis();
}
ol.docify(")");
ol.writeEndAnnoItem(cd->name());
ol.writeEndAnnoItem(cd->getOutputFileBase());
if (Config::generateHtml && Config::htmlHelpFlag)
{
HtmlHelp::getInstance()->addContentsItem(
......@@ -1521,7 +1521,11 @@ void writeGraphInfo(OutputList &ol)
startTitle(ol,0);
parseText(ol,theTranslator->trLegendTitle());
endTitle(ol,0,0);
bool oldStripCommentsState = Config::stripCommentsFlag;
// temporarily disable the stripping of comments for our own code example!
Config::stripCommentsFlag = FALSE;
parseDoc(ol,"graph_legend",1,0,0,theTranslator->trLegendDocs());
Config::stripCommentsFlag = oldStripCommentsState;
endFile(ol);
ol.popGeneratorState();
}
......
......@@ -800,7 +800,7 @@ void LatexGenerator::writeIndexItem(const char *ref,const char *fn,
{
t << "\\contentsline{section}{";
docify(name);
t << "}{\\pageref{" << name << "}}{}" << endl;
t << "}{\\pageref{" << fn << "}}{}" << endl;
}
else
docify(name);
......@@ -871,14 +871,15 @@ void LatexGenerator::startTextLink(const char *f,const char *anchor)
if (anchor) t << "_" << anchor;
t << "}{";
}
else
{
t << "{\\bf ";
}
}
void LatexGenerator::endTextLink()
{
if (Config::pdfHyperFlag)
{
t << "}";
}
}
void LatexGenerator::writeObjectLink(const char *ref, const char *f,
......@@ -936,7 +937,7 @@ void LatexGenerator::endTitleHead(const char *fileName,const char *name)
t << "}" << endl;
if (name)
{
t << "\\label{" << name << "}\\index{"
t << "\\label{" << fileName << "}\\index{"
<< name << "@{";
docify(name);
t << "}}" << endl;
......@@ -1012,13 +1013,9 @@ void LatexGenerator::endMemberDoc()
if (Config::compactLatexFlag) t << "\\hfill";
}
void LatexGenerator::startDoxyAnchor(const char *fName,const char *clname,
const char *anchor,const char *)
void LatexGenerator::startDoxyAnchor(const char *fName,const char *anchor,
const char *)
{
t << "\\label{";
if (clname) t << clname;
if (anchor) t << "_" << anchor;
t << "}" << endl;
if (Config::pdfHyperFlag)
{
t << "\\hypertarget{";
......@@ -1028,12 +1025,16 @@ void LatexGenerator::startDoxyAnchor(const char *fName,const char *clname,
}
}
void LatexGenerator::endDoxyAnchor()
void LatexGenerator::endDoxyAnchor(const char *fName,const char *anchor)
{
if (Config::pdfHyperFlag)
{
t << "}" << endl;
}
t << "\\label{";
if (fName) t << fName;
if (anchor) t << "_" << anchor;
t << "}" << endl;
}
void LatexGenerator::writeAnchor(const char *fName,const char *name)
......@@ -1406,20 +1407,34 @@ void LatexGenerator::endMemberList()
t << "\\end{CompactItemize}" << endl;
}
void LatexGenerator::writeImage(const char *name,const char *w,const char *h)
void LatexGenerator::startImage(const char *name,const char *size,bool hasCaption)
{
if (hasCaption)
t << "\\begin{figure}[H]" << endl;
else
t << "\\mbox{";
QCString gfxName = name;
if (gfxName.right(4)==".eps") gfxName.left(gfxName.length()-4);
// "\\epsfig{file=" << name;
t << "\\includegraphics";
if (w || h) t << "[";
if (w) t << "width=" << w; else if (h) t << "height=" << h;
if (w || h) t << "]";
if (size) t << "[" << size << "]";
t << "{" << gfxName << "}";
if (hasCaption)
t << "\\caption{";
else
t << "}" << endl;
}
void LatexGenerator::endImage(bool hasCaption)
{
if (hasCaption)
{
t << "}" << endl;
t << "\\end{figure}" << endl;
}
}
void LatexGenerator::startMemberGroupHeader(bool hasHeader)
{
if (hasHeader) t << "\\begin{Indent}";
......
......@@ -125,8 +125,8 @@ class LatexGenerator : public OutputGenerator
void lineBreak() { t << "\\par\n"; }
void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc();
void startDoxyAnchor(const char *,const char *,const char *,const char *);
void endDoxyAnchor();
void startDoxyAnchor(const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *);
void startCodeAnchor(const char *) {}
void endCodeAnchor() {}
void writeChar(char c);
......@@ -197,7 +197,8 @@ class LatexGenerator : public OutputGenerator
void endQuickIndexItem() {}
void writeFormula(const char *,const char *);
void writeNonBreakableSpace();
void writeImage(const char *,const char *,const char *);
void startImage(const char *,const char *,bool);
void endImage(bool);
void startDescTable()
{ t << "\\begin{description}" << endl; }
......
......@@ -122,9 +122,8 @@ class ManGenerator : public OutputGenerator
void writeChar(char c);
void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc() {}
void startDoxyAnchor(const char *,const char *,
const char *,const char *) {}
void endDoxyAnchor() {}
void startDoxyAnchor(const char *,const char *,const char *) {}
void endDoxyAnchor(const char *,const char *) {}
void startCodeAnchor(const char *) {}
void endCodeAnchor() {}
void writeLatexSpacing() {}
......@@ -188,7 +187,8 @@ class ManGenerator : public OutputGenerator
void endQuickIndexItem() {}
void writeFormula(const char *,const char *) {}
void writeNonBreakableSpace() { t << " "; }
void writeImage(const char *,const char *,const char *) {}
void startImage(const char *,const char *,bool) {}
void endImage(bool) {}
void startDescTable() {}
void endDescTable() {}
......
......@@ -21,13 +21,14 @@
#include "membername.h"
#include "doxygen.h"
#include "util.h"
#include "code.h"
#include "message.h"
#include "htmlhelp.h"
#include "language.h"
#include "outputlist.h"
#include "example.h"
#include "membergroup.h"
#include "scanner.h"
#include "doc.h"
#include "groupdef.h"
#include "defargs.h"
#include "xml.h"
......@@ -583,7 +584,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
QCString doxyName=name().copy();
if (!cname.isEmpty()) doxyName.prepend(cname+"::");
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName);
ol.startDoxyAnchor(cfname,anchor(),doxyName);
ol.addToIndex(name(),cname);
ol.addToIndex(cname,name());
if (hasHtmlHelp)
......@@ -763,7 +764,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (!detailsVisible && !Config::extractAllFlag && !annMemb)
{
ol.endDoxyAnchor();
ol.endDoxyAnchor(cfname,anchor());
}
ol.endMemberItem((annoClassDef!=0 && indDepth==0) || annEnumType);
......@@ -796,7 +797,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
* all active output formats.
*/
void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
const char *scopeName)
const char *scopeName,Definition *container)
{
if (getClassDef()==0 && isStatic() && !Config::extractStaticFlag) return;
bool hasDocs = detailsAreVisible();
......@@ -809,16 +810,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
(!hasDocs && !briefDescription().isEmpty() && annUsed)
)
{
// get definition. TODO: make a method of this
NamespaceDef *nd=getNamespaceDef();
ClassDef *cd=getClassDef();
FileDef *fd=getFileDef();
Definition *d = 0;
if (cd) d=cd; else if (nd) d=nd; else d=fd;
ASSERT(d!=0);
QCString cname = d->name();
QCString cfname = d->getOutputFileBase();
// get definition.
QCString cname = container->name();
QCString cfname = container->getOutputFileBase();
// get member name
QCString doxyName=name().copy();
......@@ -858,7 +852,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name())
{
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName);
ol.startDoxyAnchor(cfname,anchor(),doxyName);
ol.startMemberDoc(cname,name(),anchor(),name());
if (hasHtmlHelp)
{
......@@ -874,7 +868,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (!found) // anonymous compound
{
//printf("Annonymous compound `%s'\n",cname.data());
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName);
ol.startDoxyAnchor(cfname,anchor(),doxyName);
ol.startMemberDoc(cname,name(),anchor(),name());
if (hasHtmlHelp)
{
......@@ -895,13 +889,14 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
else
{
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName);
ol.startDoxyAnchor(cfname,anchor(),doxyName);
ol.startMemberDoc(cname,name(),anchor(),name());
if (hasHtmlHelp)
{
htmlHelp->addIndexItem(cname,name(),cfname,anchor());
}
ClassDef *cd=getClassDef();
ArgumentList *scopeAl=scopeDefTemplateArguments();
if (scopeAl==0 && cd) scopeAl=cd->templateArguments();
......@@ -1016,7 +1011,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
if (!isDefine()) ol.endParameter(TRUE);
ol.endMemberDoc();
ol.endDoxyAnchor();
ol.endDoxyAnchor(cfname,anchor());
ol.startIndent();
ol.pushGeneratorState();
......@@ -1121,7 +1116,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
//ol.writeListItem();
ol.startDescTableTitle();
ol.startDoxyAnchor(cfname,cname,fmd->anchor(),fmd->name());
ol.startDoxyAnchor(cfname,fmd->anchor(),fmd->name());
first=FALSE;
ol.startEmphasis();
ol.docify(fmd->name());
......@@ -1129,7 +1124,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" ");
ol.enableAll();
ol.endDoxyAnchor();
ol.endDoxyAnchor(cfname,fmd->anchor());
ol.endDescTableTitle();
//ol.newParagraph();
ol.startDescTableData();
......@@ -1324,10 +1319,10 @@ void MemberDef::warnIfUndocumented()
t="class", d=cd;
else if (nd)
t="namespace", d=nd;
else if (fd)
t="file", d=fd;
else
else if (gd)
t="group", d=gd;
else
t="file", d=fd;
if (d && d->isLinkable() && !isLinkable() && name().find('@')==-1)
warn_undoc(defFileName,defLine,"Warning: Member %s of %s %s is not documented.",
......@@ -1570,3 +1565,20 @@ void MemberDef::generateXML(QTextStream &t,Definition *def)
t << ">" << endl;
}
Definition *MemberDef::getCompoundDef() const
{
NamespaceDef *nd=getNamespaceDef();
ClassDef *cd=getClassDef();
FileDef *fd=getFileDef();
GroupDef *gd=getGroupDef();
Definition *d = 0;
if (cd) d=cd; else if (nd) d=nd; else if (gd) d=gd; else d=fd;
ASSERT(d!=0);
return d;
}
QCString MemberDef::anchor() const
{
if (enumScope) return enumScope->anchor()+anc;
return anc;
}
......@@ -79,7 +79,7 @@ class MemberDef : public Definition
const char *typeString() const { return type; }
const char *argsString() const { return args; }
const char *excpString() const { return exception; }
const char *anchor() const { return anc; }
QCString anchor() const;
const QCString &initializer() const { return init; }
int initializerLines() const { return initLines; }
int getMemberSpecifiers() const { return memSpec; }
......@@ -90,6 +90,7 @@ class MemberDef : public Definition
GroupDef *getGroupDef() const { return group; }
FileDef *getFileDef() const { return fileDef; }
NamespaceDef* getNamespaceDef() const { return nspace; }
Definition *getCompoundDef() const;
// direct kind info
Protection protection() const { return prot; }
......@@ -144,7 +145,7 @@ class MemberDef : public Definition
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
bool inGroup);
void writeDocumentation(MemberList *ml,OutputList &ol,
const char *scopeName/*,MemberType m*/);
const char *scopeName,Definition *container);
void warnIfUndocumented();
// relation to other members
......
......@@ -24,7 +24,7 @@
#include "language.h"
#include "doxygen.h"
#include "outputlist.h"
#include "scanner.h"
#include "doc.h"
#include "groupdef.h"
MemberList::MemberList() : QList<MemberDef>()
......@@ -583,13 +583,13 @@ void MemberList::writeDeclarations(OutputList &ol,
}
void MemberList::writeDocumentation(OutputList &ol,
const char *scopeName/*, MemberDef::MemberType m*/)
const char *scopeName, Definition *container)
{
MemberListIterator mli(*this);
MemberDef *md;
for ( ; (md=mli.current()) ; ++mli)
{
md->writeDocumentation(this,ol,scopeName);
md->writeDocumentation(this,ol,scopeName,container);
}
}
......
......@@ -55,8 +55,8 @@ class MemberList : public QList<MemberDef>
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
const char *title,const char *subtitle,
bool inGroup=FALSE,bool countSubGroups=TRUE);
void writeDocumentation(OutputList &ol,const char *scopeName
/*,MemberDef::MemberType m*/);
void writeDocumentation(OutputList &ol,const char *scopeName,
Definition *container);
void addMemberGroup(MemberGroup *mg);
private:
......
......@@ -19,7 +19,7 @@
#include "namespacedef.h"
#include "outputlist.h"
#include "util.h"
#include "scanner.h"
#include "doc.h"
#include "language.h"
#include "classdef.h"
#include "classlist.h"
......@@ -272,7 +272,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trDefineDocumentation());
ol.endGroupHeader();
defineMembers.writeDocumentation(ol,name());
defineMembers.writeDocumentation(ol,name(),this);
}
protoMembers.countDocMembers();
......@@ -282,7 +282,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trFunctionPrototypeDocumentation());
ol.endGroupHeader();
protoMembers.writeDocumentation(ol,name());
protoMembers.writeDocumentation(ol,name(),this);
}
typedefMembers.countDocMembers();
......@@ -292,7 +292,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trTypedefDocumentation());
ol.endGroupHeader();
typedefMembers.writeDocumentation(ol,name());
typedefMembers.writeDocumentation(ol,name(),this);
}
enumMembers.countDocMembers();
......@@ -302,7 +302,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trEnumerationTypeDocumentation());
ol.endGroupHeader();
enumMembers.writeDocumentation(ol,name());
enumMembers.writeDocumentation(ol,name(),this);
}
//enumValMembers.countDocMembers();
......@@ -322,7 +322,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trFunctionDocumentation());
ol.endGroupHeader();
funcMembers.writeDocumentation(ol,name());
funcMembers.writeDocumentation(ol,name(),this);
}
varMembers.countDocMembers();
......@@ -332,7 +332,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trVariableDocumentation());
ol.endGroupHeader();
varMembers.writeDocumentation(ol,name());
varMembers.writeDocumentation(ol,name(),this);
}
// write Author section (Man only)
......
......@@ -122,9 +122,9 @@ class OutputGenerator
virtual void startMemberDoc(const char *,const char *,
const char *,const char *) = 0;
virtual void endMemberDoc() = 0;
virtual void startDoxyAnchor(const char *fileName,const char *clName,
const char *anchor,const char *name) = 0;
virtual void endDoxyAnchor() = 0;
virtual void startDoxyAnchor(const char *fName,const char *anchor,
const char *name) = 0;
virtual void endDoxyAnchor(const char *fileName,const char *anchor) = 0;
virtual void startCodeAnchor(const char *label) = 0;
virtual void endCodeAnchor() = 0;
virtual void writeLatexSpacing() = 0;
......@@ -187,7 +187,8 @@ class OutputGenerator
virtual void endQuickIndexItem() = 0;
virtual void writeFormula(const char *,const char *) = 0;
virtual void writeNonBreakableSpace() = 0;
virtual void writeImage(const char *,const char *,const char *) = 0;
virtual void startImage(const char *,const char *,bool) = 0;
virtual void endImage(bool) = 0;
virtual void startDescTable() = 0;
virtual void endDescTable() = 0;
......
......@@ -203,11 +203,10 @@ class OutputList
{ forall(&OutputGenerator::startMemberDoc,clName,memName,anchor,title); }
void endMemberDoc()
{ forall(&OutputGenerator::endMemberDoc); }
void startDoxyAnchor(const char *fn, const char *cn,
const char *anchor,const char *name)
{ forall(&OutputGenerator::startDoxyAnchor,fn,cn,anchor,name); }
void endDoxyAnchor()
{ forall(&OutputGenerator::endDoxyAnchor); }
void startDoxyAnchor(const char *fName,const char *anchor, const char *name)
{ forall(&OutputGenerator::startDoxyAnchor,fName,anchor,name); }
void endDoxyAnchor(const char *fn,const char *anchor)
{ forall(&OutputGenerator::endDoxyAnchor,fn,anchor); }
void startCodeAnchor(const char *label)
{ forall(&OutputGenerator::startCodeAnchor,label); }
void endCodeAnchor()
......@@ -332,8 +331,10 @@ class OutputList
{ forall(&OutputGenerator::writeFormula,n,t); }
void writeNonBreakableSpace()
{ forall(&OutputGenerator::writeNonBreakableSpace); }
void writeImage(const char *n,const char *w,const char *h)
{ forall(&OutputGenerator::writeImage,n,w,h); }
void startImage(const char *n,const char *s,bool c)
{ forall(&OutputGenerator::startImage,n,s,c); }
void endImage(bool c)
{ forall(&OutputGenerator::endImage,c); }
void startDescTable()
{ forall(&OutputGenerator::startDescTable); }
......
......@@ -1124,7 +1124,7 @@ void RTFGenerator::writeIndexItem(const char *ref,const char *fn,
if (!ref && fn)
{
t << "\\tab ";
WriteRTFReference(name);
WriteRTFReference(fn);
t << endl;
}
else
......@@ -1392,15 +1392,15 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name)
// make an index entry
addToIndex(name,0);
if (name)
{
writeAnchor(0,name);
}
if (Config::rtfHyperFlag && fileName)
{
//if (name)
//{
// writeAnchor(0,name);
//}
//
//if (Config::rtfHyperFlag && fileName)
//{
writeAnchor(fileName,0);
}
//}
}
}
......@@ -1459,31 +1459,13 @@ void RTFGenerator::endMemberDoc()
newParagraph();
}
void RTFGenerator::startDoxyAnchor(const char *fName,const char *clname,
const char *anchor,const char *)
void RTFGenerator::startDoxyAnchor(const char *,const char *,const char *)
{
QCString ref;
if (clname)
{
ref+=clname;
}
if (anchor)
{
ref+='_';
ref+=anchor;
}
t << "{\\bkmkstart ";
t << formatBmkStr(ref);
t << "}" << endl;
t << "{\\bkmkend ";
t << formatBmkStr(ref);
t << "}" << endl;
if (Config::rtfHyperFlag)
{ // doxygen expects a bookmark based on fName for the hyper target so we make a second bookmark
ref="";
}
void RTFGenerator::endDoxyAnchor(const char *fName,const char *anchor)
{
QCString ref;
if (fName)
{
ref+=fName;
......@@ -1500,12 +1482,6 @@ void RTFGenerator::startDoxyAnchor(const char *fName,const char *clname,
t << "{\\bkmkend ";
t << formatBmkStr(ref);
t << "}" << endl;
}
}
void RTFGenerator::endDoxyAnchor()
{
}
......@@ -1760,12 +1736,9 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d,
const char *fileName,const char *)
{
newParagraph();
DBG_RTF(t <<"{\\comment This would be an image map..." << endl)
// create a gif file
d.writeImageMap(t,dir,fileName);
t << "}" << endl;
d.writeImageMap(t,dir,fileName,FALSE);
// display the file
t << "{" << endl;
......@@ -1855,16 +1828,14 @@ void RTFGenerator::endMemberList()
#endif
}
void RTFGenerator::writeImage(const char *,const char *,const char *)
void RTFGenerator::startImage(const char *,const char *,bool)
{
#ifdef DELETEDCODE
t << "\\mbox{\\epsfig{file=" << name;
if (w)
t << "," << w;
else if (h)
t << "," << h;
t << "}}" << endl;
#endif
// not yet implemented
}
void RTFGenerator::endImage(bool)
{
// not yet implemented
}
void RTFGenerator::startDescTable()
......
......@@ -120,8 +120,8 @@ class RTFGenerator : public OutputGenerator
void lineBreak();
void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc();
void startDoxyAnchor(const char *,const char *,const char *,const char *);
void endDoxyAnchor();
void startDoxyAnchor(const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *);
void startCodeAnchor(const char *) {};
void endCodeAnchor() {};
void writeChar(char c);
......@@ -183,7 +183,8 @@ class RTFGenerator : public OutputGenerator
void endQuickIndexItem() {}
void writeFormula(const char *,const char *);
void writeNonBreakableSpace();
void writeImage(const char *,const char *,const char *);
void startImage(const char *,const char *,bool);
void endImage(bool);
void startDescTable();
void endDescTable();
......
......@@ -19,22 +19,10 @@
#define SCANNER_H
#include "qtbc.h"
#include <stdio.h>
#include <qlist.h>
#include <qintdict.h>
#include "entry.h"
#include "code.h"
class OutputList;
class Entry;
extern void parseMain(Entry *);
extern void parseDoc(OutputList &ol,
const char *fileName,int startLine,
const char *clName, const char *memName,
const QCString &docString);
extern void parseExample(OutputList &ol,const QCString &docString,
const char *fileName);
extern void parseText(OutputList &ol,const QCString &txtString);
#endif
This diff is collapsed.
......@@ -982,12 +982,12 @@ class Translator
// new since 1.2.0
//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a todo item */
/*! Used as a marker that is put before a test item */
virtual QCString trTest()
{
return "Test";
}
/*! Used as the header of the todo list */
/*! Used as the header of the test list */
virtual QCString trTestList()
{
return "Test List";
......
......@@ -45,6 +45,9 @@
// - Encoding conversion tables moved to the methods that use them.
// - Updates for "new since 1.1.5".
//
// 2000/08/02 (Petr Prikryl)
// - Updated for 1.2.0
//
// Notices:
// --------
// The conditional compilation ensures or the neutral functionality
......@@ -1128,6 +1131,23 @@ class TranslatorCzech : public Translator
{
return DECODE("vysvìtlivky");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.0
//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a test item */
virtual QCString trTest()
{
return "Test";
}
/*! Used as the header of the test list */
virtual QCString trTestList()
{
return "Seznam testù";
}
};
#endif // TRANSLATOR_CZ_H
This diff is collapsed.
......@@ -701,12 +701,12 @@ class TranslatorDutch : public Translator
// new since 1.2.0
//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a todo item */
/*! Used as a marker that is put before a test item */
virtual QCString trTest()
{
return "Test";
}
/*! Used as the header of the todo list */
/*! Used as the header of the test list */
virtual QCString trTestList()
{
return "Test Lijst";
......
This diff is collapsed.
This diff is collapsed.
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