From 7703ff62ed5e27d32af03d4a613f16e8a3320eb1 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Mon, 23 Jul 2001 14:06:43 +0000 Subject: Release-1.2.8-20010723 --- INSTALL | 4 +- Makefile.win_make.in | 2 +- README | 4 +- VERSION | 2 +- addon/doxywizard/Makefile.in | 10 +- addon/doxywizard/Makefile.win_nmake.in | 37 + addon/doxywizard/doxywizard.cpp | 29 +- addon/doxywizard/doxywizard.pro.in | 18 +- addon/doxywizard/doxywizard_templ.cpp | 363 --------- addon/doxywizard/doxywizard_templ.h | 76 -- doc/Makefile.in | 2 +- doc/Makefile.win_make.in | 2 +- doc/Makefile.win_nmake.in | 2 + doc/faq.doc | 3 - doc/language.doc | 59 +- doc/language.tpl | 40 +- doc/maintainers.txt | 2 + doc/translator.pl | 46 +- doc/translator_report.txt | 1047 +++++++++++++++++++++++++ examples/example.tag | 1 + packages/rpm/doxygen.spec | 2 +- src/classdef.cpp | 166 +++- src/classdef.h | 10 + src/config.h | 31 +- src/config.l | 231 +++--- src/declinfo.l | 34 +- src/definition.h | 2 +- src/doxygen.cpp | 500 ++++++------ src/doxygen.pro.in | 2 +- src/doxytag.pro.in | 2 +- src/entry.cpp | 103 ++- src/entry.h | 5 +- src/htmlgen.cpp | 1 + src/index.cpp | 3 +- src/language.cpp | 5 + src/latexgen.cpp | 11 +- src/libdoxygen.pro.in | 9 +- src/main.cpp | 1 + src/memberdef.cpp | 139 ++-- src/memberdef.h | 17 +- src/pre.l | 3 +- src/rtfgen.cpp | 10 +- src/scanner.l | 160 ++-- src/tagreader.cpp | 131 ++-- src/translator.cpp | 117 ++- src/translator.h | 124 +-- src/translator_cz.h | 15 +- src/translator_pt.h | 587 ++++++++++++-- src/translator_ua.h | 1329 ++++++++++++++++++++++++++++++++ src/util.cpp | 98 ++- src/util.h | 5 + src/xmlgen.cpp | 500 ++++++++++++ src/xmlgen.h | 20 + 53 files changed, 4715 insertions(+), 1407 deletions(-) create mode 100644 addon/doxywizard/Makefile.win_nmake.in delete mode 100644 addon/doxywizard/doxywizard_templ.cpp delete mode 100644 addon/doxywizard/doxywizard_templ.h create mode 100644 doc/translator_report.txt create mode 100644 src/translator_ua.h create mode 100644 src/xmlgen.cpp create mode 100644 src/xmlgen.h diff --git a/INSTALL b/INSTALL index 65fc18a..87a9ab1 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ -DOXYGEN Version 1.2.8-20010715 +DOXYGEN Version 1.2.8-20010723 Please read the installation section of the manual for instructions. -------- -Dimitri van Heesch (15 July 2001) +Dimitri van Heesch (23 July 2001) diff --git a/Makefile.win_make.in b/Makefile.win_make.in index d0a7eb2..7b6ad6a 100644 --- a/Makefile.win_make.in +++ b/Makefile.win_make.in @@ -27,6 +27,6 @@ ps: docs cd latex & $(MAKE) src\version.cpp: Makefile - echo char versionString[]="$(VERSION)"; > src\version.cpp + echo char versionString[]="""$(VERSION)"""; > src\version.cpp FORCE: diff --git a/README b/README index 6f75adb..cd6ae99 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.2.8_20010715 +DOXYGEN Version 1.2.8_20010723 Please read INSTALL for compilation instructions. @@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (15 July 2001) +Dimitri van Heesch (dimitri@stack.nl) (23 July 2001) diff --git a/VERSION b/VERSION index 42b337b..1501ac7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.8-20010715 +1.2.8-20010723 diff --git a/addon/doxywizard/Makefile.in b/addon/doxywizard/Makefile.in index 1b56e9a..ca5e11d 100644 --- a/addon/doxywizard/Makefile.in +++ b/addon/doxywizard/Makefile.in @@ -10,15 +10,9 @@ # See the GNU General Public License for more details. # -all: config.l config.h Makefile.doxywizard +all: Makefile.doxywizard $(MAKE) -f Makefile.doxywizard $@ -config.l: - $(CP) ../../src/config.l config.l - -config.h: - $(CP) ../../src/config.h config.h - Makefile.doxywizard: doxywizard.pro $(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard @@ -29,7 +23,7 @@ clean: Makefile.doxywizard $(MAKE) -f Makefile.doxywizard clean distclean: clean - $(RM) Makefile.doxywizard config.l config.h config.cpp + $(RM) Makefile.doxywizard install: $(INSTTOOL) -d $(INSTALL)/bin diff --git a/addon/doxywizard/Makefile.win_nmake.in b/addon/doxywizard/Makefile.win_nmake.in new file mode 100644 index 0000000..a9f86a9 --- /dev/null +++ b/addon/doxywizard/Makefile.win_nmake.in @@ -0,0 +1,37 @@ +# +# +# +# Copyright (C) 1997-2001 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. +# + +all: config.h config.l unistd.h Makefile.doxywizard + $(MAKE) -f Makefile.doxywizard $@ + +unistd.h: + $(CP) ..\..\src\unistd.h unistd.h + +config.h: + $(CP) ..\..\src\config.h config.h + +config.l: + $(CP) ..\..\src\config.l config.l + +Makefile.doxywizard: doxywizard.pro + $(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard + +tmake: + $(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard + +clean: Makefile.doxywizard + $(MAKE) -f Makefile.doxywizard clean + +distclean: clean + $(RM) Makefile.doxywizard config.cpp + +FORCE: diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index 2495d87..3fcde0b 100644 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -56,32 +56,23 @@ static bool loadConfig( QString loadFile ) ); return FALSE; } - QFile f( loadFile ); - if ( !f.open(IO_ReadOnly) ) - { - QMessageBox::warning(0, - "Warning","Cannot open input "+loadFile+ - " for reading!.", - "abort" - ); - exit(1); - } // set config values to their defaults Config::instance()->init(); - // read file into a string buffer - int fsize = fi.size(); - QCString contents(fsize+1); // add room for \0 terminator - f.readBlock(contents.data(),fsize); - contents[fsize]='\0'; - // parse the config file // this will initialize the various Config data members - Config::instance()->parse(contents,loadFile); + if (Config::instance()->parse(loadFile)) + { + QMessageBox::warning(0, + "Warning","Cannot open or read input "+loadFile+"!", + "abort" + ); + return FALSE; + } + Config::instance()->convertStrToVal(); - f.close(); return TRUE; } @@ -322,7 +313,7 @@ void Wizard::about() "
A tool to create and edit configuration files " "that can be read by doxygen.

" "

Written by Dimitri van Heesch

" - "

(c) 2000
" + "
(c) 2000-2001
" ); } diff --git a/addon/doxywizard/doxywizard.pro.in b/addon/doxywizard/doxywizard.pro.in index 3e96901..5337781 100644 --- a/addon/doxywizard/doxywizard.pro.in +++ b/addon/doxywizard/doxywizard.pro.in @@ -12,7 +12,8 @@ # project file for the doxywizard project # special template configuration file because we use flex -TEMPLATE = doxywizard.t +unix:TEMPLATE = app.t +win32:TEMPLATE = doxywizard.t # executable to generate TARGET = ../../bin/doxywizard @@ -28,8 +29,8 @@ HEADERS = doxywizard.h \ inputbool.h \ inputstrlist.h \ inputint.h \ - config.h \ pixmaps.h +win32:HEADERS += config.h # source flle for the project SOURCES = doxywizard.cpp \ @@ -39,8 +40,8 @@ SOURCES = doxywizard.cpp \ inputbool.cpp \ inputstrlist.cpp \ inputint.cpp \ - config.cpp \ pixmaps.cpp +win32:SOURCES += config.cpp # where to put the objects OBJECTS_DIR = obj @@ -49,7 +50,12 @@ OBJECTS_DIR = obj MOC_DIR = moc # extra C++ compiler options -TMAKE_CXXFLAGS += -DDOXYWIZARD -win32:TMAKE_CXXFLAGS += -I. -DQT_DLL -win32:TMAKE_LIBS = $(QTDIR)\lib\qtmain.lib $(QTDIR)\lib\qt-mt230nc.lib user32.lib gdi32.lib comdlg32.lib imm32.lib ole32.lib uuid.lib wsock32.lib +INCLUDEPATH += ../../src +win32:TMAKE_CXXFLAGS += -DQT_DLL +win32:INCLUDEPATH += . + +# extra link options +win32:TMAKE_LIBS = $(QTDIR)\lib\qtmain.lib $(QTDIR)\lib\qt-mt230nc.lib user32.lib gdi32.lib comdlg32.lib imm32.lib ole32.lib uuid.lib wsock32.lib +win32:TMAKE_LIBS_QT = +unix:LIBS = -L../../lib -ldoxycfg diff --git a/addon/doxywizard/doxywizard_templ.cpp b/addon/doxywizard/doxywizard_templ.cpp deleted file mode 100644 index cafec21..0000000 --- a/addon/doxywizard/doxywizard_templ.cpp +++ /dev/null @@ -1,363 +0,0 @@ -/****************************************************************************** - * - * - * - * Copyright (C) 1997-2001 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "doxywizard.h" -#include "pagewidget.h" -#include "inputbool.h" -#include "inputstring.h" -#include "inputstrlist.h" -#include "inputint.h" -#include "config.h" -#include "version.h" -#include "pixmaps.h" - -QString configFileName; - -const int messageTimeout = 4000; //!< status bar message timeout in millisec. - -//------------------------------------------------------------------------- - -static bool loadConfig( QString loadFile ) -{ - QFileInfo fi( loadFile ); - if ( !fi.exists() ) - { - QMessageBox::warning(0, - "Warning","Input file "+loadFile+ - " does not exist! Starting new file.", - "ok" - ); - return FALSE; - } - QFile f( loadFile ); - if ( !f.open(IO_ReadOnly) ) - { - QMessageBox::warning(0, - "Warning","Cannot open input "+loadFile+ - " for reading!.", - "abort" - ); - exit(1); - } - - // set config values to their defaults - Config::init(); - - // read file into a string buffer - int fsize = fi.size(); - QCString contents(fsize+1); // add room for \0 terminator - f.readBlock(contents.data(),fsize); - contents[fsize]='\0'; - - // parse the config file - // this will initialize the various Config data members - parseConfig(contents,loadFile); - configStrToVal(); - - f.close(); - return TRUE; -} - -static bool saveConfig( QString saveFile ) -{ - QFile f( saveFile ); - if ( !f.open(IO_WriteOnly) ) - { - QMessageBox::warning(0, - "Warning","Cannot open file "+saveFile+ - " for writing. Nothing saved!.", - "ok" - ); - return FALSE; // failure - } - - writeTemplateConfig(&f,TRUE); // write brief config file - - return TRUE; // success -} - -//-------------------------------------------------------------------------- - -Wizard::Wizard(int argc,char **argv) : - QMainWindow( 0, (QCString)"DoxyWizard v"+versionString ) -{ - // File popupmenu - - hasChanged=FALSE; - - fileTools = new QToolBar( this, "file operations" ); - fileTools->setLabel( "File Operations" ); - - new QToolButton( QPixmap( file_xpm ), "New File", QString::null, - this, SLOT(newFile()), fileTools, "new file" ); - - //QToolButton * fileOpen = - new QToolButton( QPixmap( fileopen_xpm ), "Open File", QString::null, - this, SLOT(loadFile()), fileTools, "open file" ); - - //QToolButton * fileSave = - new QToolButton( QPixmap( filesave_xpm ), "Save File", QString::null, - this, SLOT(saveFile()), fileTools, "save file" ); - - //Micha: QToolButton * = - new QToolButton( QPixmap( rundoxygen_xpm ), "Save and Run doxygen", QString::null, - this, SLOT(runDoxygen()), fileTools, "save and run doxygen" ); - - - QWhatsThis::whatsThisButton( fileTools ); - - QPopupMenu* file = new QPopupMenu; - file->insertItem( QIconSet(QPixmap(file_xpm)), - "&New", this, SLOT(newFile()), CTRL+Key_N ); - file->insertItem( QIconSet(QPixmap(fileopen_xpm)), - "&Load", this, SLOT(loadFile()), CTRL+Key_O ); - file->insertSeparator(); - file->insertItem( QIconSet(QPixmap(filesave_xpm)), - "&Save", this, SLOT(saveFile()), CTRL+Key_S ); - file->insertItem( "&Save as ...", this, SLOT(saveAsFile()) ); - file->insertSeparator(); - file->insertItem( "&Quit", this, SLOT(quit()), CTRL+Key_Q ); - - // Doxygen popupmenu - QPopupMenu* doxygen = new QPopupMenu; - int itemIndex = doxygen->insertItem( QIconSet(QPixmap(rundoxygen_xpm)), - "&Run", this, SLOT(runDoxygen()), CTRL+Key_R ); - doxygen->setWhatsThis ( itemIndex, "Run doxygen with the current configuration file..." ); - - // Help popupmenu - QPopupMenu* help = new QPopupMenu; - help->insertItem( "&About", this, SLOT(about()), Key_F1 ); - help->insertItem( "What's &This", this , SLOT(whatsThis()), SHIFT+Key_F1); - - // menubar definition - menuBar()->insertItem( "&File", file ); - menuBar()->insertItem( "&Doxygen", doxygen ); - menuBar()->insertSeparator(); - menuBar()->insertItem( "&Help", help ); - - statusBar()->message("Welcome to DoxyWizard",messageTimeout); - - cw = new ConfigFile( this ); - connect(cw,SIGNAL(changed()),this,SLOT(changed())); - setCentralWidget( cw ); - cw->show(); - - if (argc==2) - { - loadFile(argv[1]); - } - else - { - newFile(); - } - refreshCaption(); - - resize( 640, 480 ); - -} - -void Wizard::newFile() -{ - if (hasChanged) - { - switch( QMessageBox::warning( this, "DoxyWizard", "Start a new file and lose changes?\n", - "Yes", "No", 0, 0, 1 )) - { - case 0: - break; - default: // command aborted by the user - return; - } - } - Config::init(); - configFileName="Doxyfile"; - cw->init(); -} - -void Wizard::loadFile(const char *fileName) -{ - if (fileName==0) - { - configFileName = QFileDialog::getOpenFileName(); - } - else - { - configFileName = fileName; - } - - if ( !configFileName.isNull() ) - { - //initData( configFileName ); - loadConfig(configFileName); - cw->init(); - - statusBar()->message(configFileName, messageTimeout); - } -} - -void Wizard::loadFile() -{ - if (hasChanged) - { - switch( QMessageBox::warning( - this, "DoxyWizard", "Load a new file and lose changes?\n", - "Yes", "No", 0, 0, 1 )) - { - case 0: - break; - default: // command aborted by the user - return; - } - } - loadFile(0); -} - -void Wizard::saveFile() -{ - //printf("configFileName=`%s'\n",configFileName.data()); - if (configFileName.isEmpty()) - { - saveAsFile(); - return; - } - else - { - saveConfig(configFileName); - statusBar()->message(configFileName + " saved", messageTimeout); - } - hasChanged = FALSE; - refreshCaption(); -} - -void Wizard::saveAsFile() -{ - configFileName = QFileDialog::getSaveFileName(); - if (configFileName.isNull()) - { - statusBar()->message("Save aborted", messageTimeout ); - return; // operation cancelled by the user - } - - saveConfig(configFileName); - statusBar()->message("Saved as "+ configFileName, messageTimeout ); -} - -//Micha -void Wizard::runDoxygen() -{ - saveFile(); - QString s = "doxygen " + configFileName; - system((const char*)s); - statusBar()->message("doxygen completed: "+ configFileName, messageTimeout ); - hasChanged = FALSE; - refreshCaption(); -} - - -void Wizard::quit() -{ - if (hasChanged) - { - switch( QMessageBox::warning( this, "DoxyWizard", "Quit and lose changes?\n", - "Yes", "No", 0, 0, 1 )) - { - case 0: - qApp->quit(); - break; - case 1: - break; - } - } - else - { - qApp->quit(); - } -} - -void Wizard::changed() -{ - hasChanged = TRUE; - refreshCaption(); -} - -void Wizard::refreshCaption() -{ - QString s; - if (hasChanged) s=" *"; - setCaption("Doxywizard - ["+configFileName+s+"]"); -} - -void Wizard::about() -{ - QMessageBox::about(this, "DoxyWizard", - "
A tool to create and edit configuration files " - "that can be read by doxygen.

" - "

Written by Dimitri van Heesch

" - "

(c) 2000
" - ); -} - -//---------------------------------------------------------------------- - -ConfigFile::ConfigFile( QWidget *parent ) : QWidget( parent ) -{ - QVBoxLayout *layout = new QVBoxLayout( this ); - - // QTabWidget definition - QTabWidget *tab = new QTabWidget( this ); - layout->addWidget( tab ); - -#CONFIG Widgets0 -#CONFIG Widgets1 - -} - -ConfigFile::~ConfigFile() -{ -} - -#CONFIG WidgetSlotImpl - -void ConfigFile::init() -{ -#CONFIG WidgetInit -} - -//---------------------------------------------------------------------- - -int main(int argc,char **argv) -{ - QApplication::setColorSpec( QApplication::NormalColor ); - QApplication app(argc,argv); - Wizard wizard(argc,argv); - app.setMainWidget( &wizard ); - wizard.show(); - return app.exec(); -} diff --git a/addon/doxywizard/doxywizard_templ.h b/addon/doxywizard/doxywizard_templ.h deleted file mode 100644 index 92e35e1..0000000 --- a/addon/doxywizard/doxywizard_templ.h +++ /dev/null @@ -1,76 +0,0 @@ -/****************************************************************************** - * - * - * - * Copyright (C) 1997-2001 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. - * - */ - -#ifndef _DOXWIZARD_H -#define _DOXWIZARD_H - -#include - -class QToolBar; -class ConfigFile; -class InputBool; -class InputString; -class InputStrList; -class InputFile; -class InputDir; -class InputInt; - -class Wizard : public QMainWindow -{ - Q_OBJECT - - public: - Wizard(int argc,char **argv); - ~Wizard(){}; - void loadFile(const char *s); - - private slots: - void newFile(); - void loadFile(); - void saveFile(); - void saveAsFile(); - void quit(); - void changed(); - void about(); - void runDoxygen(); // Micha - - signals: - - private: - void refreshCaption(); - QToolBar *fileTools; - bool hasChanged; - ConfigFile *cw; -}; - -class ConfigFile : public QWidget -{ - Q_OBJECT - - public: - ConfigFile(QWidget *parent=0); - ~ConfigFile(); - void init(); - - signals: - void changed(); - - private slots: -#CONFIG WidgetSlots - - private: -#CONFIG WidgetVars -}; - -#endif diff --git a/doc/Makefile.in b/doc/Makefile.in index db61bf9..4deee03 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -31,6 +31,6 @@ clean: language: language.doc language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.pl - $(PERL) translator.pl + $(ENV) VERSION=$(VERSION) DOXYGEN_DOCDIR=. $(PERL) translator.pl FORCE: diff --git a/doc/Makefile.win_make.in b/doc/Makefile.win_make.in index f881667..3161b31 100644 --- a/doc/Makefile.win_make.in +++ b/doc/Makefile.win_make.in @@ -31,6 +31,6 @@ clean: language: language.doc language.doc: maintainers.txt language.tpl translator.pl - $(PERL) translator.pl + set DOXYGEN_DOCDIR=. & set VERSION=$(VERSION) & $(PERL) translator.pl FORCE: diff --git a/doc/Makefile.win_nmake.in b/doc/Makefile.win_nmake.in index 13e386d..05820b0 100644 --- a/doc/Makefile.win_nmake.in +++ b/doc/Makefile.win_nmake.in @@ -31,6 +31,8 @@ clean: language: language.doc language.doc: maintainers.txt language.tpl translator.pl + set DOXYGEN_DOCDIR=. + set VERSION=$(VERSION) $(PERL) translator.pl FORCE: diff --git a/doc/faq.doc b/doc/faq.doc index 4fb9a63..1ed33dc 100644 --- a/doc/faq.doc +++ b/doc/faq.doc @@ -210,9 +210,6 @@ generator -> gen At the time I was looking into lex and yacc, where a lot of things start with "yy", so the "y" slipped in and made things pronouncable. -I realized later that doxygen could also be read as Dimitri's oxygen, -which could be seen as something I need to live :-) - \htmlonly diff --git a/doc/language.doc b/doc/language.doc index d97ed69..111616c 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -24,20 +24,19 @@ Doxygen has built-in support for multiple languages. This means that the text fragments that doxygen generates can be produced in languages other than English (the default) at configuration time. -

-Currently (version unknown), 23 languages + +Currently (version 1.2.8-20010723), 24 languages are supported (sorted alphabetically): Brazilian Portuguese, Chinese, Croatian, Czech, Danish, Dutch, English, Finnish, French, German, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Slovak, -Slovene, Spanish, and Swedish. +Slovene, Spanish, Swedish, and Ukrainian. The table of information related to the supported languages follows. It is sorted by language alphabetically. The Status column was generated from sources and shows approximately the last version when the translator was updated. -

\htmlonly @@ -151,7 +150,7 @@ when the translator was updated. - + @@ -189,6 +188,12 @@ when the translator was updated. + + + + + +
Portuguese Rui Godinho Lopes ruiglopes@NOSPAM.yahoo.com1.1.5up-to-date
Romaniansahag96@NOSPAM.nts.mh.se
xet@NOSPAM.hem.passagen.se
1.0.0
UkrainianOlexij Tkatchenkoolexij.tkatchenko@NOSPAM.gmx.deup-to-date
@@ -235,7 +240,7 @@ when the translator was updated. \hline Polish & Grzegorz Kowal & {\tt g\_kowal@poczta.onet.pl} & 1.2.1 \\ \hline - Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & 1.1.5 \\ + Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & up-to-date \\ \hline Romanian & Alexandru Iosup & {\tt aiosup@yahoo.com} & 1.2.1 \\ \hline @@ -250,19 +255,19 @@ when the translator was updated. Swedish & Samuel H\"{a}agglund & {\tt sahag96@nts.mh.se} & 1.0.0 \\ & XeT Erixon & {\tt xet@hem.passagen.se} & \\ \hline + Ukrainian & Olexij Tkatchenko & {\tt olexij.tkatchenko@gmx.de} & up-to-date \\ + \hline \end{tabular} \endlatexonly -Have a look at doxygen/doc/translator_report.txt for more details. -

Most people on the list have indicated that they were also busy doing other things, so if you want to help to speed things up please let them (or me) know. If you want to add support for a language that is not yet listed -please see the next section. +please read the next section. +

Adding a new language to doxygen

@@ -306,9 +311,9 @@ Just follow these steps: To enter special characters (with accents) you can:
  • Enter them directly if your keyboard supports that and you are - using a Latin-1 font. - Doxygen will translate the characters to proper LateX and - leave the Html and man output for what it is (which is fine, if + using a Latin-1 font. Doxygen will translate the + characters to proper \f$\mbox{\LaTeX}\f$ and leave the + HTML and man output for what it is (which is fine, if idLanguageCharset() is set correctly).
  • Use html codes like \ä for an a with an umlaut (i.e. ä). See the HTML specification for the codes. @@ -451,17 +456,23 @@ the minimal number of translator adapter classes. To simplify the maintenance of the language translator classes for the supported languages, the \c translator.pl perl script was developed (located in \c doxygen/doc directory). -It is able to extract the important information about obsolete and -new methods from the source files for each of the languages -- see -the reference to the translator report ASCII file below -the table of supported languages shown earlier. Looking at the base -class of the language translator, the script guesses also the status -of the translator -- see the last column of the mentioned table. -The \c translator.pl is called automatically when the doxygen -documentation is generated. You can also run the script manualy -whenever you feel that it can help you. Of course, you are not -forced to use the results of the script. You can find the same -information by looking at the adapter class and its base classes. +It extracts the important information about obsolete and +new methods from the source files for each of the languages. +The information is stored in the translator report ASCII file +(doxygen/doc/translator_report.txt). \htmlonly If you compiled this documentation +from sources and if you have also doxygen sources available the +link + doxygen/doc/translator_report.txt should be valid.\endhtmlonly + +Looking at the base class of the language translator, the script +guesses also the status of the translator -- see the last column of +the table with languages above. The \c translator.pl is called +automatically when the doxygen documentation is generated. You can +also run the script manualy whenever you feel that it can help you. +Of course, you are not forced to use the results of the script. You +can find the same information by looking at the adapter class and +its base classes. + How should I update my language translator? Firstly, you should be the language maintainer, or you should let him/her know diff --git a/doc/language.tpl b/doc/language.tpl index d81c213..7390f02 100644 --- a/doc/language.tpl +++ b/doc/language.tpl @@ -22,7 +22,7 @@ Doxygen has built-in support for multiple languages. This means that the text fragments that doxygen generates can be produced in languages other than English (the default) at configuration time. -

    + Currently (version $version), $numlang languages are supported (sorted alphabetically): $languages. @@ -31,17 +31,16 @@ The table of information related to the supported languages follows. It is sorted by language alphabetically. The Status column was generated from sources and shows approximately the last version when the translator was updated. -

    $information_table -

    Most people on the list have indicated that they were also busy doing other things, so if you want to help to speed things up please let them (or me) know. If you want to add support for a language that is not yet listed -please see the next section. +please read the next section. +

    Adding a new language to doxygen

    @@ -85,9 +84,9 @@ Just follow these steps: To enter special characters (with accents) you can:
    • Enter them directly if your keyboard supports that and you are - using a Latin-1 font. - Doxygen will translate the characters to proper LateX and - leave the Html and man output for what it is (which is fine, if + using a Latin-1 font. Doxygen will translate the + characters to proper \f$\mbox{\LaTeX}\f$ and leave the + HTML and man output for what it is (which is fine, if idLanguageCharset() is set correctly).
    • Use html codes like \ä for an a with an umlaut (i.e. ä). See the HTML specification for the codes. @@ -230,17 +229,22 @@ the minimal number of translator adapter classes. To simplify the maintenance of the language translator classes for the supported languages, the \c translator.pl perl script was developed (located in \c doxygen/doc directory). -It is able to extract the important information about obsolete and -new methods from the source files for each of the languages -- see -the reference to the translator report ASCII file below -the table of supported languages shown earlier. Looking at the base -class of the language translator, the script guesses also the status -of the translator -- see the last column of the mentioned table. -The \c translator.pl is called automatically when the doxygen -documentation is generated. You can also run the script manualy -whenever you feel that it can help you. Of course, you are not -forced to use the results of the script. You can find the same -information by looking at the adapter class and its base classes. +It extracts the important information about obsolete and +new methods from the source files for each of the languages. +The information is stored in the translator report ASCII file +($translator_report_file_name). \htmlonly If you compiled this documentation +from sources and if you have also doxygen sources available the +link $translator_report_link should be valid.\endhtmlonly + +Looking at the base class of the language translator, the script +guesses also the status of the translator -- see the last column of +the table with languages above. The \c translator.pl is called +automatically when the doxygen documentation is generated. You can +also run the script manualy whenever you feel that it can help you. +Of course, you are not forced to use the results of the script. You +can find the same information by looking at the adapter class and +its base classes. + How should I update my language translator? Firstly, you should be the language maintainer, or you should let him/her know diff --git a/doc/maintainers.txt b/doc/maintainers.txt index c476fb5..7c60bcb 100644 --- a/doc/maintainers.txt +++ b/doc/maintainers.txt @@ -74,3 +74,5 @@ Swedish Samuel Häagglund: sahag96@nts.mh.se XeT Erixon: xet@hem.passagen.se +Ukrainian +Olexij Tkatchenko: olexij.tkatchenko@gmx.de diff --git a/doc/translator.pl b/doc/translator.pl index 9d44686..4c4bdac 100644 --- a/doc/translator.pl +++ b/doc/translator.pl @@ -26,7 +26,7 @@ # class for "almost up-to-date" translators. # - $doxygenrootdir and other global variables for storing # directories determined from DOXYGEN_DOCDIR environment -# variable. The change was done because the DOXYGEN_DOCDIR +# variable. The change was done because the DOXYGEN_DOCDIR # was already used before. # - $version mark can be used in the language.tpl template. # @@ -41,9 +41,23 @@ # 2001/06/11 # - Character entity č recognized in maintainers.txt. # +# 2001/07/17 +# - Perl version checking is less confusing now. The script stops +# immediately after the first command below when your perl +# is older that required. +# - The information below the table of languages is not produced +# with the table. Another symbol replacement is done, so language.tpl +# can be updated so that the generated language.doc does not contain +# the link to the translator_report.txt. +# +# Todo: +# ----- +# - Something changed. The environment variables like VERSION, +# DOXYGEN_DOCDIR are not set now when make is run. +# ################################################################ -require 5.005; +use 5.005; use strict; use Carp; @@ -561,9 +575,9 @@ xxxTABLE_FOOTxxx ##}}} # Finish the tables, and substitute the mark in the doc - # template by the contatenation of the tables and the notice - # about $ftranslatortxt. Add NOSPAM to email addresses in the - # HTML table. Replace the special character sequences. #{{{ + # template by the contatenation of the tables. Add NOSPAM to + # email addresses in the HTML table. Replace the special + # character sequences. #{{{ # $tableHTML .= $htmlTableFoot; $tableLATEX .= $latexTableFoot; @@ -580,14 +594,21 @@ xxxTABLE_FOOTxxx $tableLATEX =~ s/ř/\\v{r}/sg; $tableLATEX =~ s/_/\\_/sg; - my $notice = "\nHave a look at " - . "doxygen/doc/$ftranslatortxt " - . "for more details."; + $output =~ s{\$information_table}{$tableHTML$tableLATEX}; - $output =~ s{\$information_table}{$tableHTML$tableLATEX$notice}; + ##}}} + # Replace the other symbols in the template by the expected + # information. ##{{{ + # $output =~ s{\$version}{$doxversion}; + $output =~ s{\$translator_report_file_name} + {doxygen/doc/$ftranslatortxt}x; + + $output =~ s{\$translator_report_link} + { + doxygen/doc/$ftranslatortxt}x; ##}}} # Replace the introduction notice in the output. #{{{ @@ -624,6 +645,13 @@ xxxTABLE_FOOTxxx $srcdir = "$doxygenrootdir/src"; +=pod +# Show the environment variables (for debugging only). +# +foreach (sort keys %ENV) { print STDERR "$_=$ENV{$_}\n"; } +print STDERR "\n\n"; +=cut + $doxversion = (defined $ENV{'VERSION'}) ? $ENV{'VERSION'} : 'unknown'; ##}}} diff --git a/doc/translator_report.txt b/doc/translator_report.txt new file mode 100644 index 0000000..a815ed0 --- /dev/null +++ b/doc/translator_report.txt @@ -0,0 +1,1047 @@ +Doxygen supports the following (23) languages (sorted alphabetically): + + Brazilian + Chinese + Croatian + Czech + Danish + Dutch + English + Finnish + French + German + Hungarian + Italian + Japanese + Korean + Norwegian + Polish + Portuguese + Romanian + Russian + Slovak + Slovene + Spanish + Swedish + +---------------------------------------------------------------------- +The following translator classes are up-to-date (sorted alphabetically). +This means that they derive from the Translator class. If the translator +derives from TranslatorAdapterCVS, it is considered to be almost up-to-date. +In other words, it is newer than the last official release. Anyway, there +still may be some details listed even for the up-to-date translators. +Please, check the text below. + + TranslatorCroatian + TranslatorCzech + TranslatorDanish (TranslatorAdapterCVS) + TranslatorEnglish + TranslatorGerman + TranslatorItalian (TranslatorAdapterCVS) + TranslatorRussian + TranslatorSlovak (TranslatorAdapterCVS) + TranslatorSpanish (TranslatorAdapterCVS) + +---------------------------------------------------------------------- +The following translator classes are obsolete (sorted alphabetically). +This means that they derive from some of the adapter classes. + + TranslatorBrazilian (TranslatorAdapter_1_2_6) + TranslatorChinese (TranslatorAdapter_1_2_1) + TranslatorDutch (TranslatorAdapter_1_2_6) + TranslatorFinnish (TranslatorAdapter_1_0_0) + TranslatorFrench (TranslatorAdapter_1_2_0) + TranslatorHungarian (TranslatorAdapter_1_2_1) + TranslatorJapanese (TranslatorAdapter_1_2_5) + TranslatorKorean (TranslatorAdapter_1_1_0) + TranslatorNorwegian (TranslatorAdapter_1_2_2) + TranslatorPolish (TranslatorAdapter_1_2_1) + TranslatorPortuguese (TranslatorAdapter_1_1_5) + TranslatorRomanian (TranslatorAdapter_1_2_1) + TranslatorSlovene (TranslatorAdapter_1_1_5) + TranslatorSwedish (TranslatorAdapter_1_0_0) + + +---------------------------------------------------------------------- +Localized translators are expected to implement the following methods +(prototypes sorted aplhabetically): + +QCString idLanguage() +QCString idLanguageCharset() +QCString latexLanguageSupportCommand() +QCString trAlphabeticalList() +QCString trAttention() +QCString trAuthor(bool first_capital, bool singular) +QCString trBug() +QCString trBugList() +QCString trBugsAndLimitations() +QCString trClass(bool first_capital, bool singular) +QCString trClassDiagram(const char *clName) +QCString trClassDocumentation() +QCString trClassHierarchy() +QCString trClassHierarchyDescription() +QCString trClasses() +QCString trCode() +QCString trCollaborationDiagram(const char *clName) +QCString trCompoundIndex() +QCString trCompoundList() +QCString trCompoundListDescription() +QCString trCompoundMembers() +QCString trCompoundMembersDescription(bool extractAll) +QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) +QCString trCompounds() +QCString trConstructorDocumentation() +QCString trDCOPMethods() +QCString trDate() +QCString trDefineDocumentation() +QCString trDefineValue() +QCString trDefinedAtLineInSourceFile() +QCString trDefinedIn() +QCString trDefinedInSourceFile() +QCString trDefines() +QCString trDeprecated() +QCString trDetailedDescription() +QCString trDocumentation() +QCString trEnumName() +QCString trEnumValue() +QCString trEnumerationTypeDocumentation() +QCString trEnumerationValueDocumentation() +QCString trEnumerationValues() +QCString trEnumerations() +QCString trExampleDocumentation() +QCString trExamples() +QCString trExamplesDescription() +QCString trExceptions() +QCString trField(bool first_capital, bool singular) +QCString trFile(bool first_capital, bool singular) +QCString trFileDocumentation() +QCString trFileIndex() +QCString trFileList() +QCString trFileListDescription(bool extractAll) +QCString trFileMembers() +QCString trFileMembersDescription(bool extractAll) +QCString trFileReference(const char *fileName) +QCString trForInternalUseOnly() +QCString trFriends() +QCString trFuncProtos() +QCString trFunctionDocumentation() +QCString trFunctionPrototypeDocumentation() +QCString trFunctions() +QCString trGeneratedAt(const char *date,const char *projName) +QCString trGeneratedAutomatically(const char *s) +QCString trGeneratedBy() +QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool single) +QCString trGlobal(bool first_capital, bool singular) +QCString trGotoDocumentation() +QCString trGotoGraphicalHierarchy() +QCString trGotoSourceCode() +QCString trGotoTextualHierarchy() +QCString trGraphicalHierarchy() +QCString trGroup(bool first_capital, bool singular) +QCString trHeaderFiles() +QCString trHeaderFilesDescription() +QCString trHierarchicalIndex() +QCString trInclByDepGraph() +QCString trInclDepGraph(const char *fName) +QCString trIncludingInheritedMembers() +QCString trInheritedByList(int numEntries) +QCString trInheritsList(int numEntries) +QCString trInitialValue() +QCString trInterfaces() +QCString trInvariant() +QCString trLegend() +QCString trLegendDocs() +QCString trLegendTitle() +QCString trListOfAllMembers() +QCString trMainPage() +QCString trMember(bool first_capital, bool singular) +QCString trMemberDataDocumentation() +QCString trMemberEnumerationDocumentation() +QCString trMemberFunctionDocumentation() +QCString trMemberList() +QCString trMemberTypedefDocumentation() +QCString trModuleDocumentation() +QCString trModuleIndex() +QCString trModules() +QCString trModulesDescription() +QCString trMore() +QCString trNamespace(bool first_capital, bool singular) +QCString trNamespaceDocumentation() +QCString trNamespaceIndex() +QCString trNamespaceList() +QCString trNamespaceListDescription(bool extractAll) +QCString trNamespaceMemberDescription(bool extractAll) +QCString trNamespaceMembers() +QCString trNamespaceReference(const char *namespaceName) +QCString trNamespaces() +QCString trNoDescriptionAvailable() +QCString trNote() +QCString trPackage(const char *name) +QCString trPackageDocumentation() +QCString trPackageList() +QCString trPackageListDescription() +QCString trPackages() +QCString trPage(bool first_capital, bool singular) +QCString trPageAbbreviation() +QCString trPageDocumentation() +QCString trPageIndex() +QCString trParameters() +QCString trPostcondition() +QCString trPrecondition() +QCString trPrivateAttribs() +QCString trPrivateMembers() +QCString trPrivateSlots() +QCString trPrivateTypes() +QCString trProperties() +QCString trPropertyDocumentation() +QCString trProtectedAttribs() +QCString trProtectedMembers() +QCString trProtectedSlots() +QCString trProtectedTypes() +QCString trPublicAttribs() +QCString trPublicMembers() +QCString trPublicSlots() +QCString trPublicTypes() +QCString trRTFCharSet() +QCString trRTFGeneralIndex() +QCString trRTFansicp() +QCString trReferenceManual() +QCString trReferencedBy() +QCString trReimplementedForInternalReasons() +QCString trReimplementedFromList(int numEntries) +QCString trReimplementedInList(int numEntries) +QCString trRelatedFunctionDocumentation() +QCString trRelatedFunctions() +QCString trRelatedPages() +QCString trRelatedPagesDescription() +QCString trRelatedSubscript() +QCString trRemarks() +QCString trReturnValues() +QCString trReturns() +QCString trSearch() +QCString trSeeAlso() +QCString trSignals() +QCString trSince() +QCString trSources() +QCString trStaticPrivateAttribs() +QCString trStaticPrivateMembers() +QCString trStaticProtectedAttribs() +QCString trStaticProtectedMembers() +QCString trStaticPublicAttribs() +QCString trStaticPublicMembers() +QCString trTest() +QCString trTestList() +QCString trThisIsTheListOfAllMembers() +QCString trTodo() +QCString trTodoList() +QCString trTypedefDocumentation() +QCString trTypedefs() +QCString trVariableDocumentation() +QCString trVariables() +QCString trVersion() +QCString trWarning() +QCString trWriteList(int numEntries) +QCString trWrittenBy() + + +---------------------------------------------------------------------- +Details related to specific translator classes follows. +Notice that the prototypes are recognized only when they +are the same as in the Translator class. + + +TranslatorBrazilian (TranslatorAdapter_1_2_6) +------------------- + +Missing methods (should be implemented): + + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trFile(bool first_capital, bool singular) + QCString trGlobal(bool first_capital, bool singular) + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trRTFansicp() + QCString trNamespace(bool first_capital, bool singular) + QCString trClass(bool first_capital, bool singular) + QCString trRTFCharSet() + QCString trMember(bool first_capital, bool singular) + QCString trAuthor(bool first_capital, bool singular) + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trFiles() + QCString trVerbatimText(const char *f) + + + +TranslatorChinese (TranslatorAdapter_1_2_1) +----------------- + +Missing methods (should be implemented): + + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trPackageListDescription() + QCString trFile(bool first_capital, bool singular) + QCString trBug() + QCString trGlobal(bool first_capital, bool singular) + QCString trPackageList() + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trPackage(const char *name) + QCString trProperties() + QCString trBugList() + QCString trDCOPMethods() + QCString trPackageDocumentation() + QCString trRTFansicp() + QCString trNamespace(bool first_capital, bool singular) + QCString trPropertyDocumentation() + QCString trClass(bool first_capital, bool singular) + QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool single) + QCString trInterfaces() + QCString trRTFCharSet() + QCString latexLanguageSupportCommand() + QCString trPackages() + QCString trMember(bool first_capital, bool singular) + QCString trDefineValue() + QCString trAuthor(bool first_capital, bool singular) + QCString trClasses() + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trFiles() + QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool) + QCString trVerbatimText(const char *f) + + + +TranslatorGerman (Translator) +---------------- + +Missing methods (should be implemented): + + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) + QCString trPage(bool first_capital, bool singular) + QCString trFile(bool first_capital, bool singular) + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trNamespace(bool first_capital, bool singular) + QCString trClass(bool first_capital, bool singular) + QCString trMember(bool first_capital, bool singular) + QCString trAuthor(bool first_capital, bool singular) + +Obsolete methods (should be removed): + + QCString trAuthor(bool, bool singular) + QCString trClass(bool, bool singular) + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool ) + QCString trField(bool, bool singular) + QCString trFile(bool, bool singular) + QCString trGroup(bool, bool singular) + QCString trMember(bool, bool singular) + QCString trNamespace(bool, bool singular) + QCString trPage(bool, bool singular) + + + +TranslatorDanish (TranslatorAdapterCVS) +---------------- + +Missing methods (should be implemented): + + QCString trAuthor(bool first_capital, bool singular) + +Obsolete methods (should be removed): + + QCString trAuthor() + QCString trAuthors() + + + +TranslatorSpanish (TranslatorAdapterCVS) +----------------- + +Missing methods (should be implemented): + + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) + QCString trAuthor(bool first_capital, bool singular) + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool ) + QCString trFiles() + QCString trVerbatimText(const char *f) + + + +TranslatorFinnish (TranslatorAdapter_1_0_0) +----------------- + +Missing methods (should be implemented): + + QCString trGotoTextualHierarchy() + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) + QCString trRTFGeneralIndex() + QCString trSources() + QCString trPage(bool first_capital, bool singular) + QCString trPackageListDescription() + QCString trFile(bool first_capital, bool singular) + QCString trPrivateTypes() + QCString trDeprecated() + QCString trNote() + QCString trAlphabeticalList() + QCString trDefinedInSourceFile() + QCString trCode() + QCString trBug() + QCString trGlobal(bool first_capital, bool singular) + QCString trInitialValue() + QCString trPackageList() + QCString trField(bool first_capital, bool singular) + QCString trDefinedAtLineInSourceFile() + QCString trGroup(bool first_capital, bool singular) + QCString trPackage(const char *name) + QCString trProtectedTypes() + QCString trTest() + QCString trConstructorDocumentation() + QCString trProtectedAttribs() + QCString trProperties() + QCString trReferencedBy() + QCString trPrecondition() + QCString trPrivateAttribs() + QCString trRemarks() + QCString trTodo() + QCString trBugList() + QCString trDCOPMethods() + QCString trStaticPublicAttribs() + QCString trMainPage() + QCString trGotoGraphicalHierarchy() + QCString trPackageDocumentation() + QCString trRTFansicp() + QCString trPostcondition() + QCString trLegend() + QCString trPageAbbreviation() + QCString trPageIndex() + QCString trNamespace(bool first_capital, bool singular) + QCString trTestList() + QCString trCollaborationDiagram(const char *clName) + QCString trPropertyDocumentation() + QCString trClass(bool first_capital, bool singular) + QCString trInvariant() + QCString trTodoList() + QCString trPublicTypes() + QCString idLanguageCharset() + QCString trAttention() + QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool single) + QCString trInterfaces() + QCString trGotoSourceCode() + QCString trRTFCharSet() + QCString latexLanguageSupportCommand() + QCString trPackages() + QCString trNamespaces() + QCString trMember(bool first_capital, bool singular) + QCString trInclDepGraph(const char *fName) + QCString trDefineValue() + QCString trStaticProtectedAttribs() + QCString trInclByDepGraph() + QCString trReturnValues() + QCString trLegendTitle() + QCString trSince() + QCString trGotoDocumentation() + QCString trPublicAttribs() + QCString trLegendDocs() + QCString trStaticPrivateAttribs() + QCString trAuthor(bool first_capital, bool singular) + QCString trGraphicalHierarchy() + QCString trClasses() + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool ) + QCString trFiles() + QCString trGeneratedFrom(const char *s,bool single) + QCString trVerbatimText(const char *f) + + + +TranslatorFrench (TranslatorAdapter_1_2_0) +---------------- + +Missing methods (should be implemented): + + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trPackageListDescription() + QCString trFile(bool first_capital, bool singular) + QCString trBug() + QCString trGlobal(bool first_capital, bool singular) + QCString trPackageList() + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trPackage(const char *name) + QCString trTest() + QCString trProperties() + QCString trBugList() + QCString trDCOPMethods() + QCString trPackageDocumentation() + QCString trRTFansicp() + QCString trNamespace(bool first_capital, bool singular) + QCString trTestList() + QCString trPropertyDocumentation() + QCString trClass(bool first_capital, bool singular) + QCString trInterfaces() + QCString trRTFCharSet() + QCString latexLanguageSupportCommand() + QCString trPackages() + QCString trMember(bool first_capital, bool singular) + QCString trDefineValue() + QCString trAuthor(bool first_capital, bool singular) + QCString trClasses() + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool ) + QCString trFiles() + QCString trIncludeFile() + QCString trVerbatimText(const char *f) + + + +TranslatorCroatian (Translator) +------------------ + +Missing methods (should be implemented): + + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) + +Obsolete methods (should be removed): + + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool ) + + + +TranslatorHungarian (TranslatorAdapter_1_2_1) +------------------- + +Missing methods (should be implemented): + + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trPackageListDescription() + QCString trFile(bool first_capital, bool singular) + QCString trBug() + QCString trGlobal(bool first_capital, bool singular) + QCString trPackageList() + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trPackage(const char *name) + QCString trProperties() + QCString trBugList() + QCString trDCOPMethods() + QCString trPackageDocumentation() + QCString trRTFansicp() + QCString trNamespace(bool first_capital, bool singular) + QCString trPropertyDocumentation() + QCString trClass(bool first_capital, bool singular) + QCString trInterfaces() + QCString trRTFCharSet() + QCString trPackages() + QCString trMember(bool first_capital, bool singular) + QCString trDefineValue() + QCString trAuthor(bool first_capital, bool singular) + QCString trClasses() + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trFiles() + QCString trVerbatimText(const char *f) + + + +TranslatorItalian (TranslatorAdapterCVS) +----------------- + +Missing methods (should be implemented): + + QCString trFile(bool first_capital, bool singular) + QCString trNamespace(bool first_capital, bool singular) + QCString trAuthor(bool first_capital, bool singular) + +Obsolete methods (should be removed): + + QCString trAuthor() + QCString trAuthors() + QCString trFile(bool first_capital, bool) + QCString trFiles() + QCString trNamespace(bool first_capital, bool) + QCString trVerbatimText(const char *f) + + + +TranslatorJapanese (TranslatorAdapter_1_2_5) +------------------ + +Missing methods (should be implemented): + + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trFile(bool first_capital, bool singular) + QCString trBug() + QCString trGlobal(bool first_capital, bool singular) + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trBugList() + QCString trRTFansicp() + QCString trNamespace(bool first_capital, bool singular) + QCString trClass(bool first_capital, bool singular) + QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool single) + QCString trRTFCharSet() + QCString latexLanguageSupportCommand() + QCString trMember(bool first_capital, bool singular) + QCString trAuthor(bool first_capital, bool singular) + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool ) + QCString trFiles() + QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool) + QCString trVerbatimText(const char *f) + + + +TranslatorKorean (TranslatorAdapter_1_1_0) +---------------- + +Missing methods (should be implemented): + + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trPackageListDescription() + QCString trFile(bool first_capital, bool singular) + QCString trPrivateTypes() + QCString trNote() + QCString trBug() + QCString trGlobal(bool first_capital, bool singular) + QCString trPackageList() + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trPackage(const char *name) + QCString trProtectedTypes() + QCString trTest() + QCString trProtectedAttribs() + QCString trProperties() + QCString trReferencedBy() + QCString trPrivateAttribs() + QCString trRemarks() + QCString trTodo() + QCString trBugList() + QCString trDCOPMethods() + QCString trStaticPublicAttribs() + QCString trPackageDocumentation() + QCString trRTFansicp() + QCString trLegend() + QCString trNamespace(bool first_capital, bool singular) + QCString trTestList() + QCString trPropertyDocumentation() + QCString trClass(bool first_capital, bool singular) + QCString trTodoList() + QCString trPublicTypes() + QCString trAttention() + QCString trInterfaces() + QCString trRTFCharSet() + QCString latexLanguageSupportCommand() + QCString trPackages() + QCString trMember(bool first_capital, bool singular) + QCString trDefineValue() + QCString trStaticProtectedAttribs() + QCString trInclByDepGraph() + QCString trLegendTitle() + QCString trSince() + QCString trPublicAttribs() + QCString trLegendDocs() + QCString trStaticPrivateAttribs() + QCString trAuthor(bool first_capital, bool singular) + QCString trClasses() + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trFiles() + QCString trVerbatimText(const char *f) + + + +TranslatorDutch (TranslatorAdapter_1_2_6) +--------------- + +Missing methods (should be implemented): + + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trFile(bool first_capital, bool singular) + QCString trGlobal(bool first_capital, bool singular) + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trRTFansicp() + QCString trNamespace(bool first_capital, bool singular) + QCString trClass(bool first_capital, bool singular) + QCString idLanguageCharset() + QCString trRTFCharSet() + QCString latexLanguageSupportCommand() + QCString trMember(bool first_capital, bool singular) + QCString trAuthor(bool first_capital, bool singular) + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trFiles() + QCString trVerbatimText(const char *f) + + + +TranslatorNorwegian (TranslatorAdapter_1_2_2) +------------------- + +Missing methods (should be implemented): + + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trPackageListDescription() + QCString trFile(bool first_capital, bool singular) + QCString trBug() + QCString trGlobal(bool first_capital, bool singular) + QCString trPackageList() + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trPackage(const char *name) + QCString trProperties() + QCString trBugList() + QCString trPackageDocumentation() + QCString trRTFansicp() + QCString trNamespace(bool first_capital, bool singular) + QCString trPropertyDocumentation() + QCString trClass(bool first_capital, bool singular) + QCString idLanguageCharset() + QCString trInterfaces() + QCString trRTFCharSet() + QCString latexLanguageSupportCommand() + QCString trPackages() + QCString trMember(bool first_capital, bool singular) + QCString trDefineValue() + QCString trAuthor(bool first_capital, bool singular) + QCString trClasses() + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool ) + QCString trFiles() + QCString trVerbatimText(const char *f) + + + +TranslatorPolish (TranslatorAdapter_1_2_1) +---------------- + +Missing methods (should be implemented): + + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trPackageListDescription() + QCString trFile(bool first_capital, bool singular) + QCString trBug() + QCString trGlobal(bool first_capital, bool singular) + QCString trPackageList() + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trPackage(const char *name) + QCString trProperties() + QCString trBugList() + QCString trDCOPMethods() + QCString trPackageDocumentation() + QCString trRTFansicp() + QCString trNamespace(bool first_capital, bool singular) + QCString trPropertyDocumentation() + QCString trClass(bool first_capital, bool singular) + QCString idLanguageCharset() + QCString trInterfaces() + QCString trRTFCharSet() + QCString trPackages() + QCString trMember(bool first_capital, bool singular) + QCString trDefineValue() + QCString trAuthor(bool first_capital, bool singular) + QCString trClasses() + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trFiles() + QCString trVerbatimText(const char *f) + + + +TranslatorPortuguese (TranslatorAdapter_1_1_5) +-------------------- + +Missing methods (should be implemented): + + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trPackageListDescription() + QCString trFile(bool first_capital, bool singular) + QCString trBug() + QCString trGlobal(bool first_capital, bool singular) + QCString trPackageList() + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trPackage(const char *name) + QCString trTest() + QCString trProperties() + QCString trBugList() + QCString trDCOPMethods() + QCString trPackageDocumentation() + QCString trRTFansicp() + QCString trLegend() + QCString trNamespace(bool first_capital, bool singular) + QCString trTestList() + QCString trPropertyDocumentation() + QCString trClass(bool first_capital, bool singular) + QCString idLanguageCharset() + QCString trInterfaces() + QCString trRTFCharSet() + QCString latexLanguageSupportCommand() + QCString trPackages() + QCString trMember(bool first_capital, bool singular) + QCString trDefineValue() + QCString trLegendTitle() + QCString trLegendDocs() + QCString trAuthor(bool first_capital, bool singular) + QCString trClasses() + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trFiles() + QCString trIncludeFile() + QCString trVerbatimText(const char *f) + + + +TranslatorRomanian (TranslatorAdapter_1_2_1) +------------------ + +Missing methods (should be implemented): + + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trPackageListDescription() + QCString trFile(bool first_capital, bool singular) + QCString trBug() + QCString trGlobal(bool first_capital, bool singular) + QCString trPackageList() + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trPackage(const char *name) + QCString trProperties() + QCString trBugList() + QCString trDCOPMethods() + QCString trPackageDocumentation() + QCString trRTFansicp() + QCString trNamespace(bool first_capital, bool singular) + QCString trPropertyDocumentation() + QCString trClass(bool first_capital, bool singular) + QCString trInterfaces() + QCString trRTFCharSet() + QCString trPackages() + QCString trMember(bool first_capital, bool singular) + QCString trDefineValue() + QCString trAuthor(bool first_capital, bool singular) + QCString trClasses() + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trFiles() + QCString trVerbatimText(const char *f) + + + +TranslatorSwedish (TranslatorAdapter_1_0_0) +----------------- + +Missing methods (should be implemented): + + QCString trGotoTextualHierarchy() + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trPackageListDescription() + QCString trFile(bool first_capital, bool singular) + QCString trPrivateTypes() + QCString trDeprecated() + QCString trNote() + QCString trCode() + QCString trBug() + QCString trGlobal(bool first_capital, bool singular) + QCString trInitialValue() + QCString trPackageList() + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trPackage(const char *name) + QCString trProtectedTypes() + QCString trTest() + QCString trConstructorDocumentation() + QCString trProtectedAttribs() + QCString trProperties() + QCString trReferencedBy() + QCString trPrecondition() + QCString trPrivateAttribs() + QCString trRemarks() + QCString trTodo() + QCString trBugList() + QCString trDCOPMethods() + QCString trStaticPublicAttribs() + QCString trGotoGraphicalHierarchy() + QCString trPackageDocumentation() + QCString trRTFansicp() + QCString trPostcondition() + QCString trLegend() + QCString trPageIndex() + QCString trNamespace(bool first_capital, bool singular) + QCString trTestList() + QCString trCollaborationDiagram(const char *clName) + QCString trPropertyDocumentation() + QCString trClass(bool first_capital, bool singular) + QCString trInvariant() + QCString trTodoList() + QCString trPublicTypes() + QCString idLanguageCharset() + QCString trAttention() + QCString trInterfaces() + QCString trGotoSourceCode() + QCString trRTFCharSet() + QCString latexLanguageSupportCommand() + QCString trPackages() + QCString trMember(bool first_capital, bool singular) + QCString trInclDepGraph(const char *fName) + QCString trDefineValue() + QCString trStaticProtectedAttribs() + QCString trInclByDepGraph() + QCString trLegendTitle() + QCString trSince() + QCString trGotoDocumentation() + QCString trPublicAttribs() + QCString trLegendDocs() + QCString trStaticPrivateAttribs() + QCString trAuthor(bool first_capital, bool singular) + QCString trGraphicalHierarchy() + QCString trClasses() + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool ) + QCString trFiles() + QCString trVerbatimText(const char *f) + + + +TranslatorSlovene (TranslatorAdapter_1_1_5) +----------------- + +Missing methods (should be implemented): + + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) + QCString trRTFGeneralIndex() + QCString trPage(bool first_capital, bool singular) + QCString trPackageListDescription() + QCString trFile(bool first_capital, bool singular) + QCString trBug() + QCString trGlobal(bool first_capital, bool singular) + QCString trPackageList() + QCString trField(bool first_capital, bool singular) + QCString trGroup(bool first_capital, bool singular) + QCString trPackage(const char *name) + QCString trTest() + QCString trProperties() + QCString trBugList() + QCString trDCOPMethods() + QCString trPackageDocumentation() + QCString trRTFansicp() + QCString trLegend() + QCString trNamespace(bool first_capital, bool singular) + QCString trTestList() + QCString trPropertyDocumentation() + QCString trClass(bool first_capital, bool singular) + QCString trInterfaces() + QCString trRTFCharSet() + QCString trPackages() + QCString trMember(bool first_capital, bool singular) + QCString trDefineValue() + QCString trLegendTitle() + QCString trLegendDocs() + QCString trAuthor(bool first_capital, bool singular) + QCString trClasses() + +Obsolete methods (should be removed): + + QCString latexBabelPackage() + QCString trAuthor() + QCString trAuthors() + QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool ) + QCString trFiles() + QCString trVerbatimText(const char *f) + + + +TranslatorSlovak (TranslatorAdapterCVS) +---------------- + +Missing methods (should be implemented): + + QCString trAuthor(bool first_capital, bool singular) + +Obsolete methods (should be removed): + + QCString trAuthor() + QCString trAuthors() + QCString trFiles() + diff --git a/examples/example.tag b/examples/example.tag index b4eaef9..84ef9ed 100644 --- a/examples/example.tag +++ b/examples/example.tag @@ -3,6 +3,7 @@ Test class_test.html + void example a0 () diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index 34789a5..b0df409 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,5 +1,5 @@ Name: doxygen -Version: 1.2.8_20010715 +Version: 1.2.8_20010723 Summary: documentation system for C, C++ and IDL Release: 3 Source: doxygen-%{version}.src.tar.gz diff --git a/src/classdef.cpp b/src/classdef.cpp index f7c0550..6dbc086 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -127,15 +127,11 @@ QCString ClassDef::displayName() const QCString n; if (Config_getBool("HIDE_SCOPE_NAMES")) { - n=stripScope(name()); + n=localName(); } else { - n=name(); - } - if (m_tempArgs) - { - n+=tempArgListToString(m_tempArgs); + n=qualifiedNameWithTemplateParameters(); } return n; } @@ -603,32 +599,70 @@ ArgumentList *ClassDef::outerTemplateArguments() const return 0; } +static void searchTemplateSpecs(/*in*/ Definition *d, + /*out*/ QList &result, + /*out*/ QCString &name) +{ + if (d->definitionType()==Definition::TypeClass) + { + if (d->getOuterScope()) + { + searchTemplateSpecs(d->getOuterScope(),result,name); + } + ClassDef *cd=(ClassDef *)d; + if (!name.isEmpty()) name+="::"; + name+=d->localName(); + bool isSpecialization = d->localName().find('<')!=-1; + if (cd->templateArguments()) + { + result.append(cd->templateArguments()); + if (!isSpecialization) + { + name+=tempArgListToString(cd->templateArguments()); + } + } + } + else + { + name+=d->qualifiedName(); + } +} -static void writeTemplateSpec(OutputList &ol,ArgumentList *al, - const QCString &pageType,const QCString &name) +static void writeTemplateSpec(OutputList &ol,Definition *d, + const QCString &type) { - if (al) // class is a template + QList specs; + QCString name; + searchTemplateSpecs(d,specs,name); + if (specs.count()>0) // class has template scope specifiers { ol.startSubsubsection(); - ol.docify("template<"); - Argument *a=al->first(); - while (a) + QListIterator spi(specs); + ArgumentList *al; + for (spi.toFirst();(al=spi.current());++spi) { - ol.docify(a->type); - if (!a->name.isEmpty()) + ol.docify("template<"); + Argument *a=al->first(); + while (a) { - ol.docify(" "); - ol.docify(a->name); + ol.docify(a->type); + if (!a->name.isEmpty()) + { + ol.docify(" "); + ol.docify(a->name); + } + if (a->defval.length()!=0) + { + ol.docify(" = "); + ol.docify(a->defval); + } + a=al->next(); + if (a) ol.docify(", "); } - if (a->defval.length()!=0) - { - ol.docify(" = "); - ol.docify(a->defval); - } - a=al->next(); - if (a) ol.docify(", "); + ol.docify(">"); + ol.lineBreak(); } - ol.docify("> "+pageType.lower()+" "+name); + ol.docify(type.lower()+" "+name); ol.endSubsubsection(); ol.writeString("\n"); } @@ -735,7 +769,7 @@ void ClassDef::writeDocumentation(OutputList &ol) if (Config_getBool("CLASS_DIAGRAMS")) ol.disableAllBut(OutputGenerator::Man); - // write subclasses + // write super classes int count; if ((count=m_inherits->count())>0) { @@ -1005,7 +1039,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ol.endGroupHeader(); ol.startTextBlock(); - writeTemplateSpec(ol,outerTempArgList,pageType,name()); + writeTemplateSpec(ol,this,pageType); // repeat brief description if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) @@ -1046,8 +1080,10 @@ void ClassDef::writeDocumentation(OutputList &ol) } else { - writeTemplateSpec(ol,outerTempArgList,pageType,name()); + writeTemplateSpec(ol,this,pageType); } + + typedefMembers.writeDocumentation(ol,name(),this, theTranslator->trMemberTypedefDocumentation()); @@ -1140,6 +1176,20 @@ void ClassDef::writeDocumentation(OutputList &ol) } endFile(ol); + + + // write inner classes after the parent, so the tag files contain + // the definition in proper order! + if (m_innerClasses) + { + ClassSDict::Iterator cli(*m_innerClasses); + ClassDef *innerCd; + for (cli.toFirst();(innerCd=cli.current());++cli) + { + msg("Generating docs for nested compound %s...\n",innerCd->name().data()); + innerCd->writeDocumentation(ol); + } + } } // write the list of all (inherited) members for this class @@ -2062,6 +2112,7 @@ ClassDef *ClassDef::insertTemplateInstance(const QCString &fileName, //templateClass->setBriefDescription(briefDescription()); //templateClass->setDocumentation(documentation()); templateClass->setTemplateMaster(this); + templateClass->setOuterScope(getOuterScope()); m_templateInstances->insert(templSpec,templateClass); freshInstance=TRUE; } @@ -2149,3 +2200,64 @@ QCString ClassDef::getReference() const } } +void ClassDef::getTemplateParameterLists(QList &lists) const +{ + Definition *d=getOuterScope(); + if (d) + { + if (d->definitionType()==Definition::TypeClass) + { + ClassDef *cd=(ClassDef *)d; + cd->getTemplateParameterLists(lists); + } + } + if (templateArguments()) + { + lists.append(templateArguments()); + } +} + +QCString ClassDef::qualifiedNameWithTemplateParameters( + QList *actualParams) const +{ + QCString scName; + Definition *d=getOuterScope(); + if (d) + { + if (d->definitionType()==Definition::TypeClass) + { + ClassDef *cd=(ClassDef *)d; + scName = cd->qualifiedNameWithTemplateParameters(actualParams); + } + else + { + scName = d->qualifiedName(); + } + } + if (!scName.isEmpty()) scName+="::"; + scName+=localName(); + ArgumentList *al=0; + bool isSpecialization = localName().find('<')!=-1; + if (templateArguments()) + { + if (actualParams && (al=actualParams->current())) + { + if (!isSpecialization) + { + scName+=tempArgListToString(al); + } + actualParams->next(); + } + else + { + if (!isSpecialization) + { + scName+=tempArgListToString(templateArguments()); + } + } + } + //printf("scope=%s qualifiedName=%s\n",name().data(),scName.data()); + return scName; +} + + diff --git a/src/classdef.h b/src/classdef.h index 323b7bd..e662152 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -184,6 +184,16 @@ class ClassDef : public Definition */ virtual Definition *findInnerCompound(const char *name); + /*! Returns the template parameter lists that form the template + * declaration of this class. + * + * Example: template class TC {}; + * will return a list with one ArgumentList containing one argument + * with type="class" and name="T". + */ + void getTemplateParameterLists(QList &lists) const; + QCString qualifiedNameWithTemplateParameters( + QList *actualParams=0) const; /* member lists by protection */ MemberList pubMembers; diff --git a/src/config.h b/src/config.h index 02a3389..4b00d22 100644 --- a/src/config.h +++ b/src/config.h @@ -307,6 +307,7 @@ class ConfigBool : public ConfigOption QCString m_valueString; }; +// some convenience macros #define Config_getString(val) Config::instance()->getString(__FILE__,__LINE__,val) #define Config_getInt(val) Config::instance()->getInt(__FILE__,__LINE__,val) #define Config_getList(val) Config::instance()->getList(__FILE__,__LINE__,val) @@ -319,6 +320,10 @@ class ConfigBool : public ConfigOption * read from a user-supplied configuration file. * The static member instance() can be used to get * a pointer to the one and only instance. + * + * Set all variables to their default values by + * calling Config::instance()->init() + * */ class Config { @@ -479,11 +484,34 @@ class Config // internal API ///////////////////////////// + /*! Converts the string values read from the configuration file + * to real values for non-string type options (like int, and bools) + */ void convertStrToVal(); + + /*! Replaces references to environment variable by the actual value + * of the environment variable. + */ void substituteEnvironmentVars(); + + /*! Checks if the values of the variable are correct, adjusts them + * if needed, and report any errors. + */ void check(); + + /*! Initialize config variables to their default value */ void init(); - void parse(const QCString &config,const char *fn); + + /*! Parse a configuration file with name \a fn. + * \returns TRUE if successful, FALSE if the file could not be + * opened or read. + */ + bool parse(const char *fn); + + /*! Called from the constructor, will add doxygen's default options + * to the configuration object + */ + void create(); protected: Config() { @@ -498,7 +526,6 @@ class Config delete m_options; delete m_dict; } - void create(); private: QList *m_options; diff --git a/src/config.l b/src/config.l index 9ffdf55..583195c 100644 --- a/src/config.l +++ b/src/config.l @@ -22,6 +22,7 @@ //#include #include #include +#include #include #include @@ -31,33 +32,34 @@ #include "config.h" #include "version.h" + +#undef Config_getString +#undef Config_getInt +#undef Config_getList +#undef Config_getEnum +#undef Config_getBool + +// use in-class definitions +#define Config_getString(val) getString(__FILE__,__LINE__,val) +#define Config_getInt(val) getInt(__FILE__,__LINE__,val) +#define Config_getList(val) getList(__FILE__,__LINE__,val) +#define Config_getEnum(val) getEnum(__FILE__,__LINE__,val) +#define Config_getBool(val) getBool(__FILE__,__LINE__,val) -#ifdef DOXYWIZARD -#include -void err(const char *fmt, ...) +void config_err(const char *fmt, ...) { va_list args; va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); } -void warn_cont(const char *fmt, ...) +void config_warn(const char *fmt, ...) { va_list args; va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); } -void initWarningFormat() -{ -} -#else -#include "doxygen.h" -#include "message.h" -#include "pre.h" -#include "version.h" -#include "language.h" -#endif #define MAX_INCLUDE_DEPTH 10 #define YY_NEVER_INTERACTIVE 1 @@ -142,7 +144,7 @@ void ConfigInt::convertStrToVal() int val = m_valueString.toInt(&ok); if (!ok || valm_maxVal) { - warn_cont("Warning: argument `%s' for option %s is not a valid number in the range [%d..%d]!\n" + config_warn("Warning: argument `%s' for option %s is not a valid number in the range [%d..%d]!\n" "Using the default: %d!\n",m_valueString.data(),m_name.data(),m_minVal,m_maxVal,m_value); } m_value=val; @@ -164,7 +166,7 @@ void ConfigBool::convertStrToVal() } else { - warn_cont("Warning: argument `%s' for option %s is not a valid boolean value\n" + config_warn("Warning: argument `%s' for option %s is not a valid boolean value\n" "Using the default: %s!\n",m_valueString.data(),m_name.data(),m_value?"YES":"NO"); } } @@ -175,12 +177,12 @@ QCString &Config::getString(const char *fileName,int num,const char *name) const ConfigOption *opt = m_dict->find(name); if (opt==0) { - err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); exit(1); } else if (opt->kind()!=ConfigOption::O_String) { - err("%s<%d>: Internal error: Requested option %s not of string type!\n",fileName,num,name); + config_err("%s<%d>: Internal error: Requested option %s not of string type!\n",fileName,num,name); exit(1); } return *((ConfigString *)opt)->valueRef(); @@ -191,12 +193,12 @@ QStrList &Config::getList(const char *fileName,int num,const char *name) const ConfigOption *opt = m_dict->find(name); if (opt==0) { - err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); exit(1); } else if (opt->kind()!=ConfigOption::O_List) { - err("%d<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name); + config_err("%d<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name); exit(1); } return *((ConfigList *)opt)->valueRef(); @@ -207,12 +209,12 @@ QCString &Config::getEnum(const char *fileName,int num,const char *name) const ConfigOption *opt = m_dict->find(name); if (opt==0) { - err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); exit(1); } else if (opt->kind()!=ConfigOption::O_Enum) { - err("%s<%d>: Internal error: Requested option %s not of enum type!\n",fileName,num,name); + config_err("%s<%d>: Internal error: Requested option %s not of enum type!\n",fileName,num,name); exit(1); } return *((ConfigEnum *)opt)->valueRef(); @@ -223,12 +225,12 @@ int &Config::getInt(const char *fileName,int num,const char *name) const ConfigOption *opt = m_dict->find(name); if (opt==0) { - err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); exit(1); } else if (opt->kind()!=ConfigOption::O_Int) { - err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name); + config_err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name); exit(1); } return *((ConfigInt *)opt)->valueRef(); @@ -239,12 +241,12 @@ bool &Config::getBool(const char *fileName,int num,const char *name) const ConfigOption *opt = m_dict->find(name); if (opt==0) { - err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); exit(1); } else if (opt->kind()!=ConfigOption::O_Bool) { - err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name); + config_err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name); exit(1); } return *((ConfigBool *)opt)->valueRef(); @@ -322,7 +324,7 @@ static FILE *tryPath(const char *path,const char *fileName) if (fi.exists() && fi.isFile()) { FILE *f=fopen(absName,"r"); - if (!f) err("Error: could not open file %s for reading\n",absName.data()); + if (!f) config_err("Error: could not open file %s for reading\n",absName.data()); return f; } return 0; @@ -348,7 +350,7 @@ static FILE *findFile(const char *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", + config_err("Error: maximum include depth (%d) reached, %s is not included. Aborting...\n", MAX_INCLUDE_DEPTH,incName); exit(1); } @@ -389,7 +391,7 @@ static void readIncludeFile(const char *incName) } else { - err("Error: @INCLUDE = %s: not found!\n",inc.data()); + config_err("Error: @INCLUDE = %s: not found!\n",inc.data()); exit(1); } } @@ -418,7 +420,7 @@ static void readIncludeFile(const char *incName) ConfigOption *option = config->get(cmd); if (option==0) // oops not known { - err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", + config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", yytext,yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); } @@ -464,7 +466,7 @@ static void readIncludeFile(const char *incName) ConfigOption *option = config->get(cmd); if (option==0) // oops not known { - err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", + config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", yytext,yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); } @@ -485,7 +487,7 @@ static void readIncludeFile(const char *incName) case ConfigOption::O_String: case ConfigOption::O_Int: case ConfigOption::O_Bool: - err("Warning: operator += not supported for `%s'. Ignoring line at line %d, file %s\n", + config_err("Warning: operator += not supported for `%s'. Ignoring line at line %d, file %s\n", yytext,yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); break; @@ -521,7 +523,7 @@ static void readIncludeFile(const char *incName) } } -[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); } +[a-z_A-Z0-9]+ { config_err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); } \n { yyLineNr++; BEGIN(Start); } \n { yyLineNr++; @@ -553,7 +555,7 @@ static void readIncludeFile(const char *incName) elemStr+=tmpString; if (*yytext=='\n') { - err("Warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data()); + config_err("Warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data()); yyLineNr++; } BEGIN(lastState); @@ -572,7 +574,7 @@ static void readIncludeFile(const char *incName) else { *b=FALSE; - warn_cont("Warning: Invalid value `%s' for " + config_warn("Warning: Invalid value `%s' for " "boolean tag in line %d, file %s; use YES or NO\n", bs.data(),yyLineNr,yyFileName.data()); } @@ -639,11 +641,7 @@ static void writeStringList(QTextStream &t,QStrList &l) void Config::writeTemplate(QFile *f,bool sl,bool upd) { QTextStream t(f); -#ifdef DOXYWIZARD - t << "# Doxygen configuration generated by Doxywizard version " << versionString << endl; -#else t << "# Doxyfile " << versionString << endl << endl; -#endif if (!sl) { t << "# This file describes the settings to be used by the documentation system\n"; @@ -814,7 +812,7 @@ void Config::check() // projectName[0]=toupper(projectName[0]); //} - QCString &warnFormat = getString(__FILE__,__LINE__,"WARN_FORMAT"); + QCString &warnFormat = Config_getString("WARN_FORMAT"); if (warnFormat.isEmpty()) { warnFormat="$file:$line $text"; @@ -823,23 +821,22 @@ void Config::check() { if (warnFormat.find("$file")==-1) { - err("Error: warning format does not contain a $file tag!\n"); + config_err("Error: warning format does not contain a $file tag!\n"); exit(1); } if (warnFormat.find("$line")==-1) { - err("Error: warning format does not contain a $line tag!\n"); + config_err("Error: warning format does not contain a $line tag!\n"); exit(1); } if (warnFormat.find("$text")==-1) { - err("Error: wanring format foes not contain a $text tag!\n"); + config_err("Error: wanring format foes not contain a $text tag!\n"); exit(1); } } - initWarningFormat(); - QCString &manExtension = getString(__FILE__,__LINE__,"MAN_EXTENSION"); + QCString &manExtension = Config_getString("MAN_EXTENSION"); // set default man page extension if non is given by the user if (manExtension.isEmpty()) @@ -847,7 +844,7 @@ void Config::check() manExtension=".3"; } - QCString &paperType = getEnum(__FILE__,__LINE__,"PAPER_TYPE"); + QCString &paperType = Config_getEnum("PAPER_TYPE"); paperType=paperType.lower().stripWhiteSpace(); if (paperType.isEmpty()) { @@ -856,31 +853,18 @@ void Config::check() if (paperType!="a4" && paperType!="a4wide" && paperType!="letter" && paperType!="legal" && paperType!="executive") { - err("Error: Unknown page type specified"); + config_err("Error: Unknown page type specified"); } - QCString &outputLanguage=getEnum(__FILE__,__LINE__,"OUTPUT_LANGUAGE"); + QCString &outputLanguage=Config_getEnum("OUTPUT_LANGUAGE"); outputLanguage=outputLanguage.stripWhiteSpace(); if (outputLanguage.isEmpty()) { outputLanguage = "English"; -#ifndef DOXYWIZARD - setTranslator("English"); -#endif - } - else - { -#ifndef DOXYWIZARD - if (!setTranslator(outputLanguage)) - { - err("Error: Output language %s not supported! Using English instead.\n", - outputLanguage.data()); - } -#endif } // expand the relative stripFromPath values - QStrList &stripFromPath = getList(__FILE__,__LINE__,"STRIP_FROM_PATH"); + QStrList &stripFromPath = Config_getList("STRIP_FROM_PATH"); char *sfp = stripFromPath.first(); while (sfp) { @@ -903,57 +887,54 @@ void Config::check() // Test to see if HTML header is valid - QCString &headerFile = getString(__FILE__,__LINE__,"HTML_HEADER"); + QCString &headerFile = Config_getString("HTML_HEADER"); if (!headerFile.isEmpty()) { QFileInfo fi(headerFile); if (!fi.exists()) { - err("Error: tag HTML_HEADER: header file `%s' " + config_err("Error: tag HTML_HEADER: header file `%s' " "does not exist\n",headerFile.data()); exit(1); } } // Test to see if HTML footer is valid - QCString &footerFile = getString(__FILE__,__LINE__,"HTML_FOOTER"); + QCString &footerFile = Config_getString("HTML_FOOTER"); if (!footerFile.isEmpty()) { QFileInfo fi(footerFile); if (!fi.exists()) { - err("Error: tag HTML_FOOTER: footer file `%s' " + config_err("Error: tag HTML_FOOTER: footer file `%s' " "does not exist\n",footerFile.data()); exit(1); } } // Test to see if LaTeX header is valid - QCString &latexHeaderFile = getString(__FILE__,__LINE__,"LATEX_HEADER"); + QCString &latexHeaderFile = Config_getString("LATEX_HEADER"); if (!latexHeaderFile.isEmpty()) { QFileInfo fi(latexHeaderFile); if (!fi.exists()) { - err("Error: tag LATEX_HEADER: header file `%s' " + config_err("Error: tag LATEX_HEADER: header file `%s' " "does not exist\n",latexHeaderFile.data()); exit(1); } } // check include path - QStrList &includePath = getList(__FILE__,__LINE__,"INCLUDE_PATH"); + QStrList &includePath = Config_getList("INCLUDE_PATH"); char *s=includePath.first(); while (s) { QFileInfo fi(s); - if (!fi.exists()) err("Warning: tag INCLUDE_PATH: include path `%s' " + if (!fi.exists()) config_err("Warning: tag INCLUDE_PATH: include path `%s' " "does not exist\n",s); -#ifndef DOXYWIZARD - addSearchDir(fi.absFilePath()); -#endif s=includePath.next(); } // check aliases - QStrList &aliasList = getList(__FILE__,__LINE__,"ALIASES"); + QStrList &aliasList = Config_getList("ALIASES"); s=aliasList.first(); while (s) { @@ -962,13 +943,13 @@ void Config::check() alias=alias.stripWhiteSpace(); if (alias.find(re)!=0) { - err("Illegal alias format `%s'. Use \"name=value\"\n",alias.data()); + config_err("Illegal alias format `%s'. Use \"name=value\"\n",alias.data()); } s=aliasList.next(); } // check dot path - QCString &dotPath = getString(__FILE__,__LINE__,"DOT_PATH"); + QCString &dotPath = Config_getString("DOT_PATH"); if (!dotPath.isEmpty()) { if (dotPath.find('\\')!=-1) @@ -992,7 +973,7 @@ void Config::check() #endif if (!dp.exists() || !dp.isFile()) { - err("Warning: the dot tool could not be found at %s\n",dotPath.data()); + config_err("Warning: the dot tool could not be found at %s\n",dotPath.data()); dotPath=""; } else @@ -1010,10 +991,10 @@ void Config::check() } // check input - QStrList &inputSources=getList(__FILE__,__LINE__,"INPUT"); + QStrList &inputSources=Config_getList("INPUT"); if (inputSources.count()==0) { - err("Error: tag INPUT: no input files specified after the INPUT tag.\n"); + config_err("Error: tag INPUT: no input files specified after the INPUT tag.\n"); exit(1); } else @@ -1024,7 +1005,7 @@ void Config::check() QFileInfo fi(s); if (!fi.exists()) { - err("Error: tag INPUT: input source `%s' does not exist\n",s); + config_err("Error: tag INPUT: input source `%s' does not exist\n",s); exit(1); } s=inputSources.next(); @@ -1032,94 +1013,94 @@ void Config::check() } // add default pattern if needed - QStrList &filePatternList = getList(__FILE__,__LINE__,"FILE_PATTERNS"); + QStrList &filePatternList = Config_getList("FILE_PATTERNS"); if (filePatternList.isEmpty()) { filePatternList.append("*"); } // add default pattern if needed - QStrList &examplePatternList = getList(__FILE__,__LINE__,"EXAMPLE_PATTERNS"); + QStrList &examplePatternList = Config_getList("EXAMPLE_PATTERNS"); if (examplePatternList.isEmpty()) { examplePatternList.append("*"); } // add default pattern if needed - //QStrList &imagePatternList = getList(__FILE__,__LINE__,"IMAGE_PATTERNS"); + //QStrList &imagePatternList = Config_getList("IMAGE_PATTERNS"); //if (imagePatternList.isEmpty()) //{ // imagePatternList.append("*"); //} // more checks needed if and only if the search engine is enabled. - if (getBool(__FILE__,__LINE__,"SEARCHENGINE")) + if (Config_getBool("SEARCHENGINE")) { // check cgi name - QCString &cgiName = getString(__FILE__,__LINE__,"CGI_NAME"); + QCString &cgiName = Config_getString("CGI_NAME"); if (cgiName.isEmpty()) { - err("Error: tag CGI_NAME: no cgi script name after the CGI_NAME tag.\n"); + config_err("Error: tag CGI_NAME: no cgi script name after the CGI_NAME tag.\n"); exit(1); } // check cgi URL - QCString &cgiURL = getString(__FILE__,__LINE__,"CGI_URL"); + QCString &cgiURL = Config_getString("CGI_URL"); if (cgiURL.isEmpty()) { - err("Error: tag CGI_URL: no URL to cgi directory specified.\n"); + config_err("Error: tag CGI_URL: no URL to cgi directory specified.\n"); exit(1); } else if (cgiURL.left(7)!="http://" && cgiURL.left(8)!="https://" ) { - err("Error: tag CGI_URL: URL to cgi directory is invalid (must " + config_err("Error: tag CGI_URL: URL to cgi directory is invalid (must " "start with http:// or https://).\n"); exit(1); } // check documentation URL - QCString &docURL = getString(__FILE__,__LINE__,"DOC_URL"); + QCString &docURL = Config_getString("DOC_URL"); if (docURL.isEmpty()) { - docURL = getString(__FILE__,__LINE__,"OUTPUT_DIRECTORY").copy().prepend("file://").append("html"); + docURL = Config_getString("OUTPUT_DIRECTORY").copy().prepend("file://").append("html"); } else if (docURL.left(7)!="http://" && docURL.left(8)!="https://" && docURL.left(7)!="file://" ) { - err("Error: tag DOC_URL: URL to documentation is invalid or " + config_err("Error: tag DOC_URL: URL to documentation is invalid or " "not absolute.\n"); exit(1); } // check absolute documentation path - QCString &docAbsPath = getString(__FILE__,__LINE__,"DOC_ABSPATH"); + QCString &docAbsPath = Config_getString("DOC_ABSPATH"); if (docAbsPath.isEmpty()) { - docAbsPath = getString(__FILE__,__LINE__,"OUTPUT_DIRECTORY")+"/html"; + docAbsPath = Config_getString("OUTPUT_DIRECTORY")+"/html"; } else if (docAbsPath[0]!='/' && docAbsPath[1]!=':') { - err("Error: tag DOC_ABSPATH: path is not absolute!\n"); + config_err("Error: tag DOC_ABSPATH: path is not absolute!\n"); exit(1); } // check path to doxysearch - QCString &binAbsPath = getString(__FILE__,__LINE__,"BIN_ABSPATH"); + QCString &binAbsPath = Config_getString("BIN_ABSPATH"); if (binAbsPath.isEmpty()) { - err("Error: tag BIN_ABSPATH: no absolute path to doxysearch " + config_err("Error: tag BIN_ABSPATH: no absolute path to doxysearch " "specified.\n"); exit(1); } else if (binAbsPath[0]!='/' && binAbsPath[1]!=':') { - err("Error: tag BIN_ABSPATH: path is not absolute!\n"); + config_err("Error: tag BIN_ABSPATH: path is not absolute!\n"); exit(1); } // check perl path bool found=FALSE; - QCString &perlPath = getString(__FILE__,__LINE__,"PERL_PATH"); + QCString &perlPath = Config_getString("PERL_PATH"); if (perlPath.isEmpty()) { QFileInfo fi; @@ -1144,7 +1125,7 @@ void Config::check() QFileInfo fi(perlPath); if (!fi.exists()) { - warn_cont("Warning: tag PERL_PATH: perl interpreter not found at default or" + config_warn("Warning: tag PERL_PATH: perl interpreter not found at default or" "user specified (%s) location\n", perlPath.data()); } @@ -1152,12 +1133,12 @@ void Config::check() } #undef PUTENV -#if defined(_WIN32) && !defined(__GNUC__) +#if defined(_WIN32) && !defined(__GNUC__) && (__BORLANDC__ < 0x0550) #define PUTENV _putenv #else #define PUTENV putenv #endif - if (getBool(__FILE__,__LINE__,"HAVE_DOT")) PUTENV("DOTFONTPATH=."); + if (Config_getBool("HAVE_DOT")) PUTENV("DOTFONTPATH=."); } @@ -1241,6 +1222,7 @@ void Config::create() ce->addValue("Slovene"); ce->addValue("Spanish"); ce->addValue("Swedish"); + ce->addValue("Ukrainian"); cb = addBool( "EXTRACT_ALL", "If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in \n" @@ -1919,17 +1901,17 @@ void Config::create() ); cb->addDependency("GENERATE_MAN"); //----------------------------------------------------------------------------------------------- - //addInfo( "XML","configuration options related to the XML output"); + addInfo( "XML","configuration options related to the XML output"); //----------------------------------------------------------------------------------------------- - //addBool( "generateXML", - // "GENERATE_XML", - // "FALSE", - // "generate XML output", - // "If the GENERATE_XML tag is set to YES Doxygen will \n" - // "generate an XML file that captures the structure of \n" - // "the code including all documentation. Warning: This feature \n" - // "is still experimental and very incomplete.\n" - // ); + cb = addBool( + "GENERATE_XML", + "If the GENERATE_XML tag is set to YES Doxygen will \n" + "generate an XML file that captures the structure of \n" + "the code including all documentation. Note that this \n" + "feature is still experimental and incomplete at the \n" + "moment. \n", + FALSE + ); //----------------------------------------------------------------------------------------------- addInfo( "Preprocessor","Configuration options related to the preprocessor "); //----------------------------------------------------------------------------------------------- @@ -2184,10 +2166,29 @@ void Config::create() } -void Config::parse(const QCString &s,const char *fn) +bool Config::parse(const char *fn) { + QFileInfo fi( fn ); + if (!fi.exists()) + { + return FALSE; + } + QFile f( fn ); + if (!f.open(IO_ReadOnly)) + { + return FALSE; + } + // read file into a string buffer + int fsize = fi.size(); + QCString contents(fsize+1); // add room for \0 terminator + if (f.readBlock(contents.data(),fsize)!=fsize) + { + return FALSE; + } + contents[fsize]='\0'; + config = Config::instance(); - inputString = s; + inputString = contents.data(); inputPosition = 0; yyLineNr = 1; yyFileName=fn; @@ -2197,6 +2198,8 @@ void Config::parse(const QCString &s,const char *fn) configYYrestart( configYYin ); BEGIN( Start ); configYYlex(); + inputString = 0; + return TRUE; } //extern "C" { // some bogus code to keep the compiler happy diff --git a/src/declinfo.l b/src/declinfo.l index 18e39d8..5548b56 100644 --- a/src/declinfo.l +++ b/src/declinfo.l @@ -27,6 +27,7 @@ #include "declinfo.h" #include "util.h" +#include "message.h" #define YY_NO_UNPUT @@ -157,6 +158,8 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+) sharpCount=0; BEGIN(Template); } +