diff options
77 files changed, 3880 insertions, 1373 deletions
@@ -1,22 +1,22 @@ -# Doxyfile 1.5.9 +# Doxyfile 1.6.3 #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = Doxygen -PROJECT_NUMBER = +PROJECT_NUMBER = OUTPUT_DIRECTORY = doxygen_docs CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = YES -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES QT_AUTOBRIEF = NO @@ -24,12 +24,12 @@ MULTILINE_CPP_IS_BRIEF = NO INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 8 -ALIASES = +ALIASES = OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO -EXTENSION_MAPPING = +EXTENSION_MAPPING = BUILTIN_STL_SUPPORT = NO CPP_CLI_SUPPORT = NO SIP_SUPPORT = NO @@ -55,6 +55,7 @@ INTERNAL_DOCS = NO CASE_SENSE_NAMES = NO HIDE_SCOPE_NAMES = NO SHOW_INCLUDE_FILES = YES +FORCE_LOCAL_INCLUDES = NO INLINE_INFO = YES SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO @@ -65,13 +66,14 @@ GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = +ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES SHOW_DIRECTORIES = YES SHOW_FILES = YES SHOW_NAMESPACES = YES -FILE_VERSION_FILTER = -LAYOUT_FILE = +FILE_VERSION_FILTER = +LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- @@ -81,7 +83,7 @@ WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO WARN_FORMAT = "$file:$line: $text " -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- @@ -115,14 +117,14 @@ EXCLUDE = src/code.cpp \ src/vhdlscanner.cpp \ src/vhdlcode.cpp EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing @@ -140,54 +142,64 @@ VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = YES COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES -HTML_OUTPUT = +HTML_OUTPUT = HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = YES HTML_ALIGN_MEMBERS = YES HTML_DYNAMIC_SECTIONS = YES GENERATE_DOCSET = YES DOCSET_FEEDNAME = "Doxygen docs" DOCSET_BUNDLE_ID = org.doxygen.Doxygen +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher GENERATE_HTMLHELP = YES -CHM_FILE = -HHC_LOCATION = +CHM_FILE = +HHC_LOCATION = GENERATE_CHI = NO -CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING = BINARY_TOC = NO TOC_EXPAND = NO GENERATE_QHP = NO -QCH_FILE = +QCH_FILE = QHP_NAMESPACE = org.doxygen.Project QHP_VIRTUAL_FOLDER = doc -QHP_CUST_FILTER_NAME = -QHP_CUST_FILTER_ATTRS = -QHP_SECT_FILTER_ATTRS = -QHG_LOCATION = +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project DISABLE_INDEX = NO ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = YES USE_INLINE_TREES = YES TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = YES FORMULA_FONTSIZE = 10 SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = NO -LATEX_OUTPUT = +LATEX_OUTPUT = LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex COMPACT_LATEX = NO PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = +EXTRA_PACKAGES = +LATEX_HEADER = PDF_HYPERLINKS = YES USE_PDFLATEX = NO LATEX_BATCHMODE = NO @@ -197,16 +209,16 @@ LATEX_SOURCE_CODE = NO # configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = NO -RTF_OUTPUT = +RTF_OUTPUT = COMPACT_RTF = NO RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN = NO -MAN_OUTPUT = +MAN_OUTPUT = MAN_EXTENSION = .3 MAN_LINKS = NO #--------------------------------------------------------------------------- @@ -214,8 +226,8 @@ MAN_LINKS = NO #--------------------------------------------------------------------------- GENERATE_XML = NO XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = +XML_SCHEMA = +XML_DTD = XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output @@ -227,37 +239,37 @@ GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO PERLMOD_LATEX = NO PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- TAGFILES = qtools_docs/qtools.tag=../../qtools_docs/html -GENERATE_TAGFILE = +GENERATE_TAGFILE = ALLEXTERNALS = NO EXTERNAL_GROUPS = YES PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = NO -MSCGEN_PATH = +MSCGEN_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = YES DOT_FONTNAME = FreeSans DOT_FONTSIZE = 10 -DOT_FONTPATH = +DOT_FONTPATH = CLASS_GRAPH = YES COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES @@ -270,8 +282,8 @@ CALLER_GRAPH = NO GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = +DOT_PATH = +DOTFILE_DIRS = DOT_GRAPH_MAX_NODES = 50 MAX_DOT_GRAPH_DEPTH = 0 DOT_TRANSPARENT = NO @@ -1,7 +1,7 @@ -DOXYGEN Version 1.6.3-20100507 +DOXYGEN Version 1.6.3-20100603 Please read the installation section of the manual (http://www.doxygen.org/install.html) for instructions. -------- -Dimitri van Heesch (07 May 2010) +Dimitri van Heesch (03 June 2010) @@ -1,4 +1,4 @@ -DOXYGEN Version 1.6.3_20100507 +DOXYGEN Version 1.6.3_20100603 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) (07 May 2010) +Dimitri van Heesch (dimitri@stack.nl) (03 June 2010) diff --git a/addon/doxywizard/Makefile.in b/addon/doxywizard/Makefile.in index 75a3a6d..6f7c4bd 100644 --- a/addon/doxywizard/Makefile.in +++ b/addon/doxywizard/Makefile.in @@ -10,7 +10,7 @@ # See the GNU General Public License for more details. # -QMAKE=qmake +QMAKE=qmake $(MKSPECS) all: Makefile.doxywizard $(MAKE) -f Makefile.doxywizard diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index 329f60e..5299c10 100644 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -4,6 +4,10 @@ #include "expert.h" #include "wizard.h" +#ifdef WIN32 +#include <windows.h> +#endif + #define MAX_RECENT_FILES 10 const int messageTimeout = 5000; //!< status bar message timeout in millisec. @@ -520,12 +524,13 @@ void MainWindow::showHtmlOutput() QFileInfo fi(indexFile); // TODO: the following doesn't seem to work with IE #ifdef WIN32 - QString indexUrl(QString::fromAscii("file:///")); + //QString indexUrl(QString::fromAscii("file:///")); + ShellExecute(NULL, L"open", fi.absoluteFilePath().utf16(), NULL, NULL, SW_SHOWNORMAL); #else QString indexUrl(QString::fromAscii("file://")); -#endif indexUrl+=fi.absoluteFilePath(); QDesktopServices::openUrl(QUrl(indexUrl)); +#endif } void MainWindow::saveLog() diff --git a/addon/doxywizard/doxywizard.ico b/addon/doxywizard/doxywizard.ico Binary files differnew file mode 100644 index 0000000..d91f219 --- /dev/null +++ b/addon/doxywizard/doxywizard.ico diff --git a/addon/doxywizard/doxywizard.pro.in b/addon/doxywizard/doxywizard.pro.in index b9f8f70..3b40576 100644 --- a/addon/doxywizard/doxywizard.pro.in +++ b/addon/doxywizard/doxywizard.pro.in @@ -25,3 +25,4 @@ SOURCES += doxywizard.cpp ../../src/version.cpp expert.cpp wizard.cpp \ inputbool.cpp inputstring.cpp inputint.cpp inputstrlist.cpp LEXSOURCES += config.l RESOURCES += doxywizard.qrc +win32:RC_FILE += doxywizard.rc diff --git a/addon/doxywizard/doxywizard.rc b/addon/doxywizard/doxywizard.rc new file mode 100644 index 0000000..7f5327c --- /dev/null +++ b/addon/doxywizard/doxywizard.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "doxywizard.ico" @@ -20,7 +20,7 @@ doxygen_version_minor=6 doxygen_version_revision=3 #NOTE: Setting version_mmn to "NO" will omit mmn info from the package. -doxygen_version_mmn=20100507 +doxygen_version_mmn=20100603 bin_dirs=`echo $PATH | sed -e "s/:/ /g"` @@ -268,7 +268,7 @@ if test "$f_wizard" = YES; then if test -z "$QTDIR"; then echo " QTDIR environment variable not set!" echo -n " Checking for Qt..." - for d in /usr/{lib,share,qt}/{qt-4,qt4,qt,qt*,4}; do + for d in /usr /usr/{lib,share,qt}/{qt-4,qt4,qt,qt*,4}; do if test -x "$d/bin/qmake"; then QTDIR=$d fi @@ -499,6 +499,17 @@ TMAKE += -unix EOF fi +if test "$f_platform" = "macosx-c++"; then + cat >> .makeconfig <<EOF +MKSPECS = -spec macx-g++ +EOF +fi +if test "$f_platform" = "macosx-uni-c++"; then + cat >> .makeconfig <<EOF +MKSPECS = -spec macx-g++ +EOF + fi + # Make doxygen.spec... # diff --git a/doc/config.doc b/doc/config.doc index 455ac61..e46725e 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -80,6 +80,8 @@ followed by the descriptions of the tags grouped by category. \refitem cfg_distribute_group_doc DISTRIBUTE_GROUP_DOC \refitem cfg_docset_bundle_id DOCSET_BUNDLE_ID \refitem cfg_docset_feedname DOCSET_FEEDNAME +\refitem cfg_docset_publisher_id DOCSET_PUBLISHER_ID +\refitem cfg_docset_publisher_name DOCSET_PUBLISHER_NAME \refitem cfg_dot_cleanup DOT_CLEANUP \refitem cfg_dot_fontname DOT_FONTNAME \refitem cfg_dot_fontpath DOT_FONTPATH @@ -87,6 +89,7 @@ followed by the descriptions of the tags grouped by category. \refitem cfg_dot_graph_max_nodes DOT_GRAPH_MAX_NODES \refitem cfg_dot_image_format DOT_IMAGE_FORMAT \refitem cfg_dot_multi_targets DOT_MULTI_TARGETS +\refitem cfg_dot_num_threads DOT_NUM_THREADS \refitem cfg_dot_path DOT_PATH \refitem cfg_dot_transparent DOT_TRANSPARENT \refitem cfg_dotfile_dirs DOTFILE_DIRS @@ -103,6 +106,7 @@ followed by the descriptions of the tags grouped by category. \refitem cfg_exclude_symlinks EXCLUDE_SYMLINKS \refitem cfg_expand_as_defined EXPAND_AS_DEFINED \refitem cfg_expand_only_predef EXPAND_ONLY_PREDEF +\refitem cfg_ext_links_in_window EXT_LINKS_IN_WINDOW \refitem cfg_extension_mapping EXTENSION_MAPPING \refitem cfg_external_groups EXTERNAL_GROUPS \refitem cfg_extra_packages EXTRA_PACKAGES @@ -1350,6 +1354,15 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" reverse domain-name style string, e.g. <code>com.mycompany.MyDocSet</code>. Doxygen will append <code>.docset</code> to the name. +\anchor cfg_docset_publisher_id +<dt>\c DOCSET_PUBLISHER_ID <dd> +When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +the documentation publisher. This should be a reverse domain-name style +string, e.g. com.mycompany.MyDocSet.documentation. + +\anchor cfg_docset_publisher_name +<dt>\c DOCSET_PUBLISHER_NAME <dd> +The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. \anchor cfg_generate_htmlhelp <dt>\c GENERATE_HTMLHELP <dd> @@ -1561,6 +1574,12 @@ and Class Hierarchy pages using a tree view instead of an ordered list. used to set the initial width (in pixels) of the frame in which the tree is shown. +\anchor cfg_ext_links_in_window +<dt>\c EXT_LINKS_IN_WINDOW <dd> + \addindex EXT_LINKS_IN_WINDOW + When the \c EXT_LINKS_IN_WINDOW option is set to \c YES doxygen will open + links to external symbols imported via tag files in a separate window. + \anchor cfg_formula_fontsize <dt>\c FORMULA_FONTSIZE <dd> \addindex FORMULA_FONTSIZE @@ -2036,6 +2055,15 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre> visualization toolkit from AT\&T and Lucent Bell Labs. The other options in this section have no effect if this option is set to \c NO (the default) +\anchor cfg_dot_num_threads +<dt>\c DOT_NUM_THREADS <dd> + \addindex DOT_NUM_THREADS + The \c DOT_NUM_THREADS specifies the number of dot invocations doxygen is + allowed to run in parallel. When set to 0 (the default) doxygen will + base this on the number of processors available in the system. You can set it + explicitly to a value larger than 0 to get control over the balance + between CPU load and processing speed. + \anchor cfg_dot_fontname <dt>\c DOT_FONTNAME <dd> \addindex DOT_FONTNAME diff --git a/doc/install.doc b/doc/install.doc index e1a6a29..b213555 100644 --- a/doc/install.doc +++ b/doc/install.doc @@ -56,8 +56,8 @@ tools should be installed. <ul> <li>Qt Software's GUI toolkit - <A HREF="http://www.trolltech.com/products/qt.html">Qt</A> - \latexonly(see {\tt http://www.trolltech.com/products/qt.html})\endlatexonly + <a href="http://qt.nokia.com/">Qt</A> + \latexonly(see {\tt http://qt.nokia.com/})\endlatexonly \addindex Qt version 4.3 or higher. This is needed to build the GUI front-end doxywizard. @@ -410,7 +410,7 @@ You can now build the Release or Debug flavor of Doxygen and Doxytag by right-cl the project in the solutions explorer, and selecting Build. Note that compiling Doxywizard currently requires Qt version 4 -(see http://www.trolltech.com/products/qt/qt3). +(see http://qt.nokia.com/products/platform/qt-for-windows). If you do not have a commercial license, you can build Doxywizard with the open source version (see http://qtwin.sourceforge.net/qt3-win32/compile-msvc-2005.php), but I have not tried this myself. @@ -497,17 +497,11 @@ Here is what is required: steps. <li>From Doxygen-1.2.2-20001015 onwards, the distribution includes the part - of Qt-2.x.y that is needed for to compile doxygen and doxytag, + of Qt that is needed for to compile doxygen and doxytag, The Windows specific part were also created. - As a result doxygen can be compiled on systems without X11 or the - commerical version of Qt. - - For doxywizard, a complete Qt library is - still a requirement however. A commercial license to build - doxywizard with the latest Qt library was kindly donated to me - by the nice people at <a href="http://www.trolltech.com">Qt Software</a>. - See doxygen download page for a link. - + As a result doxygen (without the wizard) can be compiled on systems + without X11 or the (commerical) version of Qt. + <li>If you used WinZip to extract the tar archive it will (apparently) not create empty folders, so you have to add the folders <code>objects</code> and <code>bin</code> manually in the root of the diff --git a/doc/language.doc b/doc/language.doc index a26d36f..b61b9f4 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -68,12 +68,12 @@ when the translator was updated. <td>Brazilian Portuguese</td> <td>Fabio "FJTC" Jun Takada Chino</td> <td>jun-chino at uol dot com dot br</td> - <td>1.6.3</td> + <td>up-to-date</td> </tr> <tr bgcolor="#ffffff"> <td>Catalan</td> <td>Maximiliano Pin<br/>Albert Mora</td> - <td>max.pin at bitroit dot com<br/>amora at iua dot upf dot es</td> + <td>max.pin at bitroit dot com<br/>[unreachable]</td> <td>1.6.3</td> </tr> <tr bgcolor="#ffffff"> @@ -91,8 +91,8 @@ when the translator was updated. <tr bgcolor="#ffffff"> <td>Croatian</td> <td>Boris Bralo</td> - <td>boris.bralo at zg dot htnet dot hr</td> - <td>1.6.3</td> + <td>boris.bralo at gmail dot com</td> + <td>up-to-date</td> </tr> <tr bgcolor="#ffffff"> <td>Czech</td> @@ -145,13 +145,13 @@ when the translator was updated. <tr bgcolor="#ffffff"> <td>Greek</td> <td>Paul Gessos</td> - <td>nickreserved at yahoo dot com</td> - <td>1.5.4</td> + <td>gessos.paul at yahoo dot gr</td> + <td>up-to-date</td> </tr> <tr bgcolor="#ffffff"> <td>Hungarian</td> <td>Ákos Kiss<br/>Földvári György</td> - <td>akiss at users dot sourceforge dot net<br/>foldvari lost at cyberspace</td> + <td>akiss at users dot sourceforge dot net<br/>[unreachable]</td> <td>1.4.6</td> </tr> <tr bgcolor="#ffffff"> @@ -169,7 +169,7 @@ when the translator was updated. <tr bgcolor="#ffffff"> <td>Japanese</td> <td>Hiroki Iseri<br/>Ryunosuke Satoh<br/>Kenji Nagamatsu<br/>Iwasa Kazmi</td> - <td>goyoki at gmail dot com<br/>sun594 at hotmail dot com<br/>naga at joyful dot club dot ne dot jp<br/>iwasa at cosmo-system dot jp</td> + <td>goyoki at gmail dot com<br/>sun594 at hotmail dot com<br/>naga at joyful dot club dot ne dot jp<br/>[unreachable]</td> <td>1.6.0</td> </tr> <tr bgcolor="#ffffff"> @@ -181,7 +181,7 @@ when the translator was updated. <tr bgcolor="#ffffff"> <td>Korean</td> <td>Kim Taedong<br/>SooYoung Jung<br/>Richard Kim</td> - <td>fly1004 at gmail dot com<br/>jung5000 at gmail dot com<br/>ryk at dspwiz dot com</td> + <td>fly1004 at gmail dot com<br/>jung5000 at gmail dot com<br/>[unreachable]</td> <td>1.6.3</td> </tr> <tr bgcolor="#ffffff"> @@ -192,8 +192,8 @@ when the translator was updated. </tr> <tr bgcolor="#ffffff"> <td>Lithuanian</td> - <td>Tomas Simonaitis<br/>Mindaugas Radzius<br/>Aidas Berukstis</td> - <td>haden at homelan dot lt<br/>mindaugasradzius at takas dot lt<br/>aidasber at takas dot lt</td> + <td>Tomas Simonaitis<br/>Mindaugas Radzius<br/>Aidas Berukstis<br/>-- contact lost --</td> + <td>[unreachable]<br/>[unreachable]<br/>[unreachable]<br/></td> <td>1.4.6</td> </tr> <tr bgcolor="#ffffff"> @@ -217,13 +217,13 @@ when the translator was updated. <tr bgcolor="#ffffff"> <td>Polish</td> <td>Piotr Kaminski<br/>Grzegorz Kowal<br/>Krzysztof Kral</td> - <td>Piotr.Kaminski at ctm dot gdynia dot pl<br/>g_kowal at poczta dot onet dot pl<br/>krzysztof.kral at gmail dot com</td> + <td>[unreachable]<br/>[unreachable]<br/>krzysztof.kral at gmail dot com</td> <td>1.6.3</td> </tr> <tr bgcolor="#ffffff"> <td>Portuguese</td> <td>Rui Godinho Lopes</td> - <td>ruiglopes at yahoo dot com</td> + <td>[unreachable]</td> <td>1.3.3</td> </tr> <tr bgcolor="#ffffff"> @@ -241,7 +241,7 @@ when the translator was updated. <tr bgcolor="#ffffff"> <td>Serbian</td> <td>Dejan Milosavljevic</td> - <td>dmilos at email dot com</td> + <td>[unreachable]</td> <td>1.6.0</td> </tr> <tr bgcolor="#ffffff"> @@ -252,8 +252,8 @@ when the translator was updated. </tr> <tr bgcolor="#ffffff"> <td>Slovak</td> - <td>Stanislav Kudláč</td> - <td>skudlac at pobox dot sk</td> + <td>-- searching for the maintainer --</td> + <td></td> <td>1.2.18</td> </tr> <tr bgcolor="#ffffff"> @@ -265,8 +265,8 @@ when the translator was updated. <tr bgcolor="#ffffff"> <td>Spanish</td> <td>Bartomeu<br/>Francisco Oltra Thennet<br/>David Vaquero</td> - <td>bartomeu at loteria3cornella dot com<br/>foltra at puc dot cl<br/>david at grupoikusnet dot com</td> - <td>1.6.3</td> + <td>bartomeu at loteria3cornella dot com<br/>[unreachable]<br/>david at grupoikusnet dot com</td> + <td>up-to-date</td> </tr> <tr bgcolor="#ffffff"> <td>Swedish</td> @@ -282,8 +282,8 @@ when the translator was updated. </tr> <tr bgcolor="#ffffff"> <td>Ukrainian</td> - <td>Olexij Tkatchenko</td> - <td>olexij.tkatchenko at parcs dot de</td> + <td>-- searching for the maintainer --</td> + <td></td> <td>1.4.1</td> </tr> <tr bgcolor="#ffffff"> @@ -311,10 +311,10 @@ when the translator was updated. \hline Arabic & Moaz Reyad & {\tt\tiny moazreyad@yahoo.com} & 1.4.6 \\ \hline - Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt\tiny jun-chino@uol.com.br} & 1.6.3 \\ + Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt\tiny jun-chino@uol.com.br} & up-to-date \\ \hline Catalan & Maximiliano Pin & {\tt\tiny max.pin@bitroit.com} & 1.6.3 \\ - ~ & Albert Mora & {\tt\tiny amora@iua.upf.es} & ~ \\ + ~ & Albert Mora & {\tt\tiny [unreachable] amora@iua.upf.es} & ~ \\ \hline Chinese & Li Daobing & {\tt\tiny lidaobing@gmail.com} & 1.6.0 \\ ~ & Wei Liu & {\tt\tiny liuwei@asiainfo.com} & ~ \\ @@ -322,7 +322,7 @@ when the translator was updated. Chinese Traditional & Daniel YC Lin & {\tt\tiny dlin.tw@gmail.com} & 1.6.0 \\ ~ & Gary Lee & {\tt\tiny garywlee@gmail.com} & ~ \\ \hline - Croatian & Boris Bralo & {\tt\tiny boris.bralo@zg.htnet.hr} & 1.6.3 \\ + Croatian & Boris Bralo & {\tt\tiny boris.bralo@gmail.com} & up-to-date \\ \hline Czech & Petr P\v{r}ikryl & {\tt\tiny prikrylp@skil.cz} & 1.6.3 \\ \hline @@ -340,10 +340,10 @@ when the translator was updated. \hline German & Jens Seidel & {\tt\tiny jensseidel@users.sf.net} & 1.6.3 \\ \hline - Greek & Paul Gessos & {\tt\tiny nickreserved@yahoo.com} & 1.5.4 \\ + Greek & Paul Gessos & {\tt\tiny gessos.paul@yahoo.gr} & up-to-date \\ \hline Hungarian & \'{A}kos Kiss & {\tt\tiny akiss@users.sourceforge.net} & 1.4.6 \\ - ~ & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt\tiny foldvari lost@cyberspace} & ~ \\ + ~ & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt\tiny [unreachable] foldvari lost@cyberspace} & ~ \\ \hline Indonesian & Hendy Irawan & {\tt\tiny ceefour@gauldong.net} & 1.4.6 \\ \hline @@ -353,19 +353,20 @@ when the translator was updated. Japanese & Hiroki Iseri & {\tt\tiny goyoki@gmail.com} & 1.6.0 \\ ~ & Ryunosuke Satoh & {\tt\tiny sun594@hotmail.com} & ~ \\ ~ & Kenji Nagamatsu & {\tt\tiny naga@joyful.club.ne.jp} & ~ \\ - ~ & Iwasa Kazmi & {\tt\tiny iwasa@cosmo-system.jp} & ~ \\ + ~ & Iwasa Kazmi & {\tt\tiny [unreachable] iwasa@cosmo-system.jp} & ~ \\ \hline JapaneseEn & see the Japanese language & {\tt\tiny ~} & English based \\ \hline Korean & Kim Taedong & {\tt\tiny fly1004@gmail.com} & 1.6.3 \\ ~ & SooYoung Jung & {\tt\tiny jung5000@gmail.com} & ~ \\ - ~ & Richard Kim & {\tt\tiny ryk@dspwiz.com} & ~ \\ + ~ & Richard Kim & {\tt\tiny [unreachable] ryk@dspwiz.com} & ~ \\ \hline KoreanEn & see the Korean language & {\tt\tiny ~} & English based \\ \hline - Lithuanian & Tomas Simonaitis & {\tt\tiny haden@homelan.lt} & 1.4.6 \\ - ~ & Mindaugas Radzius & {\tt\tiny mindaugasradzius@takas.lt} & ~ \\ - ~ & Aidas Berukstis & {\tt\tiny aidasber@takas.lt} & ~ \\ + Lithuanian & Tomas Simonaitis & {\tt\tiny [unreachable] haden@homelan.lt} & 1.4.6 \\ + ~ & Mindaugas Radzius & {\tt\tiny [unreachable] mindaugasradzius@takas.lt} & ~ \\ + ~ & Aidas Berukstis & {\tt\tiny [unreachable] aidasber@takas.lt} & ~ \\ + ~ & -- contact lost -- & {\tt\tiny } & ~ \\ \hline Macedonian & Slave Jovanovski & {\tt\tiny slavejovanovski@yahoo.com} & 1.6.0 \\ \hline @@ -373,34 +374,34 @@ when the translator was updated. \hline Persian & Ali Nadalizadeh & {\tt\tiny nadalizadeh@gmail.com} & 1.6.0 \\ \hline - Polish & Piotr Kaminski & {\tt\tiny Piotr.Kaminski@ctm.gdynia.pl} & 1.6.3 \\ - ~ & Grzegorz Kowal & {\tt\tiny g\_kowal@poczta.onet.pl} & ~ \\ + Polish & Piotr Kaminski & {\tt\tiny [unreachable] Piotr.Kaminski@ctm.gdynia.pl} & 1.6.3 \\ + ~ & Grzegorz Kowal & {\tt\tiny [unreachable] g\_kowal@poczta.onet.pl} & ~ \\ ~ & Krzysztof Kral & {\tt\tiny krzysztof.kral@gmail.com} & ~ \\ \hline - Portuguese & Rui Godinho Lopes & {\tt\tiny ruiglopes@yahoo.com} & 1.3.3 \\ + Portuguese & Rui Godinho Lopes & {\tt\tiny [unreachable] ruiglopes@yahoo.com} & 1.3.3 \\ \hline Romanian & Ionut Dumitrascu & {\tt\tiny reddumy@yahoo.com} & 1.6.0 \\ ~ & Alexandru Iosup & {\tt\tiny aiosup@yahoo.com} & ~ \\ \hline Russian & Alexandr Chelpanov & {\tt\tiny cav@cryptopro.ru} & 1.6.0 \\ \hline - Serbian & Dejan Milosavljevic & {\tt\tiny dmilos@email.com} & 1.6.0 \\ + Serbian & Dejan Milosavljevic & {\tt\tiny [unreachable] dmilos@email.com} & 1.6.0 \\ \hline SerbianCyrilic & Nedeljko Stefanovic & {\tt\tiny stenedjo@yahoo.com} & 1.6.0 \\ \hline - Slovak & Stanislav Kudl\'{a}\v{c} & {\tt\tiny skudlac@pobox.sk} & 1.2.18 \\ + Slovak & -- searching for the maintainer -- & {\tt\tiny } & 1.2.18 \\ \hline Slovene & Matja\v{z} Ostrover\v{s}nik & {\tt\tiny matjaz.ostroversnik@ostri.org} & 1.4.6 \\ \hline - Spanish & Bartomeu & {\tt\tiny bartomeu@loteria3cornella.com} & 1.6.3 \\ - ~ & Francisco Oltra Thennet & {\tt\tiny foltra@puc.cl} & ~ \\ + Spanish & Bartomeu & {\tt\tiny bartomeu@loteria3cornella.com} & up-to-date \\ + ~ & Francisco Oltra Thennet & {\tt\tiny [unreachable] foltra@puc.cl} & ~ \\ ~ & David Vaquero & {\tt\tiny david@grupoikusnet.com} & ~ \\ \hline Swedish & Mikael Hallin & {\tt\tiny mikaelhallin@yahoo.se} & 1.6.0 \\ \hline Turkish & Emin Ilker Cetinbas & {\tt\tiny niw3@yahoo.com} & 1.6.0 \\ \hline - Ukrainian & Olexij Tkatchenko & {\tt\tiny olexij.tkatchenko@parcs.de} & 1.4.1 \\ + Ukrainian & -- searching for the maintainer -- & {\tt\tiny } & 1.4.1 \\ \hline Vietnamese & Dang Minh Tuan & {\tt\tiny tuanvietkey@gmail.com} & 1.6.0 \\ \hline diff --git a/doc/maintainers.txt b/doc/maintainers.txt index 754cb1b..e7a1028 100644 --- a/doc/maintainers.txt +++ b/doc/maintainers.txt @@ -8,135 +8,141 @@ % The following one or more lines contain information about % the maintainer(s) for the language (one line, one maintainer) % in the form: <readable name><colon><e-mail> +% If the <e-mail> is prefixed [unreachable] it is not displayed in the table +% of maintainers in the Doxygen documentation, nor it is used when building +% the mailto.txt by translator.py. TranslatorAfrikaans -Johan Prinsloo: johan@zippysnoek.com +Johan Prinsloo: johan at zippysnoek dot com TranslatorArabic -Moaz Reyad: moazreyad@yahoo.com +Moaz Reyad: moazreyad at yahoo dot com TranslatorBrazilian -Fabio "FJTC" Jun Takada Chino: jun-chino@uol.com.br +Fabio "FJTC" Jun Takada Chino: jun-chino at uol dot com dot br TranslatorCatalan -Maximiliano Pin: max.pin@bitroit.com -Albert Mora: amora@iua.upf.es +Maximiliano Pin: max dot pin at bitroit dot com +Albert Mora: [unreachable] amora at iua dot upf dot es TranslatorChinese -Li Daobing: lidaobing@gmail.com -Wei Liu: liuwei@asiainfo.com +Li Daobing: lidaobing at gmail dot com +Wei Liu: liuwei at asiainfo dot com TranslatorChinesetraditional -Daniel YC Lin: dlin.tw@gmail.com -Gary Lee: garywlee@gmail.com +Daniel YC Lin: dlin dot tw at gmail dot com +Gary Lee: garywlee at gmail dot com TranslatorCroatian -Boris Bralo: boris.bralo@zg.htnet.hr +Boris Bralo: boris dot bralo at gmail dot com TranslatorCzech -Petr Přikryl: prikrylp@skil.cz +Petr Přikryl: prikrylp at skil dot cz TranslatorDanish -Erik Søe Sørensen: eriksoe+doxygen@daimi.au.dk +Erik Søe Sørensen: eriksoe+doxygen at daimi dot au dot dk TranslatorDutch -Dimitri van Heesch: dimitri@stack.nl +Dimitri van Heesch: dimitri at stack dot nl TranslatorEnglish -Dimitri van Heesch: dimitri@stack.nl +Dimitri van Heesch: dimitri at stack dot nl TranslatorEsperanto -Ander Martinez: dwarfnauko@gmail.com +Ander Martinez: dwarfnauko at gmail dot com TranslatorFinnish -Antti Laine: antti.a.laine@tut.fi +Antti Laine: antti dot a dot laine at tut dot fi TranslatorFrench -Xavier Outhier: xouthier@yahoo.fr +Xavier Outhier: xouthier at yahoo dot fr TranslatorGerman -Jens Seidel: jensseidel@users.sf.net +Jens Seidel: jensseidel at users dot sf dot net TranslatorGreek -Paul Gessos: nickreserved@yahoo.com +Paul Gessos: gessos dot paul at yahoo dot gr TranslatorHungarian -Ákos Kiss: akiss@users.sourceforge.net -Földvári György: foldvari lost@cyberspace +Ákos Kiss: akiss at users dot sourceforge dot net +Földvári György: [unreachable] foldvari lost at cyberspace TranslatorIndonesian -Hendy Irawan: ceefour@gauldong.net +Hendy Irawan: ceefour at gauldong dot net TranslatorItalian -Alessandro Falappa: alessandro@falappa.net -Ahmed Aldo Faisal: aaf23@cam.ac.uk +Alessandro Falappa: alessandro at falappa dot net +Ahmed Aldo Faisal: aaf23 at cam dot ac dot uk TranslatorJapanese -Hiroki Iseri: goyoki@gmail.com -Ryunosuke Satoh: sun594@hotmail.com -Kenji Nagamatsu: naga@joyful.club.ne.jp -Iwasa Kazmi: iwasa@cosmo-system.jp +Hiroki Iseri: goyoki at gmail dot com +Ryunosuke Satoh: sun594 at hotmail dot com +Kenji Nagamatsu: naga at joyful dot club dot ne dot jp +Iwasa Kazmi: [unreachable] iwasa at cosmo-system dot jp TranslatorKorean -Kim Taedong: fly1004@gmail.com -SooYoung Jung: jung5000@gmail.com -Richard Kim: ryk@dspwiz.com +Kim Taedong: fly1004 at gmail dot com +SooYoung Jung: jung5000 at gmail dot com +Richard Kim: [unreachable] ryk at dspwiz dot com TranslatorLithuanian -Tomas Simonaitis: haden@homelan.lt -Mindaugas Radzius: mindaugasradzius@takas.lt -Aidas Berukstis: aidasber@takas.lt +Tomas Simonaitis: [unreachable] haden at homelan dot lt +Mindaugas Radzius: [unreachable] mindaugasradzius at takas dot lt +Aidas Berukstis: [unreachable] aidasber at takas dot lt +-- contact lost --: TranslatorNorwegian -Lars Erik Jordet: lejordet@gmail.com +Lars Erik Jordet: lejordet at gmail dot com TranslatorMacedonian -Slave Jovanovski: slavejovanovski@yahoo.com +Slave Jovanovski: slavejovanovski at yahoo dot com TranslatorPersian -Ali Nadalizadeh: nadalizadeh@gmail.com +Ali Nadalizadeh: nadalizadeh at gmail dot com TranslatorPolish -Piotr Kaminski: Piotr.Kaminski@ctm.gdynia.pl -Grzegorz Kowal: g_kowal@poczta.onet.pl -Krzysztof Kral: krzysztof.kral@gmail.com +Piotr Kaminski: [unreachable] Piotr dot Kaminski at ctm dot gdynia dot pl +Grzegorz Kowal: [unreachable] g_kowal at poczta dot onet dot pl +Krzysztof Kral: krzysztof dot kral at gmail dot com TranslatorPortuguese -Rui Godinho Lopes: ruiglopes@yahoo.com +Rui Godinho Lopes: [unreachable] ruiglopes at yahoo dot com TranslatorRomanian -Ionut Dumitrascu: reddumy@yahoo.com -Alexandru Iosup: aiosup@yahoo.com +Ionut Dumitrascu: reddumy at yahoo dot com +Alexandru Iosup: aiosup at yahoo dot com TranslatorRussian -Alexandr Chelpanov: cav@cryptopro.ru +Alexandr Chelpanov: cav at cryptopro dot ru TranslatorSerbian -Dejan Milosavljevic: dmilos@email.com +Dejan Milosavljevic: [unreachable] dmilos at email dot com TranslatorSerbianCyrilic -Nedeljko Stefanovic: stenedjo@yahoo.com +Nedeljko Stefanovic: stenedjo at yahoo dot com TranslatorSlovak -Stanislav Kudláč: skudlac@pobox.sk +% Stanislav Kudláč: [unreachable] skudlac at pobox dot sk +-- searching for the maintainer --: TranslatorSlovene -Matjaž Ostroveršnik: matjaz.ostroversnik@ostri.org +Matjaž Ostroveršnik: matjaz dot ostroversnik at ostri dot org TranslatorSpanish -Bartomeu: bartomeu@loteria3cornella.com -Francisco Oltra Thennet: foltra@puc.cl -David Vaquero: david@grupoikusnet.com +Bartomeu: bartomeu at loteria3cornella dot com +Francisco Oltra Thennet: [unreachable] foltra at puc dot cl +David Vaquero: david at grupoikusnet dot com TranslatorSwedish -Mikael Hallin: mikaelhallin@yahoo.se +Mikael Hallin: mikaelhallin at yahoo dot se TranslatorUkrainian -Olexij Tkatchenko: olexij.tkatchenko@parcs.de +% (resigned) Olexij Tkatchenko: olexij at tkatchenko dot com +-- searching for the maintainer --: TranslatorVietnamese -Dang Minh Tuan: tuanvietkey@gmail.com +Dang Minh Tuan: tuanvietkey at gmail dot com TranslatorTurkish -Emin Ilker Cetinbas: niw3@yahoo.com +Emin Ilker Cetinbas: niw3 at yahoo dot com diff --git a/doc/translator.py b/doc/translator.py index 409b9ec..dd8fa00 100644 --- a/doc/translator.py +++ b/doc/translator.py @@ -52,6 +52,10 @@ 2008/06/09 - Warning when the MAX_DOT_GRAPH_HEIGHT is still part of trLegendDocs(). 2009/05/09 - Changed HTML output to fit it with XHTML DTD 2009/09/02 - Added percentage info to the report (implemented / to be implemented). + 2010/02/09 - Added checking/suggestion 'Reimplementation using UTF-8 suggested. + 2010/03/03 - Added [unreachable] prefix used in maintainers.txt. + 2010/05/28 - BOM skipped; minor code cleaning. + 2010/05/31 - e-mail mangled already in maintainers.txt """ from __future__ import generators @@ -223,7 +227,7 @@ class Transl: # Open the file for reading and extracting tokens until the eof. # Initialize the finite automaton. - f = file(self.fname) + f = open(self.fname) lineNo = 0 line = '' # init -- see the pos initialization below linelen = 0 # init @@ -242,9 +246,11 @@ class Transl: else: lineNo += 1 line = f.readline() + if line.startswith('\xef\xbb\xbf'): + line = line[3:] # skip the BOM linelen = len(line) pos = 0 - if line == '': # eof + if line == '': # eof status = 777 else: c = line[pos] @@ -1439,7 +1445,7 @@ class TrManager: self.numLang -= 1 # the couple will be counted as one # Extract the version of Doxygen. - f = file(os.path.join(self.doxy_path, 'VERSION')) + f = open(os.path.join(self.doxy_path, 'VERSION')) self.doxVersion = f.readline().strip() f.close() @@ -1487,7 +1493,7 @@ class TrManager: # Read content of the file as one string. assert os.path.isfile(fname) - f = file(fname) + f = open(fname) cont = f.read() f.close() @@ -1525,11 +1531,19 @@ class TrManager: return trdic - + def __emails(self, classId): + """Returns the list of maintainer emails. - def __email(self, classId): - """Returns the first maintainer for the translator class""" - return self.__maintainersDic[classId][0][1] + The method returns the list of e-mail adresses for the translator + class, but only the addresses that were not marked as [unreachable].""" + lst = [] + for m in self.__maintainersDic[classId]: + if not m[1].startswith('[unreachable]'): + email = m[1] + email = email.replace(' at ', '@') # Unmangle the mangled e-mail + email = email.replace(' dot ', '.') + lst.append(email) + return lst def generateTranslatorReport(self): @@ -1538,7 +1552,7 @@ class TrManager: output = os.path.join(self.doc_path, self.translatorReportFileName) # Open the textual report file for the output. - f = file(output, 'w') + f = open(output, 'w') # Output the information about the version. f.write('(' + self.doxVersion + ')\n\n') @@ -1566,7 +1580,7 @@ class TrManager: # The e-mail addresses of the maintainers will be collected to # the auxiliary file in the order of translator classes listed # in the translator report. - fmail = file('mailto.txt', 'w') + fmail = open('mailto.txt', 'w') # Write the list of up-to-date translator classes. if self.upToDateIdLst: @@ -1586,7 +1600,7 @@ class TrManager: if obj.note: f.write(' -- ' + obj.note) f.write('\n') - mailtoLst.append(self.__email(obj.classId)) + mailtoLst.extend(self.__emails(obj.classId)) fmail.write('up-to-date\n') fmail.write('; '.join(mailtoLst)) @@ -1620,7 +1634,7 @@ class TrManager: if obj.note: f.write('\n\tNote: ' + obj.note + '\n') f.write('\n') - mailtoLst.append(self.__email(obj.classId)) # to maintainer + mailtoLst.extend(self.__emails(obj.classId)) # to maintainer # Check the level of required adapter classes. if obj.status != '0.0.00' and obj.status < adaptMinVersion: @@ -1723,7 +1737,7 @@ class TrManager: self.lastModificationTime = tim # Process the content of the maintainers file. - f = file(fname) + f = open(fname) inside = False # inside the record for the language lineReady = True classId = None @@ -1753,7 +1767,8 @@ class TrManager: self.__maintainersDic[classId] = [] # Split the information about the maintainer and append - # the tuple. + # the tuple. The address may be prefixed '[unreachable]'. + # This will be processed later. lst = line.split(':', 1) assert(len(lst) == 2) t = (lst[0].strip(), lst[1].strip()) @@ -1786,7 +1801,7 @@ class TrManager: # # Read the template of the documentation, and remove the first # attention lines. - f = file(fTplName) + f = open(fTplName) line = f.readline() while line[0] != '/': line = f.readline() @@ -1862,20 +1877,17 @@ class TrManager: if not mm and self.__maintainersDic.has_key(obj.classId): lm = [ m[0] for m in self.__maintainersDic[obj.classId] ] mm = '<br/>'.join(lm) - le = [ m[1] for m in self.__maintainersDic[obj.classId] ] + + # Unreachable adresses will not be displayed at all. + le = [] + for m in self.__maintainersDic[obj.classId]: + address = m[1] + if address.startswith('[unreachable]'): + address = '[unreachable]' + le.append(address) ee = '<br/>'.join(le) - # Mangle the e-mail and replace the entity references. - if ee and ee != ' ': - # More than one maintainer address separated by <br> can be used. - emails = ee.split('<br/>') - mangled_list = [] - for email in emails: - name, domain = email.split('@') - domain = domain.replace('.', ' dot ') - mangled_list.append(name + ' at ' + domain) - ee = '<br/>'.join(mangled_list) - + # Replace the entity references. if mm: mm = mm.replace('č', 'č') mm = mm.replace('ř', 'ř') @@ -1973,7 +1985,7 @@ class TrManager: tplDic['informationTable'] = htmlTable + '\n' + latexTable # Insert the symbols into the document template and write it down. - f = file(fDocName, 'w') + f = open(fDocName, 'w') f.write(doctpl % tplDic) f.close() diff --git a/doc/translator_report.txt b/doc/translator_report.txt index e2d9cc8..9501c7d 100644 --- a/doc/translator_report.txt +++ b/doc/translator_report.txt @@ -10,7 +10,7 @@ Persian, Polish, Portuguese, Romanian, Russian, Serbian, SerbianCyrilic, Slovak, Slovene, Spanish, Swedish, Turkish, Ukrainian, and Vietnamese. -Of them, 2 translators are up-to-date, 36 translators are based on +Of them, 6 translators are up-to-date, 32 translators are based on some adapter class, and 2 are English based. ---------------------------------------------------------------------- @@ -19,8 +19,12 @@ alphabetically). This means that they derive from the Translator class and they implement all 225 of the required methods. Anyway, there still may be some details listed even for them: + TranslatorBrazilian + TranslatorCroatian TranslatorDutch TranslatorEnglish + TranslatorGreek + TranslatorSpanish -- The MAX_DOT_GRAPH_HEIGHT found in trLegendDocs() ---------------------------------------------------------------------- The following translator classes need some maintenance (the most @@ -28,7 +32,6 @@ obsolete at the end). The other info shows the estimation of Doxygen version when the class was last updated and number of methods that must be implemented to become up-to-date: - TranslatorSpanish 1.6.3 4 methods to implement (1 %) TranslatorPolish 1.6.3 4 methods to implement (1 %) TranslatorKorean 1.6.3 4 methods to implement (1 %) Note: Reimplementation using UTF-8 suggested. @@ -39,11 +42,7 @@ must be implemented to become up-to-date: TranslatorEsperanto 1.6.3 4 methods to implement (1 %) TranslatorCzech 1.6.3 4 methods to implement (1 %) - TranslatorCroatian 1.6.3 4 methods to implement (1 %) TranslatorCatalan 1.6.3 4 methods to implement (1 %) - TranslatorBrazilian 1.6.3 4 methods to implement (1 %) - Note: Reimplementation using UTF-8 suggested. - TranslatorVietnamese 1.6.0 9 methods to implement (4 %) TranslatorTurkish 1.6.0 9 methods to implement (4 %) TranslatorSwedish 1.6.0 9 methods to implement (4 %) @@ -77,9 +76,6 @@ must be implemented to become up-to-date: TranslatorAfrikaans 1.6.0 9 methods to implement (4 %) Note: Reimplementation using UTF-8 suggested. - TranslatorGreek 1.5.4 31 methods to implement (13 %) - Note: Reimplementation using UTF-8 suggested. - TranslatorDanish 1.5.4 31 methods to implement (13 %) Note: Reimplementation using UTF-8 suggested. @@ -209,19 +205,6 @@ TranslatorArabic (TranslatorAdapter_1_4_6) 32 methods to implement (14 %) virtual QCString trNoDescriptionAvailable() -TranslatorBrazilian (TranslatorAdapter_1_6_3) 4 methods to implement (1 %) -------------------- - - Implements 221 of the required methods (98 %). - - Missing methods (should be implemented): - - virtual QCString trDateTime(int year, int month, int day, int dayOfWeek, int hour, int minutes, int seconds, bool includeTime) - virtual QCString trFileIn(const char * name) - virtual QCString trDirDependency(const char * name) - virtual QCString trIncludesFileIn(const char * name) - - TranslatorCatalan (TranslatorAdapter_1_6_3) 4 methods to implement (1 %) ----------------- @@ -271,19 +254,6 @@ TranslatorChinesetraditional (TranslatorAdapter_1_6_0) 9 methods to implement virtual QCString trIncludesFileIn(const char * name) -TranslatorCroatian (TranslatorAdapter_1_6_3) 4 methods to implement (1 %) ------------------- - - Implements 221 of the required methods (98 %). - - Missing methods (should be implemented): - - virtual QCString trDateTime(int year, int month, int day, int dayOfWeek, int hour, int minutes, int seconds, bool includeTime) - virtual QCString trFileIn(const char * name) - virtual QCString trDirDependency(const char * name) - virtual QCString trIncludesFileIn(const char * name) - - TranslatorCzech (TranslatorAdapter_1_6_3) 4 methods to implement (1 %) --------------- @@ -394,58 +364,6 @@ TranslatorGerman (TranslatorAdapter_1_6_3) 4 methods to implement (1 %) virtual QCString trIncludesFileIn(const char * name) -TranslatorGreek (TranslatorAdapter_1_5_4) 31 methods to implement (13 %) ---------------- - - Implements 194 of the required methods (86 %). - - Missing methods (should be implemented): - - virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) - virtual QCString trSearching() - virtual QCString trNoMatches() - virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, bool single) - virtual QCString trLoading() - virtual QCString trSubprograms() - virtual QCString trDateTime(int year, int month, int day, int dayOfWeek, int hour, int minutes, int seconds, bool includeTime) - virtual QCString trModulesListDescription(bool extractAll) - virtual QCString trModulesList() - virtual QCString trTypeConstraints() - virtual QCString trFileIn(const char * name) - virtual QCString trGlobalNamespace() - virtual QCString trMemberFunctionDocumentationFortran() - virtual QCString trCompoundListDescriptionFortran() - virtual QCString trTypeDocumentation() - virtual QCString trModuleReference(const char * namespaceName) - virtual QCString trModulesMemberDescription(bool extractAll) - virtual QCString trModulesMembers() - virtual QCString trModulesIndex() - virtual QCString trDirRelation(const char * name) - virtual QCString trCompoundListFortran() - virtual QCString trDataTypes() - virtual QCString trDirDependency(const char * name) - virtual QCString trIncludesFileIn(const char * name) - virtual QCString trCompoundIndexFortran() - virtual QCString trSubprogram(bool first_capital, bool singular) - virtual QCString trCompoundReferenceFortran(const char * clName, ClassDef::CompoundType compType, bool isTemplate) - virtual QCString trType(bool first_capital, bool singular) - virtual QCString trModule(bool first_capital, bool singular) - virtual QCString trCompoundMembersFortran() - virtual QCString trSubprogramDocumentation() - - Obsolete methods (should be removed, never used): - - virtual QCString trHeaderFilesDescription() - virtual QCString trField(bool first_capital, bool singular) - virtual QCString trPackageDocumentation() - virtual QCString trSources() - virtual QCString trReimplementedForInternalReasons() - virtual QCString trInterfaces() - virtual QCString trHeaderFiles() - virtual QCString trBugsAndLimitations() - virtual QCString trNoDescriptionAvailable() - - TranslatorHungarian (TranslatorAdapter_1_4_6) 33 methods to implement (14 %) ------------------- @@ -1039,17 +957,10 @@ TranslatorSlovene (TranslatorAdapter_1_4_6) 33 methods to implement (14 %) virtual QCString trSubprogramDocumentation() -TranslatorSpanish (TranslatorAdapter_1_6_3) 4 methods to implement (1 %) +TranslatorSpanish (Translator) ----------------- - Implements 221 of the required methods (98 %). - - Missing methods (should be implemented): - - virtual QCString trDateTime(int year, int month, int day, int dayOfWeek, int hour, int minutes, int seconds, bool includeTime) - virtual QCString trFileIn(const char * name) - virtual QCString trDirDependency(const char * name) - virtual QCString trIncludesFileIn(const char * name) + Implements 225 of the required methods (100 %). TranslatorSwedish (TranslatorAdapter_1_6_0) 9 methods to implement (4 %) diff --git a/qtools/Doxyfile b/qtools/Doxyfile index 61f9093..bf28583 100644 --- a/qtools/Doxyfile +++ b/qtools/Doxyfile @@ -131,8 +131,8 @@ HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = HTML_COLORSTYLE_HUE = 220 -HTML_COLORSTYLE_SAT = 70 -HTML_COLORSTYLE_GAMMA = 60 +HTML_COLORSTYLE_SAT = 80 +HTML_COLORSTYLE_GAMMA = 80 HTML_TIMESTAMP = NO HTML_ALIGN_MEMBERS = YES HTML_DYNAMIC_SECTIONS = NO @@ -163,6 +163,7 @@ ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = YES USE_INLINE_TREES = NO TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO FORMULA_FONTSIZE = 10 SEARCHENGINE = YES SERVER_BASED_SEARCH = NO @@ -244,7 +245,8 @@ CLASS_DIAGRAMS = YES MSCGEN_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = YES -DOT_FONTNAME = FreeSans +DOT_NUM_THREADS = 0 +DOT_FONTNAME = FreeSans.ttf DOT_FONTSIZE = 10 DOT_FONTPATH = CLASS_GRAPH = YES diff --git a/qtools/qgcache.cpp b/qtools/qgcache.cpp index 1fd876d..89282c7 100644 --- a/qtools/qgcache.cpp +++ b/qtools/qgcache.cpp @@ -630,7 +630,7 @@ void QGCache::statistics() const #if defined(DEBUG) QString line; line.fill( '*', 80 ); - qDebug( line.ascii() ); + qDebug( "%s",line.ascii() ); qDebug( "CACHE STATISTICS:" ); qDebug( "cache contains %d item%s, with a total cost of %d", count(), count() != 1 ? "s" : "", tCost ); @@ -651,7 +651,7 @@ void QGCache::statistics() const lruList->dumps != 1 ? "have" : "has", lruList->dumpCosts ); qDebug( "Statistics from internal dictionary class:" ); dict->statistics(); - qDebug( line.ascii() ); + qDebug( "%s",line.ascii() ); #endif } diff --git a/qtools/qgdict.cpp b/qtools/qgdict.cpp index e55d059..e51b9c1 100644 --- a/qtools/qgdict.cpp +++ b/qtools/qgdict.cpp @@ -907,11 +907,11 @@ void QGDict::statistics() const QString line; line.fill( '-', 60 ); double real, ideal; - qDebug( line.ascii() ); + qDebug( "%s",line.ascii() ); qDebug( "DICTIONARY STATISTICS:" ); if ( count() == 0 ) { qDebug( "Empty!" ); - qDebug( line.ascii() ); + qDebug( "%s", line.ascii() ); return; } real = 0.0; @@ -932,7 +932,7 @@ void QGDict::statistics() const while ( b-- ) *pbuf++ = '*'; *pbuf = '\0'; - qDebug( buf ); + qDebug( "%s", buf ); i++; } qDebug( "Array size = %d", size() ); @@ -940,7 +940,7 @@ void QGDict::statistics() const qDebug( "Real dist = %g", real ); qDebug( "Rand dist = %g", ideal ); qDebug( "Real/Rand = %g", real/ideal ); - qDebug( line.ascii() ); + qDebug( "%s",line.ascii() ); #endif // DEBUG } diff --git a/qtools/qmutex.cpp b/qtools/qmutex.cpp new file mode 100644 index 0000000..fda5f07 --- /dev/null +++ b/qtools/qmutex.cpp @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <stdio.h> + +#include "qglobal.h" + +#include "qmutex.h" +#include "qmutex_p.h" + +QMutex::QMutex() : d(new QMutexPrivate()) +{ +} + +QMutex::~QMutex() +{ + delete d; +} + +void QMutex::lock() +{ + //printf("%p: QMutex::lock(): enter\n",this); + bool isLocked; + isLocked = d->contenders == 0 && d->contenders.testAndSet(0, 1); + if (!isLocked) + { + isLocked = d->contenders.fetchAndAdd(1)==0; + if (!isLocked) + { + // didn't get the lock, wait for it + //printf("%p: QMutex::lock(): wait() %d\n",this,(int)d->contenders); + d->wait(); + + // release lock + d->contenders.fetchAndAdd(-1); + } + } + //printf("%p: QMutex::lock(): leave\n",this); +} + +bool QMutex::tryLock() +{ + bool isLocked = d->contenders == 0 && + d->contenders.testAndSet(0, 1); + return isLocked; +} + +void QMutex::unlock() +{ + //printf("%p: QMutex::unlock(): enter %d\n",this,(int)d->contenders); + if (!d->contenders.testAndSet(1, 0)) + { + //printf("%p: QMutex::unlock(): wakeUp()\n",this); + d->wakeUp(); + } + //printf("%p: QMutex::unlock(): leave\n",this); +} + diff --git a/qtools/qmutex.h b/qtools/qmutex.h new file mode 100644 index 0000000..d3d2ac0 --- /dev/null +++ b/qtools/qmutex.h @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMUTEX_H +#define QMUTEX_H + +#include "qglobal.h" + +class QMutexPrivate; + +class QMutex +{ +public: + QMutex(); + ~QMutex(); + + void lock(); + bool tryLock(); + void unlock(); + +private: + QMutex(const QMutex &); + QMutex &operator=(const QMutex &); + + QMutexPrivate *d; +}; + +class QMutexLocker +{ + public: + QMutexLocker(QMutex *m) : m_mutex(m) + { + m_mutex->lock(); + } + ~QMutexLocker() + { + m_mutex->unlock(); + } + QMutex *mutex() const { return m_mutex; } + + private: + QMutex *m_mutex; +}; + +#endif // QMUTEX_H diff --git a/qtools/qmutex_p.h b/qtools/qmutex_p.h new file mode 100644 index 0000000..a47b407 --- /dev/null +++ b/qtools/qmutex_p.h @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMUTEX_P_H +#define QMUTEX_P_H + +#include "qglobal.h" + +#if defined(_OS_UNIX_) || defined(_OS_MAC_) +#include <pthread.h> +#elif defined(_OS_WIN32_) +#include <windows.h> +#endif + +class QAtomicInt +{ + public: + QAtomicInt(int v=0) : m_value(v) {} + bool testAndSet(int expectedValue,int newValue); + int fetchAndAdd(int valueToAdd); + operator int () const { return m_value; } + bool operator==(int value) const { return m_value == value; } + bool operator!=(int value) const { return m_value != value; } + bool operator!() const { return m_value == 0; } + + private: + volatile int m_value; +}; + +class QMutexPrivate +{ +public: + QMutexPrivate(); + ~QMutexPrivate(); + + void wait(); + void wakeUp(); + + QAtomicInt contenders; + +#if defined(_OS_UNIX_) || defined(_OS_MAC_) + volatile bool wakeup; + pthread_mutex_t mutex; + pthread_cond_t cond; +#elif defined(_OS_WIN32_) + HANDLE event; +#else +#error "unsupported platform" +#endif +}; + +#endif // QMUTEX_P_H diff --git a/qtools/qmutex_unix.cpp b/qtools/qmutex_unix.cpp new file mode 100644 index 0000000..4fe9a58 --- /dev/null +++ b/qtools/qmutex_unix.cpp @@ -0,0 +1,117 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <errno.h> +#include <pthread.h> + +#include "qglobal.h" +#include "qmutex.h" +#include "qmutex_p.h" + +static pthread_mutex_t qAtomicMutex = PTHREAD_MUTEX_INITIALIZER; + +static void report_error(int code, const char *where, const char *what) +{ + if (code != 0) + qWarning("%s: %s failure: %d", where, what, code); +} + + +QMutexPrivate::QMutexPrivate() + : contenders(0), wakeup(FALSE) +{ + report_error(pthread_mutex_init(&mutex, NULL), "QMutex", "mutex init"); + report_error(pthread_cond_init(&cond, NULL), "QMutex", "cv init"); +} + +QMutexPrivate::~QMutexPrivate() +{ + report_error(pthread_cond_destroy(&cond), "QMutex", "cv destroy"); + report_error(pthread_mutex_destroy(&mutex), "QMutex", "mutex destroy"); +} + +void QMutexPrivate::wait() +{ + report_error(pthread_mutex_lock(&mutex), "QMutex::lock", "mutex lock"); + int errorCode = 0; + while (!wakeup) + { + errorCode = pthread_cond_wait(&cond, &mutex); + if (errorCode) + { + report_error(errorCode, "QMutex::lock()", "cv wait"); + } + } + wakeup = FALSE; + report_error(pthread_mutex_unlock(&mutex), "QMutex::lock", "mutex unlock"); +} + +void QMutexPrivate::wakeUp() +{ + report_error(pthread_mutex_lock(&mutex), "QMutex::unlock", "mutex lock"); + wakeup = TRUE; + report_error(pthread_cond_signal(&cond), "QMutex::unlock", "cv signal"); + report_error(pthread_mutex_unlock(&mutex), "QMutex::unlock", "mutex unlock"); +} + +bool QAtomicInt::testAndSet(int expectedValue,int newValue) +{ + bool returnValue = false; + pthread_mutex_lock(&qAtomicMutex); + if (m_value == expectedValue) + { + m_value = newValue; + returnValue = true; + } + pthread_mutex_unlock(&qAtomicMutex); + return returnValue; +} + +int QAtomicInt::fetchAndAdd(int valueToAdd) +{ + int returnValue; + pthread_mutex_lock(&qAtomicMutex); + returnValue = m_value; + m_value += valueToAdd; + pthread_mutex_unlock(&qAtomicMutex); + return returnValue; +} + diff --git a/qtools/qmutex_win32.cpp b/qtools/qmutex_win32.cpp new file mode 100644 index 0000000..2d662ea --- /dev/null +++ b/qtools/qmutex_win32.cpp @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <windows.h> + +#include "qmutex.h" +#include "qmutex_p.h" + +QMutexPrivate::QMutexPrivate() + : contenders(0) +{ + event = CreateEvent(0, FALSE, FALSE, 0); + if (!event) + qWarning("QMutexPrivate::QMutexPrivate: Cannot create event"); +} + +QMutexPrivate::~QMutexPrivate() +{ + CloseHandle(event); +} + +void QMutexPrivate::wait() +{ + WaitForSingleObject(event, INFINITE); +} + +void QMutexPrivate::wakeUp() +{ + SetEvent(event); +} + +//---------------------------------------------------------------------- + +class QCriticalSection +{ + public: + QCriticalSection() { InitializeCriticalSection(§ion); } + ~QCriticalSection() { DeleteCriticalSection(§ion); } + void lock() { EnterCriticalSection(§ion); } + void unlock() { LeaveCriticalSection(§ion); } + + private: + CRITICAL_SECTION section; +}; + +static QCriticalSection qAtomicCriticalSection; + +bool QAtomicInt::testAndSet(int expectedValue,int newValue) +{ + bool returnValue = false; + qAtomicCriticalSection.lock(); + if (m_value == expectedValue) + { + m_value = newValue; + returnValue = true; + } + qAtomicCriticalSection.unlock(); + return returnValue; +} + +int QAtomicInt::fetchAndAdd(int valueToAdd) +{ + int returnValue; + qAtomicCriticalSection.lock(); + returnValue = m_value; + m_value += valueToAdd; + qAtomicCriticalSection.unlock(); + return returnValue; +} + diff --git a/qtools/qthread.cpp b/qtools/qthread.cpp new file mode 100644 index 0000000..db2a0de --- /dev/null +++ b/qtools/qthread.cpp @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qthread.h" +#include "qthread_p.h" + +QThread::QThread() + : d(new QThreadPrivate) +{ +} + +QThread::~QThread() +{ + QMutexLocker locker(&d->mutex); + if (d->running && !d->finished) + qWarning("QThread: Destroyed while thread is still running"); +} + +bool QThread::isFinished() const +{ + QMutexLocker locker(&d->mutex); + return d->finished; +} + +bool QThread::isRunning() const +{ + QMutexLocker locker(&d->mutex); + return d->running; +} + +void QThread::setStackSize(unsigned int stackSize) +{ + QMutexLocker locker(&d->mutex); + if (d->running) + { + qWarning("QThread: Cannot change stack size while thread is running!"); + return; + } + d->stackSize = stackSize; +} + +unsigned int QThread::stackSize() const +{ + QMutexLocker locker(&d->mutex); + return d->stackSize; +} + diff --git a/qtools/qthread.h b/qtools/qthread.h new file mode 100644 index 0000000..81868bd --- /dev/null +++ b/qtools/qthread.h @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTHREAD_H +#define QTHREAD_H + +class QThreadPrivate; + +class QThread +{ + public: + explicit QThread(); + virtual ~QThread(); + + bool isFinished() const; + bool isRunning() const; + + void start(); + void terminate(); + void wait(); + void setStackSize(unsigned int stackSize); + unsigned int stackSize() const; + static int idealThreadCount(); + +protected: + // events + virtual void started() {} + virtual void finished() {} + virtual void terminated() {} + + // main loop + virtual void run() {} + +private: + QThreadPrivate *d; + friend class QThreadPrivate; +}; + +#endif // QTHREAD_H diff --git a/qtools/qthread_p.h b/qtools/qthread_p.h new file mode 100644 index 0000000..87692aa --- /dev/null +++ b/qtools/qthread_p.h @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTHREAD_P_H +#define QTHREAD_P_H + +#include "qglobal.h" + +#if defined(_OS_UNIX_) || defined(_OS_MAC_) +#include <pthread.h> +#elif defined(_OS_WIN32_) +#include <windows.h> +#endif + +#include "qthread.h" +#include "qmutex.h" +#include "qwaitcondition.h" + +class QThreadPrivate +{ +public: + QThreadPrivate(); + ~QThreadPrivate(); + + mutable QMutex mutex; + + bool running; + bool finished; + bool terminated; + uint stackSize; + +#if defined(_OS_UNIX_) || defined(_OS_MAC_) + pthread_t thread_id; + QWaitCondition thread_done; + static void *start(void *arg); + static void finish(void *arg); +#elif defined(_OS_WIN32_) + HANDLE handle; + static unsigned int __stdcall start(void *); + static void finish(void *,bool lockAnyway=TRUE); + int waiters; +#else +#error "unsupported platform!" +#endif +}; + +#endif // QTHREAD_P_H diff --git a/qtools/qthread_unix.cpp b/qtools/qthread_unix.cpp new file mode 100644 index 0000000..53242cc --- /dev/null +++ b/qtools/qthread_unix.cpp @@ -0,0 +1,218 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qglobal.h" + +#if defined(_OS_HPUX_) +#include <sys/pstat.h> +#elif defined(_OS_MAC_) +#undef DEBUG +#include <CoreServices/CoreServices.h> +#elif defined(_OS_BSDI_) +#include <mach/mach_types.h> +#include <sys/systm.h> +#include <sys/types.h> +#include <sys/sysctl.h> +#endif +#include <unistd.h> + +#include "qthread.h" +#include "qthread_p.h" + + +/************************************************************************** + ** QThreadPrivate + *************************************************************************/ + +QThreadPrivate::QThreadPrivate() : + running(FALSE), finished(FALSE), terminated(FALSE), stackSize(0) +{ + thread_id = 0; +} + +QThreadPrivate::~QThreadPrivate() +{ +} + +void *QThreadPrivate::start(void *arg) +{ + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); + pthread_cleanup_push(QThreadPrivate::finish, arg); + + QThread *thr = reinterpret_cast<QThread *>(arg); + + thr->started(); + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_testcancel(); + thr->run(); + + pthread_cleanup_pop(1); + return 0; +} + +void QThreadPrivate::finish(void *arg) +{ + QThread *thr = reinterpret_cast<QThread *>(arg); + QThreadPrivate *d = thr->d; + QMutexLocker locker(&d->mutex); + + d->running = FALSE; + d->finished = TRUE; + if (d->terminated) + thr->terminated(); + d->terminated = FALSE; + thr->finished(); + + d->thread_id = 0; + d->thread_done.wakeAll(); +} + + + + +/************************************************************************** + ** QThread + *************************************************************************/ + +void QThread::start() +{ + QMutexLocker locker(&d->mutex); + if (d->running) return; + + d->running = TRUE; + d->finished = FALSE; + + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED); + if (d->stackSize>0) + { +#if defined(_POSIX_THREAD_ATTR_STACKSIZE) && (_POSIX_THREAD_ATTR_STACKSIZE-0>0) + pthread_attr_setstacksize(&attr,d->stackSize); +#endif + } + int code = pthread_create(&d->thread_id, &attr, QThreadPrivate::start, this); + pthread_attr_destroy(&attr); + + if (code) + { + qWarning("QThread::start: Thread creation error: %d", code); + + d->running = FALSE; + d->finished = FALSE; + d->thread_id = 0; + } +} + +void QThread::terminate() +{ + QMutexLocker locker(&d->mutex); + + if (!d->thread_id) return; + + int code = pthread_cancel(d->thread_id); + if (code) + { + qWarning("QThread::start: Thread termination error: %d", code); + } + else + { + d->terminated = TRUE; + } +} + +void QThread::wait() +{ + QMutexLocker locker(&d->mutex); + if (d->finished || !d->running) return; + + while (d->running) + { + d->thread_done.wait(locker.mutex()); + } +} + +#if defined(QT_LINUXBASE) && !defined(_SC_NPROCESSORS_ONLN) +// LSB doesn't define _SC_NPROCESSORS_ONLN. +# define _SC_NPROCESSORS_ONLN 84 +#endif + +int QThread::idealThreadCount() +{ + int cores = -1; +#if defined(_OS_MAC_) + // Mac OS X + cores = MPProcessorsScheduled(); +#elif defined(_OS_HPUX_) + // HP-UX + struct pst_dynamic psd; + if (pstat_getdynamic(&psd, sizeof(psd), 1, 0) == -1) + { + perror("pstat_getdynamic"); + cores = -1; + } + else + { + cores = (int)psd.psd_proc_cnt; + } +#elif defined(_OS_BSDI_) + // FreeBSD, OpenBSD, NetBSD, BSD/OS + size_t len = sizeof(cores); + int mib[2]; + mib[0] = CTL_HW; + mib[1] = HW_NCPU; + + if (sysctl(mib, 2, &cores, &len, NULL, 0) != 0) + { + perror("sysctl"); + cores = -1; + } +#elif defined(_OS_IRIX_) + // IRIX + cores = (int)sysconf(_SC_NPROC_ONLN); +#else + // the rest: Linux, Solaris, AIX, Tru64 + cores = (int)sysconf(_SC_NPROCESSORS_ONLN); +#endif + return cores; +} + diff --git a/qtools/qthread_win32.cpp b/qtools/qthread_win32.cpp new file mode 100644 index 0000000..2c62e93 --- /dev/null +++ b/qtools/qthread_win32.cpp @@ -0,0 +1,158 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qthread.h" +#include "qthread_p.h" + +/************************************************************************** + ** QThreadPrivate + *************************************************************************/ + +QThreadPrivate::QThreadPrivate() : + running(FALSE), finished(FALSE), terminated(FALSE), stackSize(0) +{ + handle = NULL; + waiters = 0; +} + +QThreadPrivate::~QThreadPrivate() +{ +} + +unsigned int __stdcall QThreadPrivate::start(void *arg) +{ + QThread *thr = reinterpret_cast<QThread *>(arg); + thr->started(); + thr->run(); + finish(arg); + return 0; +} + +void QThreadPrivate::finish(void *arg,bool lockAnyway) +{ + QThread *thr = reinterpret_cast<QThread *>(arg); + QThreadPrivate *d = thr->d; + + if (lockAnyway) d->mutex.lock(); + + d->running = FALSE; + d->finished = TRUE; + if (d->terminated) thr->terminated(); + d->terminated = FALSE; + thr->finished(); + + if (!d->waiters) + { + CloseHandle(d->handle); + d->handle = 0; + } + + if (lockAnyway) d->mutex.unlock(); +} + +/************************************************************************** + ** QThread + *************************************************************************/ + +void QThread::start() +{ + QMutexLocker locker(&d->mutex); + + if (d->running) return; + + d->running = TRUE; + d->finished = FALSE; + d->terminated = FALSE; + + d->handle = CreateThread(NULL,d->stackSize, + (LPTHREAD_START_ROUTINE)QThreadPrivate::start,this,0,NULL); + + if (!d->handle) + { + qWarning("QThread::start: Failed to create thread: errno=%d",errno); + d->running = FALSE; + d->finished = TRUE; + return; + } +} + +void QThread::terminate() +{ + QMutexLocker locker(&d->mutex); + if (!d->running) return; + TerminateThread(d->handle, 0); + d->terminated = TRUE; + QThreadPrivate::finish(this); +} + +void QThread::wait() +{ + QMutexLocker locker(&d->mutex); + if (d->finished || !d->running) return; + + ++d->waiters; + locker.mutex()->unlock(); + + WaitForSingleObject(d->handle,INFINITE); + + locker.mutex()->lock(); + --d->waiters; + if (!d->finished) // thread was terminated by someone else + { + d->terminated = TRUE; + QThreadPrivate::finish(this); + } + + if (d->finished && d->waiters) + { + CloseHandle(d->handle); + d->handle = 0; + } +} + +int QThread::idealThreadCount() +{ + SYSTEM_INFO sysinfo; + GetSystemInfo(&sysinfo); + return sysinfo.dwNumberOfProcessors; +} + + diff --git a/qtools/qtools.pro.in b/qtools/qtools.pro.in index d2550f6..f0a1ffa 100644 --- a/qtools/qtools.pro.in +++ b/qtools/qtools.pro.in @@ -44,7 +44,13 @@ HEADERS = qarray.h \ qxml.h \ qvaluestack.h \ qmap.h \ - qmodules.h + qmodules.h \ + qthread.h \ + qthread_p.h \ + qmutex.h \ + qmutex_p.h \ + qwaitcondition.h + SOURCES = qbuffer.cpp \ qcollection.cpp \ scstring.cpp \ @@ -67,15 +73,23 @@ SOURCES = qbuffer.cpp \ qtextcodec.cpp \ qstringlist.cpp \ qxml.cpp \ - qmap.cpp + qmap.cpp \ + qthread.cpp \ + qmutex.cpp unix:SOURCES += qfile_unix.cpp \ qdir_unix.cpp \ - qfileinfo_unix.cpp + qfileinfo_unix.cpp \ + qthread_unix.cpp \ + qmutex_unix.cpp \ + qwaitcondition_unix.cpp win32:SOURCES += qfile_win32.cpp \ qdir_win32.cpp \ - qfileinfo_win32.cpp + qfileinfo_win32.cpp \ + qthread_win32.cpp \ + qmutex_win32.cpp \ + qwaitcondition_win32.cpp INCLUDEPATH = . TMAKE_CXXFLAGS += -DQT_NO_CODECS -DQT_LITE_UNICODE diff --git a/qtools/qwaitcondition.h b/qtools/qwaitcondition.h new file mode 100644 index 0000000..4d5b3bd --- /dev/null +++ b/qtools/qwaitcondition.h @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QWAITCONDITION_H +#define QWAITCONDITION_H + +#include "qglobal.h" + +class QWaitConditionPrivate; +class QMutex; + +class QWaitCondition +{ +public: + QWaitCondition(); + ~QWaitCondition(); + + void wait(QMutex *mutex); + + void wakeOne(); + void wakeAll(); + +private: + QWaitCondition(const QWaitCondition &); + QWaitCondition &operator=(const QWaitCondition &); + + QWaitConditionPrivate * d; +}; + +#endif // QWAITCONDITION_H diff --git a/qtools/qwaitcondition_unix.cpp b/qtools/qwaitcondition_unix.cpp new file mode 100644 index 0000000..aa22a4b --- /dev/null +++ b/qtools/qwaitcondition_unix.cpp @@ -0,0 +1,133 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qwaitcondition.h" +#include "qmutex.h" +#include <pthread.h> + +#define MIN(a,b) ((a)<(b)?(a):(b)) + +static void report_error(int code, const char *where, const char *what) +{ + if (code != 0) + qWarning("%s: %s failure: %d", where, what, code); +} + +struct QWaitConditionPrivate +{ + pthread_mutex_t mutex; + pthread_cond_t cond; + int waiters; + int wakeups; + + void wait() + { + int code; + for (;;) + { + code = pthread_cond_wait(&cond, &mutex); + if (code == 0 && wakeups == 0) + { + // many vendors warn of spurios wakeups from + // pthread_cond_wait(), especially after signal delivery, + // even though POSIX doesn't allow for it... sigh + continue; + } + break; + } + + --waiters; + if (code == 0) + { + --wakeups; + } + else + { + report_error(code, "QWaitCondition::wait()", "cv wait"); + } + report_error(pthread_mutex_unlock(&mutex), "QWaitCondition::wait()", "mutex unlock"); + } +}; + + +QWaitCondition::QWaitCondition() +{ + d = new QWaitConditionPrivate; + report_error(pthread_mutex_init(&d->mutex, NULL), "QWaitCondition", "mutex init"); + report_error(pthread_cond_init(&d->cond, NULL), "QWaitCondition", "cv init"); + d->waiters = d->wakeups = 0; +} + + +QWaitCondition::~QWaitCondition() +{ + report_error(pthread_cond_destroy(&d->cond), "QWaitCondition", "cv destroy"); + report_error(pthread_mutex_destroy(&d->mutex), "QWaitCondition", "mutex destroy"); + delete d; +} + +void QWaitCondition::wakeOne() +{ + report_error(pthread_mutex_lock(&d->mutex), "QWaitCondition::wakeOne()", "mutex lock"); + d->wakeups = MIN(d->wakeups + 1, d->waiters); + report_error(pthread_cond_signal(&d->cond), "QWaitCondition::wakeOne()", "cv signal"); + report_error(pthread_mutex_unlock(&d->mutex), "QWaitCondition::wakeOne()", "mutex unlock"); +} + +void QWaitCondition::wakeAll() +{ + report_error(pthread_mutex_lock(&d->mutex), "QWaitCondition::wakeAll()", "mutex lock"); + d->wakeups = d->waiters; + report_error(pthread_cond_broadcast(&d->cond), "QWaitCondition::wakeAll()", "cv broadcast"); + report_error(pthread_mutex_unlock(&d->mutex), "QWaitCondition::wakeAll()", "mutex unlock"); +} + +void QWaitCondition::wait(QMutex *mutex) +{ + if (!mutex) return; + + report_error(pthread_mutex_lock(&d->mutex), "QWaitCondition::wait()", "mutex lock"); + ++d->waiters; + mutex->unlock(); + d->wait(); + mutex->lock(); +} + diff --git a/qtools/qwaitcondition_win32.cpp b/qtools/qwaitcondition_win32.cpp new file mode 100644 index 0000000..77eb039 --- /dev/null +++ b/qtools/qwaitcondition_win32.cpp @@ -0,0 +1,186 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <windows.h> +#include "qwaitcondition.h" +#include "qmutex.h" +#include "qlist.h" + +//*********************************************************************** +// QWaitConditionPrivate +// ********************************************************************** + +class QWaitConditionEvent +{ +public: + QWaitConditionEvent() : priority(0), wokenUp(false) + { + event = CreateEvent(NULL, TRUE, FALSE, NULL); + } + ~QWaitConditionEvent() { CloseHandle(event); } + int priority; + bool wokenUp; + HANDLE event; +}; + +class EventQueue : public QList<QWaitConditionEvent> +{ + public: + EventQueue() { setAutoDelete(TRUE); } + ~EventQueue() {} +}; + +class QWaitConditionPrivate +{ +public: + QMutex mtx; + EventQueue queue; + EventQueue freeQueue; + + QWaitConditionEvent *pre(); + void wait(QWaitConditionEvent *wce); + void post(QWaitConditionEvent *wce); +}; + +QWaitConditionEvent *QWaitConditionPrivate::pre() +{ + mtx.lock(); + QWaitConditionEvent *wce = + freeQueue.isEmpty() ? new QWaitConditionEvent : freeQueue.take(0); + wce->priority = GetThreadPriority(GetCurrentThread()); + wce->wokenUp = FALSE; + + // insert 'wce' into the queue (sorted by priority) + uint index = 0; + for (; index < queue.count(); ++index) + { + QWaitConditionEvent *current = queue.at(index); + if (current->priority < wce->priority) + break; + } + queue.insert(index, wce); + mtx.unlock(); + + return wce; +} + +void QWaitConditionPrivate::wait(QWaitConditionEvent *wce) +{ + WaitForSingleObject(wce->event, INFINITE); +} + +void QWaitConditionPrivate::post(QWaitConditionEvent *wce) +{ + mtx.lock(); + + // remove 'wce' from the queue + int idx = queue.find(wce); + ASSERT(idx!=-1); + queue.take(idx); + ResetEvent(wce->event); + freeQueue.append(wce); + + // wakeups delivered after the timeout should be forwarded to the next waiter + if (wce->wokenUp && !queue.isEmpty()) + { + QWaitConditionEvent *other = queue.getFirst(); + SetEvent(other->event); + other->wokenUp = TRUE; + } + + mtx.unlock(); +} + +//*********************************************************************** +// QWaitCondition implementation +//*********************************************************************** + +QWaitCondition::QWaitCondition() +{ + d = new QWaitConditionPrivate; +} + +QWaitCondition::~QWaitCondition() +{ + if (!d->queue.isEmpty()) + { + qWarning("QWaitCondition: Destroyed while threads are still waiting"); + } + delete d; +} + +void QWaitCondition::wait(QMutex *mutex) +{ + if (!mutex) return; + + QWaitConditionEvent *wce = d->pre(); + mutex->unlock(); + d->wait(wce); + mutex->lock(); + d->post(wce); +} + +void QWaitCondition::wakeOne() +{ + // wake up the first waiting thread in the queue + QMutexLocker locker(&d->mtx); + for (uint i = 0; i < d->queue.count(); ++i) + { + QWaitConditionEvent *current = d->queue.at(i); + if (current->wokenUp) continue; + SetEvent(current->event); + current->wokenUp = TRUE; + break; + } +} + +void QWaitCondition::wakeAll() +{ + // wake up the all threads in the queue + QMutexLocker locker(&d->mtx); + for (uint i = 0; i < d->queue.count(); ++i) + { + QWaitConditionEvent *current = d->queue.at(i); + SetEvent(current->event); + current->wokenUp = TRUE; + } +} + diff --git a/qtools/qxml.cpp b/qtools/qxml.cpp index c05ab88..9a24c1b 100644 --- a/qtools/qxml.cpp +++ b/qtools/qxml.cpp @@ -1944,7 +1944,7 @@ bool QXmlSimpleReader::feature( const QString& name, bool *ok ) const } else if ( name == "http://trolltech.com/xml/features/report-whitespace-only-CharData" ) { return d->reportWhitespaceCharData; } else { - qWarning( "Unknown feature " + name ); + qWarning( "Unknown feature %s", name.ascii() ); if ( ok != 0 ) *ok = FALSE; } @@ -1978,7 +1978,7 @@ void QXmlSimpleReader::setFeature( const QString& name, bool value ) } else if ( name == "http://trolltech.com/xml/features/report-whitespace-only-CharData" ) { d->reportWhitespaceCharData = value; } else { - qWarning( "Unknown feature " + name ); + qWarning( "Unknown feature %s", name.ascii() ); } } diff --git a/src/config.xml b/src/config.xml index b360841..f78a620 100644 --- a/src/config.xml +++ b/src/config.xml @@ -833,12 +833,12 @@ reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen will append .docset to the name. ' defval='org.doxygen.Project' depends='GENERATE_DOCSET'/> <option type='string' id='DOCSET_PUBLISHER_ID' format='string' docs=' -When GENERATE_DOCSET tag specifies a string that should uniquely identify +When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify the documentation publisher. This should be a reverse domain-name style string, e.g. com.mycompany.MyDocSet.documentation. ' defval='org.doxygen.Publisher' depends='GENERATE_DOCSET'/> <option type='string' id='DOCSET_PUBLISHER_NAME' format='string' docs=' -The GENERATE_DOCSET tag identifies the documentation publisher. +The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. ' defval='Publisher' depends='GENERATE_DOCSET'/> <option type='bool' id='GENERATE_HTMLHELP' docs=' If the GENERATE_HTMLHELP tag is set to YES, additional index files @@ -964,6 +964,10 @@ If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used to set the initial width (in pixels) of the frame in which the tree is shown. ' minval='0' maxval='1500' defval='250' depends='GENERATE_HTML'/> + <option type='bool' id='EXT_LINKS_IN_WINDOW' defval='0' docs=' +When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +links to external symbols imported via tag files in a separate window. +' depends='GENERATE_HTML'/> <option type='int' id='FORMULA_FONTSIZE' docs=' Use this tag to change the font size of Latex formulas included as images in the HTML documentation. The default is 10. Note that @@ -1311,6 +1315,13 @@ available from the path. This tool is part of Graphviz, a graph visualization toolkit from AT&T and Lucent Bell Labs. The other options in this section have no effect if this option is set to NO (the default) ' defval='0'/> + <option type='int' id='DOT_NUM_THREADS' docs=' +The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +allowed to run in parallel. When set to 0 (the default) doxygen will +base this on the number of processors available in the system. You can set it +explicitly to a value larger than 0 to get control over the balance +between CPU load and processing speed. +' defval='0' minval='0' maxval='32'/> <option type='string' id='DOT_FONTNAME' format='string' docs=' By default doxygen will write a font called FreeSans.ttf to the output directory and reference it in all dot files that doxygen generates. This @@ -1320,7 +1331,7 @@ using DOT_FONTNAME. You need need to make sure dot is able to find the font, which can be done by putting it in a standard location or by setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory containing the font. -' defval='FreeSans' depends='HAVE_DOT'/> +' defval='FreeSans.ttf' depends='HAVE_DOT'/> <option type='int' id='DOT_FONTSIZE' docs=' The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. The default size is 10pt. diff --git a/src/configoptions.cpp b/src/configoptions.cpp index d6f161f..08be034 100644 --- a/src/configoptions.cpp +++ b/src/configoptions.cpp @@ -1207,7 +1207,7 @@ void addConfigOptions(Config *cfg) //---- cs = cfg->addString( "DOCSET_PUBLISHER_ID", - "When GENERATE_DOCSET tag specifies a string that should uniquely identify\n" + "When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify\n" "the documentation publisher. This should be a reverse domain-name style\n" "string, e.g. com.mycompany.MyDocSet.documentation." ); @@ -1216,7 +1216,7 @@ void addConfigOptions(Config *cfg) //---- cs = cfg->addString( "DOCSET_PUBLISHER_NAME", - "The GENERATE_DOCSET tag identifies the documentation publisher." + "The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher." ); cs->setDefaultValue("Publisher"); cs->addDependency("GENERATE_DOCSET"); @@ -1429,6 +1429,14 @@ void addConfigOptions(Config *cfg) ); ci->addDependency("GENERATE_HTML"); //---- + cb = cfg->addBool( + "EXT_LINKS_IN_WINDOW", + "When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open\n" + "links to external symbols imported via tag files in a separate window.", + FALSE + ); + cb->addDependency("GENERATE_HTML"); + //---- ci = cfg->addInt( "FORMULA_FONTSIZE", "Use this tag to change the font size of Latex formulas included\n" @@ -1991,6 +1999,16 @@ void addConfigOptions(Config *cfg) FALSE ); //---- + ci = cfg->addInt( + "DOT_NUM_THREADS", + "The DOT_NUM_THREADS specifies the number of dot invocations doxygen is\n" + "allowed to run in parallel. When set to 0 (the default) doxygen will\n" + "base this on the number of processors available in the system. You can set it\n" + "explicitly to a value larger than 0 to get control over the balance\n" + "between CPU load and processing speed.", + 0,32,0 + ); + //---- cs = cfg->addString( "DOT_FONTNAME", "By default doxygen will write a font called FreeSans.ttf to the output\n" @@ -2002,7 +2020,7 @@ void addConfigOptions(Config *cfg) "DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory\n" "containing the font." ); - cs->setDefaultValue("FreeSans"); + cs->setDefaultValue("FreeSans.ttf"); cs->addDependency("HAVE_DOT"); //---- ci = cfg->addInt( diff --git a/src/diagram.cpp b/src/diagram.cpp index 96d057a..ce81a6c 100644 --- a/src/diagram.cpp +++ b/src/diagram.cpp @@ -161,19 +161,10 @@ static void writeMapArea(FTextStream &t,ClassDef *cd,QCString relPath, t << "<area "; if (!ref.isEmpty()) { - t << "target=\"_blank\" doxygen=\"" << ref << ":"; - if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; - t << "\" "; + t << externalLinkTarget() << externalRef(relPath,ref,FALSE); } t << "href=\""; - if (!ref.isEmpty()) - { - if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; - } - else - { - t << relPath; - } + t << externalRef(relPath,ref,TRUE); t << cd->getOutputFileBase() << Doxygen::htmlFileExtension << "\" "; t << "alt=\"" << convertToXML(cd->displayName()); t << "\" shape=\"rect\" coords=\"" << x << "," << y << ","; @@ -1253,11 +1244,14 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path, epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", epsBaseName.data(),epsBaseName.data()); //printf("Converting eps using `%s'\n",epstopdfCmd.data()); + portable_sysTimerStart(); if (portable_system("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); + portable_sysTimerStop(); return; } + portable_sysTimerStop(); } } diff --git a/src/docparser.cpp b/src/docparser.cpp index 6ac8ae4..8a8d0ad 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -287,10 +287,12 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type) epstopdfArgs.sprintf("\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"", outputDir.data(), baseName.data(), outputDir.data(), baseName.data()); + portable_sysTimerStart(); if (portable_system("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); } + portable_sysTimerStop(); return baseName; } } diff --git a/src/doctokenizer.l b/src/doctokenizer.l index d220395..e00d38b 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -16,6 +16,7 @@ * */ + %{ #include <qfile.h> @@ -181,7 +182,7 @@ static void handleHtmlTag() // Parse the name portion int i = startNamePos; - for (i=startNamePos; i < yyleng; i++) + for (i=startNamePos; i < (int)yyleng; i++) { // Check for valid HTML/XML name chars (including namespaces) char c = tagText.at(i); @@ -192,11 +193,11 @@ static void handleHtmlTag() // Parse the attributes. Each attribute is a name, value pair // The result is stored in g_token->attribs. int startName,endName,startAttrib,endAttrib; - while (i<yyleng) + while (i<(int)yyleng) { char c=tagText.at(i); // skip spaces - while (i<yyleng && isspace(c)) { c=tagText.at(++i); } + while (i<(int)yyleng && isspace(c)) { c=tagText.at(++i); } // check for end of the tag if (c == '>') break; // Check for XML style "empty" tag. @@ -207,43 +208,43 @@ static void handleHtmlTag() } startName=i; // search for end of name - while (i<yyleng && !isspace(c) && c!='=') { c=tagText.at(++i); } + while (i<(int)yyleng && !isspace(c) && c!='=') { c=tagText.at(++i); } endName=i; HtmlAttrib opt; opt.name = tagText.mid(startName,endName-startName).lower(); // skip spaces - while (i<yyleng && isspace(c)) { c=tagText.at(++i); } + while (i<(int)yyleng && isspace(c)) { c=tagText.at(++i); } if (tagText.at(i)=='=') // option has value { c=tagText.at(++i); // skip spaces - while (i<yyleng && isspace(c)) { c=tagText.at(++i); } + while (i<(int)yyleng && isspace(c)) { c=tagText.at(++i); } if (tagText.at(i)=='\'') // option '...' { c=tagText.at(++i); startAttrib=i; // search for matching quote - while (i<yyleng && c!='\'') { c=tagText.at(++i); } + while (i<(int)yyleng && c!='\'') { c=tagText.at(++i); } endAttrib=i; - if (i<yyleng) c=tagText.at(++i); + if (i<(int)yyleng) c=tagText.at(++i); } else if (tagText.at(i)=='"') // option "..." { c=tagText.at(++i); startAttrib=i; // search for matching quote - while (i<yyleng && c!='"') { c=tagText.at(++i); } + while (i<(int)yyleng && c!='"') { c=tagText.at(++i); } endAttrib=i; - if (i<yyleng) c=tagText.at(++i); + if (i<(int)yyleng) c=tagText.at(++i); } else // value without any quotes { startAttrib=i; // search for separator or end symbol - while (i<yyleng && !isspace(c) && c!='>') { c=tagText.at(++i); } + while (i<(int)yyleng && !isspace(c) && c!='>') { c=tagText.at(++i); } endAttrib=i; - if (i<yyleng) c=tagText.at(++i); + if (i<(int)yyleng) c=tagText.at(++i); } opt.value = tagText.mid(startAttrib,endAttrib-startAttrib); } diff --git a/src/dot.cpp b/src/dot.cpp index 5d9b975..565aa68 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -40,6 +40,11 @@ #include <qfile.h> #include "ftextstream.h" #include <md5.h> +#include <qqueue.h> + +#include <qthread.h> +#include <qmutex.h> +#include <qwaitcondition.h> #define MAP_CMD "cmapx" @@ -81,7 +86,7 @@ static const char *edgeStyleMap[] = static QCString getDotFontName() { static QCString dotFontName = Config_getString("DOT_FONTNAME"); - if (dotFontName.isEmpty()) dotFontName="FreeSans"; + if (dotFontName.isEmpty()) dotFontName="FreeSans.ttf"; return dotFontName; } @@ -151,7 +156,6 @@ static bool convertMapFile(FTextStream &t,const char *mapName, { QCString link = buf.mid(indexS+6,indexE-indexS-6); QCString result; - QCString *dest; if (urlOnly) // for user defined dot graphs { if (link.left(5)=="\\ref ") // \ref url @@ -159,15 +163,7 @@ static bool convertMapFile(FTextStream &t,const char *mapName, result="href=\""; // fake ref node to resolve the url DocRef *df = new DocRef( (DocNode*) 0, link.mid(5), context ); - if (!df->ref().isEmpty()) - { - if ((dest=Doxygen::tagDestinationDict[df->ref()])) - result += *dest + "/"; - } - else if (!relPath.isEmpty()) - { - result += relPath; - } + result+=externalRef(relPath,df->ref(),TRUE); if (!df->file().isEmpty()) result += df->file().data() + Doxygen::htmlFileExtension; if (!df->anchor().isEmpty()) @@ -189,19 +185,10 @@ static bool convertMapFile(FTextStream &t,const char *mapName, QCString url = link.mid(marker+1); if (!ref.isEmpty()) { - result = "target=\"_blank\" doxygen=\"" + ref + ":"; - if ((dest=Doxygen::tagDestinationDict[ref])) result += *dest + "/"; - result += "\" "; + result = externalLinkTarget() + externalRef(relPath,ref,FALSE); } result+= "href=\""; - if (!ref.isEmpty()) - { - if ((dest=Doxygen::tagDestinationDict[ref])) result += *dest + "/"; - } - else if (!relPath.isEmpty()) - { - result += relPath; - } + result+=externalRef(relPath,ref,TRUE); result+= url + "\""; } else // should not happen, but handle properly anyway @@ -298,30 +285,97 @@ static void unsetDotFontPath() g_dotFontPath=""; } -static bool readBoundingBoxEPS(const char *fileName,int *width,int *height) +static bool readBoundingBox(const char *fileName,int *width,int *height,bool isEps) { - QCString bb("%%PageBoundingBox:"); + QCString bb = isEps ? QCString("%%PageBoundingBox:") : QCString(" /MediaBox [ "); QFile f(fileName); - if (!f.open(IO_ReadOnly)) return FALSE; + if (!f.open(IO_ReadOnly|IO_Raw)) + { + //printf("readBoundingBox: could not open %s\n",fileName); + return FALSE; + } const int maxLineLen=1024; char buf[maxLineLen]; while (!f.atEnd()) { int numBytes = f.readLine(buf,maxLineLen-1); // read line - buf[numBytes]='\0'; - if (strncmp(buf,bb.data(),bb.length()-1)==0) // found PageBoundingBox string + if (numBytes>0) { - int x,y; - if (sscanf(buf+bb.length(),"%d %d %d %d",&x,&y,width,height)!=4) + buf[numBytes]='\0'; + if (strncmp(buf,bb.data(),bb.length()-1)==0) // found PageBoundingBox string { - return FALSE; + int x,y; + if (sscanf(buf+bb.length(),"%d %d %d %d",&x,&y,width,height)!=4) + { + //printf("readBoundingBox sscanf fail\n"); + return FALSE; + } + return TRUE; } - return TRUE; + } + else // read error! + { + //printf("Read error %d!\n",numBytes); + return FALSE; } } + //printf("readBoundingBox: bounding box not found\n"); return FALSE; } +static bool writeVecGfxFigure(FTextStream &out,const QCString &baseName, + const QCString &figureName) +{ + int width=420,height=600; + static bool usePdfLatex = Config_getBool("USE_PDFLATEX"); + if (usePdfLatex) + { + if (!readBoundingBox(figureName+".pdf",&width,&height,FALSE)) + { + //printf("writeVecGfxFigure()=0\n"); + return FALSE; + } + } + else + { + if (!readBoundingBox(figureName+".eps",&width,&height,TRUE)) + { + //printf("writeVecGfxFigure()=0\n"); + return FALSE; + } + } + //printf("Got PDF/EPS size %d,%d\n",width,height); + int maxWidth = 400; /* approx. page width in points, excl. margins */ + int maxHeight = 600; /* approx. page height in points, excl. margins */ + out << "\\nopagebreak\n" + "\\begin{figure}[H]\n" + "\\begin{center}\n" + "\\leavevmode\n"; + if (width>maxWidth || height>maxHeight) // figure too big for page + { + // c*width/maxWidth > c*height/maxHeight, where c=maxWidth*maxHeight>0 + if (width*maxHeight>height*maxWidth) + { + out << "\\includegraphics[width=" << maxWidth << "pt]"; + } + else + { + out << "\\includegraphics[height=" << maxHeight << "pt]"; + } + } + else + { + out << "\\includegraphics[width=" << width << "pt]"; + } + + out << "{" << baseName << "}\n" + "\\end{center}\n" + "\\end{figure}\n"; + + //printf("writeVecGfxFigure()=1\n"); + return TRUE; +} + // since dot silently reproduces the input file when it does not // support the PNG format, we need to check the result. static void checkDotResult(const QCString &imgName) @@ -355,6 +409,27 @@ static void checkDotResult(const QCString &imgName) } } +static bool insertMapFile(FTextStream &out,const QCString &mapFile, + const QCString &relPath,const QCString &mapLabel) +{ + QFileInfo fi(mapFile); + if (fi.exists() && fi.size()>0) // reuse existing map file + { + QGString tmpstr; + FTextStream tmpout(&tmpstr); + convertMapFile(tmpout,mapFile,relPath); + if (!tmpstr.isEmpty()) + { + out << "<map name=\"" << mapLabel << "\" id=\"" << mapLabel << "\">" << endl; + out << tmpstr; + out << "</map>" << endl; + } + return TRUE; + } + return FALSE; // no map file yet, need to generate it +} + + /*! Checks if a file "baseName".md5 exists. If so the contents * are compared with \a md5. If equal FALSE is returned. If the .md5 * file does not exist or its contents are not equal to \a md5, @@ -386,6 +461,24 @@ static bool checkAndUpdateMd5Signature(const QCString &baseName,const QCString & return TRUE; } +static bool checkDeliverables(const QCString &file1, + const QCString &file2=QCString()) +{ + bool file1Ok = TRUE; + bool file2Ok = TRUE; + if (!file1.isEmpty()) + { + QFileInfo fi(file1); + file1Ok = (fi.exists() && fi.size()>0); + } + if (!file2.isEmpty()) + { + QFileInfo fi(file2); + file2Ok = (fi.exists() && fi.size()>0); + } + return file1Ok && file2Ok; +} + //-------------------------------------------------------------------- class DotNodeList : public QList<DotNode> @@ -401,8 +494,13 @@ class DotNodeList : public QList<DotNode> //-------------------------------------------------------------------- -DotRunner::DotRunner(const char *file) : m_file(file) +DotRunner::DotRunner(const QCString &file,const QCString &path, + bool checkResult,const QCString &imageName) + : m_file(file), m_path(path), + m_checkResult(checkResult), m_imageName(imageName) { + static bool dotCleanUp = Config_getBool("DOT_CLEANUP"); + m_cleanUp = dotCleanUp; m_jobs.setAutoDelete(TRUE); } @@ -421,11 +519,12 @@ void DotRunner::addPostProcessing(const char *cmd,const char *args) bool DotRunner::run() { int exitCode=0; - static QCString dotExe = Config_getString("DOT_PATH")+"dot"; + static QCString dotExe = Config_getString("DOT_PATH")+"dot"; + static bool multiTargets = Config_getBool("DOT_MULTI_TARGETS"); QCString dotArgs; QListIterator<QCString> li(m_jobs); QCString *s; - if (Config_getBool("DOT_MULTI_TARGETS")) + if (multiTargets) { dotArgs="\""+m_file+"\""; for (li.toFirst();(s=li.current());++li) @@ -454,6 +553,12 @@ bool DotRunner::run() err("Error: Problems running '%s' as a post-processing step for dot output\n",m_postCmd.data()); return FALSE; } + if (m_checkResult) checkDotResult(m_imageName); + if (m_cleanUp) + { + //printf("removing dot file %s\n",m_file.data()); + QDir(m_path).remove(m_file); + } return TRUE; error: err("Problems running dot: exit code=%d, command='%s', arguments='%s'\n", @@ -463,6 +568,311 @@ error: //-------------------------------------------------------------------- +DotMapConverter::DotMapConverter(const char *patchFile) + : m_patchFile(patchFile) +{ + m_maps.setAutoDelete(TRUE); +} + +int DotMapConverter::addMap(const QCString &mapFile,const QCString &relPath, + bool urlOnly,const QCString &context,const QCString &label) +{ + int id = m_maps.count(); + Map *map = new Map; + map->mapFile = mapFile; + map->relPath = relPath; + map->urlOnly = urlOnly; + map->context = context; + map->label = label; + m_maps.append(map); + return id; +} + +int DotMapConverter::addFigure(const QCString &baseName, + const QCString &figureName,bool heightCheck) +{ + int id = m_maps.count(); + Map *map = new Map; + map->mapFile = figureName; + map->urlOnly = heightCheck; + map->label = baseName; + m_maps.append(map); + return id; +} + +bool DotMapConverter::run() +{ + //printf("DotMapConverter::run(): %s\n",m_patchFile.data()); + QCString tmpName = m_patchFile+".tmp"; + if (!QDir::current().rename(m_patchFile,tmpName)) + { + err("Failed to rename file %s to %s!\n",m_patchFile.data(),tmpName.data()); + return FALSE; + } + QFile fi(tmpName); + QFile fo(m_patchFile); + if (!fi.open(IO_ReadOnly)) + { + err("Error opening file %s for patching!\n",tmpName.data()); + QDir::current().rename(tmpName,m_patchFile); + return FALSE; + } + if (!fo.open(IO_WriteOnly)) + { + err("Error opening file %s for patching!\n",m_patchFile.data()); + QDir::current().rename(tmpName,m_patchFile); + return FALSE; + } + FTextStream t(&fo); + const int maxLineLen=100*1024; + while (!fi.atEnd()) // foreach line + { + QCString line(maxLineLen); + int numBytes = fi.readLine(line.data(),maxLineLen); + int i; + ASSERT(numBytes<maxLineLen); + if ((i=line.find("<!-- MAP"))!=-1) + { + int mapId=-1; + int n = sscanf(line,"<!-- MAP %d",&mapId); + if (n==1 && mapId>=0 && mapId<(int)m_maps.count()) + { + Map *map = m_maps.at(mapId); + //printf("patching MAP %d in file %s with contents of %s\n", + // mapId,m_patchFile.data(),map->mapFile.data()); + t << "<map name=\"" << map->label << "\" id=\"" << map->label << "\">" << endl; + convertMapFile(t,map->mapFile,map->relPath,map->urlOnly,map->context); + t << "</map>" << endl; + } + else // error invalid map id! + { + err("Found invalid MAP id in file %s!\n",mapId,m_patchFile.data()); + t << line; + } + } + else if ((i=line.find("% FIG"))!=-1) + { + int mapId=-1; + int n = sscanf(line.data()+i+2,"FIG %d",&mapId); + //printf("line='%s' n=%d\n",line.data()+i,n); + if (n==1 && mapId>=0 && mapId<(int)m_maps.count()) + { + Map *map = m_maps.at(mapId); + //printf("patching FIG %d in file %s with contents of %s\n", + // mapId,m_patchFile.data(),map->mapFile.data()); + writeVecGfxFigure(t,map->label,map->mapFile); + } + else // error invalid map id! + { + err("Found invalid bounding FIG id in file %s!\n",mapId,m_patchFile.data()); + t << line; + } + } + else + { + t << line; + } + } + fi.close(); + QDir::current().remove(tmpName); + return TRUE; +} + +//-------------------------------------------------------------------- + +void DotRunnerQueue::enqueue(DotRunner *runner) +{ + QMutexLocker locker(&m_mutex); + m_queue.enqueue(runner); + m_bufferNotEmpty.wakeAll(); +} + +DotRunner *DotRunnerQueue::dequeue() +{ + QMutexLocker locker(&m_mutex); + while (m_queue.isEmpty()) + { + // wait until something is added to the queue + m_bufferNotEmpty.wait(&m_mutex); + } + DotRunner *result = m_queue.dequeue(); + return result; +} + +uint DotRunnerQueue::count() const +{ + QMutexLocker locker(&m_mutex); + return m_queue.count(); +} + +//-------------------------------------------------------------------- + +DotWorkerThread::DotWorkerThread(int id,DotRunnerQueue *queue) + : m_id(id), m_queue(queue) +{ +} + +void DotWorkerThread::run() +{ + DotRunner *runner; + while ((runner=m_queue->dequeue())) + { + runner->run(); + } +} + +//-------------------------------------------------------------------- + +DotManager *DotManager::m_theInstance = 0; + +DotManager *DotManager::instance() +{ + if (!m_theInstance) + { + m_theInstance = new DotManager; + } + return m_theInstance; +} + +DotManager::DotManager() : m_dotMaps(1007) +{ + m_dotRuns.setAutoDelete(TRUE); + m_dotMaps.setAutoDelete(TRUE); + m_queue = new DotRunnerQueue; + int i; + int numThreads = QMIN(32,Config_getInt("DOT_NUM_THREADS")); + if (numThreads==0) numThreads = QMAX(1,QThread::idealThreadCount()+1); + for (i=0;i<numThreads;i++) + { + DotWorkerThread *thread = new DotWorkerThread(i,m_queue); + thread->start(); + if (thread->isRunning()) + { + m_workers.append(thread); + } + else // no more threads available! + { + delete thread; + } + } + ASSERT(m_workers.count()>0); +} + +DotManager::~DotManager() +{ + delete m_queue; +} + +void DotManager::addRun(DotRunner *run) +{ + m_dotRuns.append(run); +} + +int DotManager::addMap(const QCString &file,const QCString &mapFile, + const QCString &relPath,bool urlOnly,const QCString &context, + const QCString &label) +{ + DotMapConverter *map = m_dotMaps.find(file); + if (map==0) + { + map = new DotMapConverter(file); + m_dotMaps.append(file,map); + } + return map->addMap(mapFile,relPath,urlOnly,context,label); +} + +int DotManager::addFigure(const QCString &file,const QCString &baseName, + const QCString &figureName,bool heightCheck) +{ + DotMapConverter *map = m_dotMaps.find(file); + if (map==0) + { + map = new DotMapConverter(file); + m_dotMaps.append(file,map); + } + return map->addFigure(baseName,figureName,heightCheck); +} + +bool DotManager::run() +{ + msg("Generating dot graphs using %d parallel threads...\n",m_workers.count()); + uint numDotRuns = m_dotRuns.count(); + uint numDotMaps = m_dotMaps.count(); + int i=1; + QListIterator<DotRunner> li(m_dotRuns); + + bool setPath=FALSE; + if (Config_getBool("GENERATE_HTML")) + { + setDotFontPath(Config_getString("HTML_OUTPUT")); + setPath=TRUE; + } + else if (Config_getBool("GENERATE_LATEX")) + { + setDotFontPath(Config_getString("LATEX_OUTPUT")); + setPath=TRUE; + } + else if (Config_getBool("GENERATE_RTF")) + { + setDotFontPath(Config_getString("RTF_OUTPUT")); + setPath=TRUE; + } + portable_sysTimerStart(); + // fill work queue with dot operations + DotRunner *dr; + for (li.toFirst();(dr=li.current());++li) + { + m_queue->enqueue(dr); + } + int prev=1; + // wait for the queue to become empty + while ((i=m_queue->count())>0) + { + i = numDotRuns - i; + while (i>=prev) + { + msg("Running dot for graph %d/%d\n",prev,numDotRuns); + prev++; + } + portable_sleep(100); + } + while ((int)numDotRuns>=prev) + { + msg("Running dot for graph %d/%d\n",prev,numDotRuns); + prev++; + } + // signal the workers we are done + for (i=0;i<(int)m_workers.count();i++) + { + m_queue->enqueue(0); // add terminator for each worker + } + // wait for the workers to finish + for (i=0;i<(int)m_workers.count();i++) + { + m_workers.at(i)->wait(); + } + portable_sysTimerStop(); + if (setPath) + { + unsetDotFontPath(); + } + + // patch the output file and insert the maps and figures + i=1; + SDict<DotMapConverter>::Iterator di(m_dotMaps); + DotMapConverter *map; + for (di.toFirst();(map=di.current());++di) + { + msg("Inserting map/figure %d/%d\n",i,numDotMaps); + if (!map->run()) return FALSE; + i++; + } + return TRUE; +} + + +//-------------------------------------------------------------------- + /*! helper function that deletes all nodes in a connected graph, given * one of the graph's nodes @@ -1101,7 +1511,8 @@ const DotNode *DotNode::findDocNode() const int DotGfxHierarchyTable::m_curNodeNumber; -void DotGfxHierarchyTable::writeGraph(FTextStream &out,const char *path) const +void DotGfxHierarchyTable::writeGraph(FTextStream &out, + const char *path,const char *fileName) const { //printf("DotGfxHierarchyTable::writeGraph(%s)\n",name); //printf("m_rootNodes=%p count=%d\n",m_rootNodes,m_rootNodes->count()); @@ -1113,11 +1524,6 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out,const char *path) const { err("Error: Output dir %s does not exist!\n",path); exit(1); } - setDotFontPath(d.absPath()); - //QCString oldDir = convertToQCString(QDir::currentDirPath()); - // go to the html output directory (i.e. path) - //QDir::setCurrent(d.absPath()); - //QDir thisDir; // put each connected subgraph of the hierarchy in a row of the HTML output out << "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\">" << endl; @@ -1142,7 +1548,6 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out,const char *path) const // compute md5 checksum of the graph were are about to generate QGString theGraph; FTextStream md5stream(&theGraph); - //md5stream.setEncoding(md5stream.UnicodeUTF8); writeGraphHeader(md5stream); md5stream << " rankdir=LR;" << endl; for (dnli2.toFirst();(node=dnli2.current());++dnli2) @@ -1165,44 +1570,42 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out,const char *path) const QCString sigStr(33); MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig); MD5SigToString(md5_sig,sigStr.data(),33); + bool regenerate=FALSE; if (checkAndUpdateMd5Signature(absBaseName,sigStr) || - !QFileInfo(absMapName).exists()) + !checkDeliverables(absMapName)) { + regenerate=TRUE; // image was new or has changed QCString dotName=absBaseName+".dot"; QFile f(dotName); if (!f.open(IO_WriteOnly)) return; FTextStream t(&f); - //t.setEncoding(t.UnicodeUTF8); t << theGraph; f.close(); resetReNumbering(); - DotRunner dotRun(dotName); - dotRun.addJob(imgExt,absImgName); - dotRun.addJob(MAP_CMD,absMapName); - if (!dotRun.run()) - { - out << "</table>" << endl; - unsetDotFontPath(); - return; - } - checkDotResult(absImgName); - if (Config_getBool("DOT_CLEANUP")) d.remove(dotName); + DotRunner *dotRun = new DotRunner(dotName,d.absPath().data(),TRUE,absImgName); + dotRun->addJob(imgExt,absImgName); + dotRun->addJob(MAP_CMD,absMapName); + DotManager::instance()->addRun(dotRun); + } Doxygen::indexList.addImageFile(imgName); // write image and map in a table row QCString mapLabel = escapeCharsInString(n->m_label,FALSE); out << "<tr><td><img src=\"" << imgName << "\" border=\"0\" alt=\"\" usemap=\"#" - << mapLabel << "_map\"/>" << endl; - out << "<map name=\"" << mapLabel << "_map\" id=\"" << mapLabel << "\">" << endl; - convertMapFile(out,absMapName,""); - out << "</map></td></tr>" << endl; - //thisDir.remove(mapName); + << mapLabel << "\"/>" << endl; + + if (regenerate || !insertMapFile(out,absMapName,QCString(),mapLabel)) + { + int mapId = DotManager::instance()->addMap(fileName,absMapName,QCString(), + FALSE,QCString(),mapLabel); + out << "<!-- MAP " << mapId << " -->" << endl; + } + + out << "</td></tr>" << endl; } out << "</table>" << endl; - - unsetDotFontPath(); } void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd,bool hideSuper) @@ -1779,7 +2182,6 @@ QCString computeMd5Signature(DotNode *root, //printf("computeMd5Signature\n"); QGString buf; FTextStream md5stream(&buf); - //md5stream.setEncoding(md5stream.UnicodeUTF8); writeGraphHeader(md5stream); if (lrRank) { @@ -1855,7 +2257,6 @@ static bool updateDotGraph(DotNode *root, if (f.open(IO_WriteOnly)) { FTextStream t(&f); - //t.setEncoding(t.UnicodeUTF8); t << theGraph; } return TRUE; @@ -1887,6 +2288,7 @@ QCString DotClassGraph::diskName() const QCString DotClassGraph::writeGraph(FTextStream &out, GraphOutputFormat format, const char *path, + const char *fileName, const char *relPath, bool /*isTBRank*/, bool generateImageMap) const @@ -1897,7 +2299,7 @@ QCString DotClassGraph::writeGraph(FTextStream &out, { err("Error: Output dir %s does not exist!\n",path); exit(1); } - setDotFontPath(d.absPath()); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); QCString baseName; QCString mapName; @@ -1917,10 +2319,16 @@ QCString DotClassGraph::writeGraph(FTextStream &out, break; } baseName = convertNameToFile(diskName()); - QCString absBaseName = QCString(d.absPath().data())+"/"+baseName; QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString absBaseName = QCString(d.absPath())+"/"+baseName; + QCString absDotName = absBaseName+".dot"; + QCString absMapName = absBaseName+".map"; + QCString absPdfName = absBaseName+".pdf"; + QCString absEpsName = absBaseName+".eps"; + QCString absImgName = absBaseName+"."+imgExt; + bool regenerate = FALSE; if (updateDotGraph(m_startNode, m_graphType, absBaseName, @@ -1928,44 +2336,37 @@ QCString DotClassGraph::writeGraph(FTextStream &out, m_lrRank, m_graphType==DotNode::Inheritance, TRUE - ) - ) + ) || + !checkDeliverables(format==BITMAP ? absImgName : + usePDFLatex ? absPdfName : absEpsName, + format==BITMAP && generateImageMap ? absMapName : QCString()) + ) { + regenerate=TRUE; if (format==BITMAP) // run dot to create a bitmap image { QCString dotArgs(maxCmdLine); - QCString absImgName = absBaseName+"."+imgExt; - DotRunner dotRun(absBaseName+".dot"); - dotRun.addJob(imgExt,absImgName); - if (generateImageMap) dotRun.addJob(MAP_CMD,absBaseName+".map"); - if (!dotRun.run()) - { - unsetDotFontPath(); - return baseName; - } - checkDotResult(absImgName); + DotRunner *dotRun = new DotRunner(absDotName, + d.absPath().data(),TRUE,absImgName); + dotRun->addJob(imgExt,absImgName); + if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName); + DotManager::instance()->addRun(dotRun); + } else if (format==EPS) // run dot to create a .eps image { - DotRunner dotRun(absBaseName+".dot"); - dotRun.addJob("ps",absBaseName+".eps"); - - if (Config_getBool("USE_PDFLATEX")) + DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE); + if (usePDFLatex) { - QCString epstopdfArgs(maxCmdLine); - epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - absBaseName.data(),absBaseName.data()); - dotRun.addPostProcessing("epstopdf",epstopdfArgs); + dotRun->addJob("pdf",absPdfName); } - - if (!dotRun.run()) + else { - unsetDotFontPath(); - return baseName; + dotRun->addJob("ps",absEpsName); } + DotManager::instance()->addRun(dotRun); } - if (Config_getBool("DOT_CLEANUP")) d.remove(baseName+".dot"); } Doxygen::indexList.addImageFile(baseName+"."+imgExt); @@ -1989,49 +2390,21 @@ QCString DotClassGraph::writeGraph(FTextStream &out, break; } out << "\"/></div>" << endl; - QGString tmpstr; - FTextStream tmpout(&tmpstr); - convertMapFile(tmpout,absBaseName+".map",relPath); - if (!tmpstr.isEmpty()) + if (regenerate || !insertMapFile(out,absMapName,relPath,mapLabel)) { - out << "<map name=\"" << mapLabel << "\" id=\"" << mapLabel << "\">" << endl; - out << tmpstr; - out << "</map>" << endl; + int mapId = DotManager::instance()->addMap(fileName,absMapName,relPath, + FALSE,QCString(),mapLabel); + out << "<!-- MAP " << mapId << " -->" << endl; } } else if (format==EPS) // produce tex to include the .eps image { - int width=420,height=600; - if (!readBoundingBoxEPS(absBaseName+".eps",&width,&height)) - { - err("Error: Could not extract bounding box from .eps!\n"); - unsetDotFontPath(); - return baseName; - } - //printf("Got EPS size %d,%d\n",width,height); - int maxWidth = 400; /* approx. page width in points, excl. margins */ - int maxHeight = 400; /* approx. page height in points, excl. margins */ - out << "\\nopagebreak\n" - "\\begin{figure}[H]\n" - "\\begin{center}\n" - "\\leavevmode\n"; - if (width>maxWidth) - { - out << "\\includegraphics[width=" << maxWidth << "pt]"; - } - else if (height>maxHeight) - { - out << "\\includegraphics[height=" << maxHeight << "pt]"; - } - else - { - out << "\\includegraphics[width=" << width << "pt]"; - } - out << "{" << baseName << "}\n" - "\\end{center}\n" - "\\end{figure}\n"; + if (regenerate || !writeVecGfxFigure(out,baseName,absBaseName)) + { + int figId = DotManager::instance()->addFigure(fileName,baseName,absBaseName,FALSE /*TRUE*/); + out << endl << "% FIG " << figId << endl; + } } - unsetDotFontPath(); return baseName; } @@ -2225,6 +2598,7 @@ QCString DotInclDepGraph::diskName() const QCString DotInclDepGraph::writeGraph(FTextStream &out, GraphOutputFormat format, const char *path, + const char *fileName, const char *relPath, bool generateImageMap ) const @@ -2235,7 +2609,7 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out, { err("Error: Output dir %s does not exist!\n",path); exit(1); } - setDotFontPath(d.absPath()); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); QCString baseName=m_diskName; if (m_inverse) baseName+="_dep"; @@ -2243,11 +2617,16 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out, baseName=convertNameToFile(baseName); QCString mapName=escapeCharsInString(m_startNode->m_label,FALSE); if (m_inverse) mapName+="dep"; - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString absBaseName = QCString(d.absPath())+"/"+baseName; - QCString absMapName = QCString(d.absPath())+"/"+mapName; + QCString absDotName = absBaseName+".dot"; + QCString absMapName = absBaseName+".map"; + QCString absPdfName = absBaseName+".pdf"; + QCString absEpsName = absBaseName+".eps"; + QCString absImgName = absBaseName+"."+imgExt; + bool regenerate = FALSE; if (updateDotGraph(m_startNode, DotNode::Dependency, absBaseName, @@ -2255,42 +2634,36 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out, FALSE, // lrRank FALSE, // renderParents m_inverse // backArrows - ) - ) + ) || + !checkDeliverables(format==BITMAP ? absImgName : + usePDFLatex ? absPdfName : absEpsName, + format==BITMAP && generateImageMap ? absMapName : QCString()) + ) { + regenerate=TRUE; if (format==BITMAP) { // run dot to create a bitmap image QCString dotArgs(maxCmdLine); - QCString absImgName=absBaseName+"."+imgExt; - DotRunner dotRun(absBaseName+".dot"); - dotRun.addJob(imgExt,absImgName); - if (generateImageMap) dotRun.addJob(MAP_CMD,absBaseName+".map"); - if (!dotRun.run()) - { - unsetDotFontPath(); - return baseName; - } - checkDotResult(absImgName); + DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName); + dotRun->addJob(imgExt,absImgName); + if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName); + DotManager::instance()->addRun(dotRun); } else if (format==EPS) { - // run dot to create a .eps image - DotRunner dotRun(absBaseName+".dot"); - dotRun.addJob("ps",absBaseName+".eps"); - if (Config_getBool("USE_PDFLATEX")) + DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE); + if (usePDFLatex) { - QCString epstopdfArgs(maxCmdLine); - epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - absBaseName.data(),absBaseName.data()); - dotRun.addPostProcessing("epstopdf",epstopdfArgs); + dotRun->addJob("pdf",absPdfName); } - if (!dotRun.run()) + else { - unsetDotFontPath(); - return baseName; + dotRun->addJob("ps",absEpsName); } - } + DotManager::instance()->addRun(dotRun); + + } } Doxygen::indexList.addImageFile(baseName+"."+imgExt); @@ -2298,43 +2671,27 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out, { out << "<div class=\"center\"><img src=\"" << relPath << baseName << "." << imgExt << "\" border=\"0\" usemap=\"#" - << mapName << "_map\" alt=\"\"/>"; + << mapName << "\" alt=\"\"/>"; out << "</div>" << endl; - QGString tmpstr; - FTextStream tmpout(&tmpstr); - //tmpout.setEncoding(tmpout.UnicodeUTF8); - convertMapFile(tmpout,absBaseName+".map",relPath); - if (!tmpstr.isEmpty()) + + QCString absMapName = absBaseName+".map"; + if (regenerate || !insertMapFile(out,absMapName,relPath,mapName)) { - out << "<map name=\"" << mapName << "_map\" id=\"" << mapName << "\">" << endl; - out << tmpstr; - out << "</map>" << endl; + int mapId = DotManager::instance()->addMap(fileName,absMapName,relPath, + FALSE,QCString(),mapName); + out << "<!-- MAP " << mapId << " -->" << endl; } + } else if (format==EPS) { - int width,height; - if (!readBoundingBoxEPS(absBaseName+".eps",&width,&height)) + if (regenerate || !writeVecGfxFigure(out,baseName,absBaseName)) { - err("Error: Could not extract bounding box from .eps!\n"); - unsetDotFontPath(); - return baseName; + int figId = DotManager::instance()->addFigure(fileName,baseName,absBaseName,FALSE); + out << endl << "% FIG " << figId << endl; } - int maxWidth = 420; /* approx. page width in points */ - - out << "\\nopagebreak\n" - "\\begin{figure}[H]\n" - "\\begin{center}\n" - "\\leavevmode\n" - "\\includegraphics[width=" << QMIN(width/2,maxWidth) - << "pt]{" << baseName << "}\n" - "\\end{center}\n" - "\\end{figure}\n"; } - if (Config_getBool("DOT_CLEANUP")) d.remove(baseName+".dot"); - - unsetDotFontPath(); return baseName; } @@ -2518,7 +2875,8 @@ DotCallGraph::~DotCallGraph() } QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat format, - const char *path,const char *relPath,bool generateImageMap) const + const char *path,const char *fileName, + const char *relPath,bool generateImageMap) const { QDir d(path); // store the original directory @@ -2526,14 +2884,20 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat format, { err("Error: Output dir %s does not exist!\n",path); exit(1); } - setDotFontPath(d.absPath()); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); QCString baseName = m_diskName + (m_inverse ? "_icgraph" : "_cgraph"); - QCString mapName=baseName; - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString mapName = baseName; + QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString absBaseName = QCString(d.absPath())+"/"+baseName; + QCString absDotName = absBaseName+".dot"; + QCString absMapName = absBaseName+".map"; + QCString absPdfName = absBaseName+".pdf"; + QCString absEpsName = absBaseName+".eps"; + QCString absImgName = absBaseName+"."+imgExt; + bool regenerate=FALSE; if (updateDotGraph(m_startNode, DotNode::CallGraph, absBaseName, @@ -2541,41 +2905,37 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat format, TRUE, // lrRank FALSE, // renderParents m_inverse // backArrows - ) - ) + ) || + !checkDeliverables(format==BITMAP ? absImgName : + usePDFLatex ? absPdfName : absEpsName, + format==BITMAP && generateImageMap ? absMapName : QCString()) + ) { + regenerate=TRUE; if (format==BITMAP) { // run dot to create a bitmap image QCString dotArgs(maxCmdLine); - QCString absImgName=absBaseName+"."+imgExt; - DotRunner dotRun(absBaseName+".dot"); - dotRun.addJob(imgExt,absImgName); - if (generateImageMap) dotRun.addJob(MAP_CMD,absBaseName+".map"); - if (!dotRun.run()) - { - unsetDotFontPath(); - return baseName; - } - checkDotResult(absImgName); + DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName); + dotRun->addJob(imgExt,absImgName); + if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName); + DotManager::instance()->addRun(dotRun); + } else if (format==EPS) { // run dot to create a .eps image - DotRunner dotRun(absBaseName+".dot"); - dotRun.addJob("ps",absBaseName+".eps"); - if (Config_getBool("USE_PDFLATEX")) + DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE); + if (usePDFLatex) { - QCString epstopdfArgs(maxCmdLine); - epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - absBaseName.data(),absBaseName.data()); - dotRun.addPostProcessing("epstopdf",epstopdfArgs); + dotRun->addJob("pdf",absPdfName); } - if (!dotRun.run()) + else { - unsetDotFontPath(); - return baseName; + dotRun->addJob("ps",absEpsName); } + DotManager::instance()->addRun(dotRun); + } } Doxygen::indexList.addImageFile(baseName+"."+imgExt); @@ -2584,44 +2944,27 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat format, { out << "<div class=\"center\"><img src=\"" << relPath << baseName << "." << imgExt << "\" border=\"0\" usemap=\"#" - << mapName << "_map\" alt=\""; + << mapName << "\" alt=\""; out << "\"/>"; out << "</div>" << endl; - QGString tmpstr; - FTextStream tmpout(&tmpstr); - //tmpout.setEncoding(tmpout.UnicodeUTF8); - convertMapFile(tmpout,absBaseName+".map",relPath); - if (!tmpstr.isEmpty()) + + if (regenerate || !insertMapFile(out,absMapName,relPath,mapName)) { - out << "<map name=\"" << mapName << "_map\" id=\"" << mapName << "\">" << endl; - out << tmpstr; - out << "</map>" << endl; + int mapId = DotManager::instance()->addMap(fileName,absMapName,relPath, + FALSE,QCString(),mapName); + out << "<!-- MAP " << mapId << " -->" << endl; } + } else if (format==EPS) { - int width,height; - if (!readBoundingBoxEPS(absBaseName+".eps",&width,&height)) + if (regenerate || !writeVecGfxFigure(out,baseName,absBaseName)) { - err("Error: Could not extract bounding box from .eps!\n"); - unsetDotFontPath(); - return baseName; + int figId = DotManager::instance()->addFigure(fileName,baseName,absBaseName,FALSE); + out << endl << "% FIG " << figId << endl; } - int maxWidth = 420; /* approx. page width in points */ - - out << "\\nopagebreak\n" - "\\begin{figure}[H]\n" - "\\begin{center}\n" - "\\leavevmode\n" - "\\includegraphics[width=" << QMIN(width/2,maxWidth) - << "pt]{" << baseName << "}\n" - "\\end{center}\n" - "\\end{figure}\n"; } - if (Config_getBool("DOT_CLEANUP")) d.remove(baseName+".dot"); - - unsetDotFontPath(); return baseName; } @@ -2650,6 +2993,7 @@ DotDirDeps::~DotDirDeps() QCString DotDirDeps::writeGraph(FTextStream &out, GraphOutputFormat format, const char *path, + const char *fileName, const char *relPath, bool generateImageMap) const { @@ -2659,58 +3003,66 @@ QCString DotDirDeps::writeGraph(FTextStream &out, { err("Error: Output dir %s does not exist!\n",path); exit(1); } - setDotFontPath(d.absPath()); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); QCString baseName=m_dir->getOutputFileBase()+"_dep"; QCString mapName=escapeCharsInString(baseName,FALSE); - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString absBaseName = QCString(d.absPath())+"/"+baseName; - - // TODO: create check, update md5 checksum + QCString absDotName = absBaseName+".dot"; + QCString absMapName = absBaseName+".map"; + QCString absPdfName = absBaseName+".pdf"; + QCString absEpsName = absBaseName+".eps"; + QCString absImgName = absBaseName+"."+imgExt; + + // compute md5 checksum of the graph were are about to generate + QGString theGraph; + FTextStream md5stream(&theGraph); + m_dir->writeDepGraph(md5stream); + uchar md5_sig[16]; + QCString sigStr(33); + MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig); + MD5SigToString(md5_sig,sigStr.data(),33); + bool regenerate=FALSE; + if (checkAndUpdateMd5Signature(absBaseName,sigStr) || + !checkDeliverables(format==BITMAP ? absImgName : + usePDFLatex ? absPdfName : absEpsName, + format==BITMAP && generateImageMap ? absMapName : QCString()) + ) { - QFile f(absBaseName+".dot"); + regenerate=TRUE; + + QFile f(absDotName); if (!f.open(IO_WriteOnly)) { err("Cannot create file %s.dot for writing!\n",baseName.data()); } FTextStream t(&f); - //t.setEncoding(t.UnicodeUTF8); - m_dir->writeDepGraph(t); + t << theGraph.data(); f.close(); if (format==BITMAP) { // run dot to create a bitmap image QCString dotArgs(maxCmdLine); - QCString absImgName=absBaseName+"."+imgExt; - DotRunner dotRun(absBaseName+".dot"); - dotRun.addJob(imgExt,absImgName); - if (generateImageMap) dotRun.addJob(MAP_CMD,absBaseName+".map"); - if (!dotRun.run()) - { - unsetDotFontPath(); - return baseName; - } - checkDotResult(absImgName); + DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName); + dotRun->addJob(imgExt,absImgName); + if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName); + DotManager::instance()->addRun(dotRun); } else if (format==EPS) { - // run dot to create a .eps image - DotRunner dotRun(absBaseName+".dot"); - dotRun.addJob("ps",absBaseName+".eps"); - if (Config_getBool("USE_PDFLATEX")) + DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE); + if (usePDFLatex) { - QCString epstopdfArgs(maxCmdLine); - epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - absBaseName.data(),absBaseName.data()); - dotRun.addPostProcessing("epstopdf",epstopdfArgs); + dotRun->addJob("pdf",absPdfName); } - if (!dotRun.run()) + else { - unsetDotFontPath(); - return baseName; + dotRun->addJob("ps",absEpsName); } + DotManager::instance()->addRun(dotRun); } } Doxygen::indexList.addImageFile(baseName+"."+imgExt); @@ -2719,50 +3071,27 @@ QCString DotDirDeps::writeGraph(FTextStream &out, { out << "<div class=\"center\"><img src=\"" << relPath << baseName << "." << imgExt << "\" border=\"0\" usemap=\"#" - << mapName << "_map\" alt=\""; + << mapName << "\" alt=\""; out << convertToXML(m_dir->displayName()); out << "\"/>"; out << "</div>" << endl; - QGString tmpstr; - FTextStream tmpout(&tmpstr); - //tmpout.setEncoding(tmpout.UnicodeUTF8); - convertMapFile(tmpout,absBaseName+".map",relPath,TRUE); - if (!tmpstr.isEmpty()) - { - out << "<map name=\"" << mapName << "_map\" id=\"" << mapName << "\">" << endl; - out << tmpstr; - out << "</map>" << endl; - } - else + + if (regenerate || !insertMapFile(out,absMapName,relPath,mapName)) { - //printf("Map is empty!\n"); + int mapId = DotManager::instance()->addMap(fileName,absMapName,relPath, + TRUE,QCString(),mapName); + out << "<!-- MAP " << mapId << " -->" << endl; } - //thisDir.remove(baseName+".map"); } else if (format==EPS) { - int width,height; - if (!readBoundingBoxEPS(absBaseName+".eps",&width,&height)) + if (regenerate || !writeVecGfxFigure(out,baseName,absBaseName)) { - err("Error: Could not extract bounding box from .eps!\n"); - unsetDotFontPath(); - return baseName; + int figId = DotManager::instance()->addFigure(fileName,baseName,absBaseName,FALSE); + out << endl << "% FIG " << figId << endl; } - int maxWidth = 420; /* approx. page width in points */ - - out << "\\nopagebreak\n" - "\\begin{figure}[H]\n" - "\\begin{center}\n" - "\\leavevmode\n" - "\\includegraphics[width=" << QMIN(width/2,maxWidth) - << "pt]{" << baseName << "}\n" - "\\end{center}\n" - "\\end{figure}\n"; } - if (Config_getBool("DOT_CLEANUP")) d.remove(baseName+".dot"); - - unsetDotFontPath(); return baseName; } @@ -2775,58 +3104,65 @@ bool DotDirDeps::isTrivial() const void generateGraphLegend(const char *path) { - QFile dotFile((QCString)path+"/graph_legend.dot"); - if (!dotFile.open(IO_WriteOnly)) - { - err("Could not open file %s for writing\n", - convertToQCString(dotFile.name()).data()); - return; - } - FTextStream dotText(&dotFile); - writeGraphHeader(dotText); - dotText << " Node9 [shape=\"box\",label=\"Inherited\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",fillcolor=\"grey75\",style=\"filled\" fontcolor=\"black\"];\n"; - dotText << " Node10 -> Node9 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n"; - dotText << " Node10 [shape=\"box\",label=\"PublicBase\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classPublicBase" << Doxygen::htmlFileExtension << "\"];\n"; - dotText << " Node11 -> Node10 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n"; - dotText << " Node11 [shape=\"box\",label=\"Truncated\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"red\",URL=\"$classTruncated" << Doxygen::htmlFileExtension << "\"];\n"; - dotText << " Node13 -> Node9 [dir=back,color=\"darkgreen\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n"; - dotText << " Node13 [shape=\"box\",label=\"ProtectedBase\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classProtectedBase" << Doxygen::htmlFileExtension << "\"];\n"; - dotText << " Node14 -> Node9 [dir=back,color=\"firebrick4\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n"; - dotText << " Node14 [shape=\"box\",label=\"PrivateBase\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classPrivateBase" << Doxygen::htmlFileExtension << "\"];\n"; - dotText << " Node15 -> Node9 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n"; - dotText << " Node15 [shape=\"box\",label=\"Undocumented\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"grey75\"];\n"; - dotText << " Node16 -> Node9 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n"; - dotText << " Node16 [shape=\"box\",label=\"Templ< int >\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classTempl" << Doxygen::htmlFileExtension << "\"];\n"; - dotText << " Node17 -> Node16 [dir=back,color=\"orange\",fontsize=\"" << FONTSIZE << "\",style=\"dashed\",label=\"< int >\",fontname=\"" << FONTNAME << "\"];\n"; - dotText << " Node17 [shape=\"box\",label=\"Templ< T >\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classTempl" << Doxygen::htmlFileExtension << "\"];\n"; - dotText << " Node18 -> Node9 [dir=back,color=\"darkorchid3\",fontsize=\"" << FONTSIZE << "\",style=\"dashed\",label=\"m_usedClass\",fontname=\"" << FONTNAME << "\"];\n"; - dotText << " Node18 [shape=\"box\",label=\"Used\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classUsed" << Doxygen::htmlFileExtension << "\"];\n"; - writeGraphFooter(dotText); - dotFile.close(); - QDir d(path); // store the original directory if (!d.exists()) { err("Error: Output dir %s does not exist!\n",path); exit(1); } - setDotFontPath(d.absPath()); - // run dot to generate the a bitmap image from the graph - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); - QCString imgName = "graph_legend."+imgExt; - QCString absImgName = QCString(d.absPath())+"/"+ imgName; - - DotRunner dotRun(d.absPath()+"/graph_legend.dot"); - dotRun.addJob(imgExt,absImgName); - if (!dotRun.run()) + QGString theGraph; + FTextStream md5stream(&theGraph); + writeGraphHeader(md5stream); + md5stream << " Node9 [shape=\"box\",label=\"Inherited\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",fillcolor=\"grey75\",style=\"filled\" fontcolor=\"black\"];\n"; + md5stream << " Node10 -> Node9 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n"; + md5stream << " Node10 [shape=\"box\",label=\"PublicBase\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classPublicBase" << Doxygen::htmlFileExtension << "\"];\n"; + md5stream << " Node11 -> Node10 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n"; + md5stream << " Node11 [shape=\"box\",label=\"Truncated\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"red\",URL=\"$classTruncated" << Doxygen::htmlFileExtension << "\"];\n"; + md5stream << " Node13 -> Node9 [dir=back,color=\"darkgreen\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n"; + md5stream << " Node13 [shape=\"box\",label=\"ProtectedBase\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classProtectedBase" << Doxygen::htmlFileExtension << "\"];\n"; + md5stream << " Node14 -> Node9 [dir=back,color=\"firebrick4\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n"; + md5stream << " Node14 [shape=\"box\",label=\"PrivateBase\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classPrivateBase" << Doxygen::htmlFileExtension << "\"];\n"; + md5stream << " Node15 -> Node9 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n"; + md5stream << " Node15 [shape=\"box\",label=\"Undocumented\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"grey75\"];\n"; + md5stream << " Node16 -> Node9 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n"; + md5stream << " Node16 [shape=\"box\",label=\"Templ< int >\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classTempl" << Doxygen::htmlFileExtension << "\"];\n"; + md5stream << " Node17 -> Node16 [dir=back,color=\"orange\",fontsize=\"" << FONTSIZE << "\",style=\"dashed\",label=\"< int >\",fontname=\"" << FONTNAME << "\"];\n"; + md5stream << " Node17 [shape=\"box\",label=\"Templ< T >\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classTempl" << Doxygen::htmlFileExtension << "\"];\n"; + md5stream << " Node18 -> Node9 [dir=back,color=\"darkorchid3\",fontsize=\"" << FONTSIZE << "\",style=\"dashed\",label=\"m_usedClass\",fontname=\"" << FONTNAME << "\"];\n"; + md5stream << " Node18 [shape=\"box\",label=\"Used\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classUsed" << Doxygen::htmlFileExtension << "\"];\n"; + writeGraphFooter(md5stream); + uchar md5_sig[16]; + QCString sigStr(33); + MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig); + MD5SigToString(md5_sig,sigStr.data(),33); + QCString absBaseName = (QCString)path+"/graph_legend"; + QCString absDotName = absBaseName+".dot"; + QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString imgName = "graph_legend."+imgExt; + QCString absImgName = absBaseName+"."+imgExt; + if (checkAndUpdateMd5Signature(absBaseName,sigStr) || + !checkDeliverables(absImgName)) { - unsetDotFontPath(); - return; + QFile dotFile(absDotName); + if (!dotFile.open(IO_WriteOnly)) + { + err("Could not open file %s for writing\n", + convertToQCString(dotFile.name()).data()); + return; + } + + FTextStream dotText(&dotFile); + dotText << theGraph; + dotFile.close(); + + // run dot to generate the a bitmap image from the graph + + DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName); + dotRun->addJob(imgExt,absImgName); + DotManager::instance()->addRun(dotRun); } - checkDotResult(absImgName); - Doxygen::indexList.addImageFile(imgName); - unsetDotFontPath(); + } void writeDotGraphFromFile(const char *inFile,const char *outDir, @@ -2837,37 +3173,37 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, { err("Error: Output dir %s does not exist!\n",outDir); exit(1); } - setDotFontPath(""); QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString imgName = (QCString)outFile+"."+imgExt; QCString absImgName = QCString(d.absPath())+"/"+imgName; QCString absOutFile = QCString(d.absPath())+"/"+outFile; - DotRunner dotRun(inFile); + DotRunner dotRun(inFile,d.absPath().data(),FALSE,absImgName); if (format==BITMAP) dotRun.addJob(imgExt,absImgName); else // format==EPS - dotRun.addJob("ps",absOutFile+".eps"); - - if ( (format==EPS) && (Config_getBool("USE_PDFLATEX")) ) { - QCString epstopdfArgs(maxCmdLine); - epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - absOutFile.data(),absOutFile.data()); - dotRun.addPostProcessing("epstopdf",epstopdfArgs); + if (Config_getBool("USE_PDFLATEX")) + { + dotRun.addJob("pdf",absOutFile+".pdf"); + } + else + { + dotRun.addJob("ps",absOutFile+".eps"); + } } + dotRun.preventCleanUp(); if (!dotRun.run()) { - unsetDotFontPath(); return; } if (format==BITMAP) checkDotResult(absImgName); + Doxygen::indexList.addImageFile(imgName); - unsetDotFontPath(); } @@ -2875,40 +3211,38 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, * dotfiles to generate image maps. * \param inFile just the basename part of the filename * \param outDir output directory + * \param fileName file name in which the map will be embedded * \param relPath relative path the to root of the output dir * \param context the scope in which this graph is found (for resolving links) * \returns a string which is the HTML image map (without the \<map\>\</map\>) */ QCString getDotImageMapFromFile(const QCString& inFile, const QCString& outDir, - const QCString &relPath,const QCString &context) + const QCString &relPath, const QCString &context) { - QString outFile = inFile + ".map"; + QCString outFile = inFile + ".map"; QDir d(outDir); if (!d.exists()) { err("Error: Output dir %s does not exist!\n",outDir.data()); exit(1); } - setDotFontPath(d.absPath()); - QCString absInFile = QCString(d.absPath())+"/"+inFile.data(); - QCString absOutFile = QCString(d.absPath())+"/"+outFile.data(); + QCString absInFile = QCString(d.absPath())+"/"+inFile; + QCString absOutFile = QCString(d.absPath())+"/"+outFile; - DotRunner dotRun(absInFile); + DotRunner dotRun(absInFile,d.absPath().data(),FALSE); dotRun.addJob(MAP_CMD,absOutFile); + dotRun.preventCleanUp(); if (!dotRun.run()) { - unsetDotFontPath(); return ""; } QGString result; FTextStream tmpout(&result); - //tmpout.setEncoding(tmpout.UnicodeUTF8); convertMapFile(tmpout, absOutFile, relPath ,TRUE, context); d.remove(outFile); - unsetDotFontPath(); return result.data(); } // end MDG mods @@ -3125,7 +3459,7 @@ void DotGroupCollaboration::addCollaborationMember( QCString DotGroupCollaboration::writeGraph( FTextStream &t, GraphOutputFormat format, - const char *path, const char *relPath, + const char *path, const char *fileName, const char *relPath, bool writeImageMap) const { QDir d(path); @@ -3134,113 +3468,117 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t, GraphOutputFormat fo { err("Error: Output dir %s does not exist!\n",path); exit(1); } - setDotFontPath(d.absPath()); + static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); - QCString baseName = m_diskName; - QCString absBaseName = QCString(d.absPath())+"/"+baseName; + QGString theGraph; + FTextStream md5stream(&theGraph); + writeGraphHeader(md5stream); - QFile dotfile(absBaseName+".dot"); - if (dotfile.open(IO_WriteOnly)) + // clean write flags + QDictIterator<DotNode> dni(*m_usedNodes); + DotNode *pn; + for (dni.toFirst();(pn=dni.current());++dni) { - FTextStream tdot(&dotfile); - //tdot.setEncoding(tdot.UnicodeUTF8); - writeGraphHeader(tdot); - - // clean write flags - QDictIterator<DotNode> dni(*m_usedNodes); - DotNode *pn; - for (dni.toFirst();(pn=dni.current());++dni) - pn->clearWriteFlag(); - - // write other nodes. - for (dni.toFirst();(pn=dni.current());++dni) - { - pn->write(tdot,DotNode::Inheritance,format,TRUE,FALSE,FALSE,FALSE); - } - - // write edges - QListIterator<Edge> eli(m_edges); - Edge* edge; - for (eli.toFirst();(edge=eli.current());++eli) - { - edge->write( tdot ); - } + pn->clearWriteFlag(); + } - writeGraphFooter(tdot); - dotfile.close(); + // write other nodes. + for (dni.toFirst();(pn=dni.current());++dni) + { + pn->write(md5stream,DotNode::Inheritance,format,TRUE,FALSE,FALSE,FALSE); } - QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); - if (format==BITMAP) // run dot to create a bitmap image + // write edges + QListIterator<Edge> eli(m_edges); + Edge* edge; + for (eli.toFirst();(edge=eli.current());++eli) { - QCString dotArgs(maxCmdLine); - QCString imgName = baseName+"."+imgExt; - QCString mapName=baseName+".map"; + edge->write( md5stream ); + } - QCString absImgName = QCString(d.absPath())+"/"+imgName; - QCString absMapName = QCString(d.absPath())+"/"+mapName; + writeGraphFooter(md5stream); + resetReNumbering(); + uchar md5_sig[16]; + QCString sigStr(33); + MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig); + MD5SigToString(md5_sig,sigStr.data(),33); + QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); + QCString baseName = m_diskName; + QCString imgName = baseName+"."+imgExt; + QCString mapName = baseName+".map"; + QCString absPath = d.absPath().data(); + QCString absBaseName = absPath+"/"+baseName; + QCString absDotName = absBaseName+".dot"; + QCString absImgName = absBaseName+"."+imgExt; + QCString absMapName = absBaseName+".map"; + QCString absPdfName = absBaseName+".pdf"; + QCString absEpsName = absBaseName+".eps"; + bool regenerate=FALSE; + if (checkAndUpdateMd5Signature(absBaseName,sigStr) || + !checkDeliverables(format==BITMAP ? absImgName : + usePDFLatex ? absPdfName : absEpsName, + format==BITMAP /*&& generateImageMap*/ ? absMapName : QCString()) + ) + { + regenerate=TRUE; - DotRunner dotRun(absBaseName+".dot"); - dotRun.addJob(imgExt,absImgName); - if (writeImageMap) dotRun.addJob(MAP_CMD,absMapName); - if (!dotRun.run()) + QFile dotfile(absDotName); + if (dotfile.open(IO_WriteOnly)) { - unsetDotFontPath(); - return baseName; + FTextStream tdot(&dotfile); + tdot << theGraph; + dotfile.close(); } - if (writeImageMap) + if (format==BITMAP) // run dot to create a bitmap image { - QCString mapLabel = escapeCharsInString(baseName,FALSE); - t << "<center><table><tr><td><img src=\"" << relPath << imgName - << "\" border=\"0\" alt=\"\" usemap=\"#" - << mapLabel << "_map\"/>" << endl; - t << "<map name=\"" << mapLabel << "_map\" id=\"" << mapLabel << "\">" << endl; - convertMapFile(t,absMapName,relPath); - t << "</map></td></tr></table></center>" << endl; + QCString dotArgs(maxCmdLine); + + DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE); + dotRun->addJob(imgExt,absImgName); + if (writeImageMap) dotRun->addJob(MAP_CMD,absMapName); + DotManager::instance()->addRun(dotRun); + } - } - else if (format==EPS) - { - DotRunner dotRun(absBaseName+".dot"); - dotRun.addJob("ps",absBaseName+".eps"); - if (Config_getBool("USE_PDFLATEX")) + else if (format==EPS) { - QCString epstopdfArgs(maxCmdLine); - epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", - absBaseName.data(),absBaseName.data()); - dotRun.addPostProcessing("epstopdf",epstopdfArgs); + DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE); + if (usePDFLatex) + { + dotRun->addJob("pdf",absPdfName); + } + else + { + dotRun->addJob("ps",absEpsName); + } + DotManager::instance()->addRun(dotRun); } - if (!dotRun.run()) + } + if (format==BITMAP && writeImageMap) + { + QCString mapLabel = escapeCharsInString(baseName,FALSE); + t << "<center><table><tr><td><img src=\"" << relPath << imgName + << "\" border=\"0\" alt=\"\" usemap=\"#" + << mapLabel << "\"/>" << endl; + if (regenerate || !insertMapFile(t,absMapName,relPath,mapLabel)) { - unsetDotFontPath(); - return baseName; + int mapId = DotManager::instance()->addMap(fileName,absMapName,relPath, + FALSE,QCString(),mapLabel); + t << "<!-- MAP " << mapId << " -->" << endl; } - int width,height; - if (!readBoundingBoxEPS(absBaseName+".eps",&width,&height)) - { - err("Error: Could not extract bounding box from .eps!\n"); - unsetDotFontPath(); - return baseName; - } - int maxWidth = 420; /* approx. page width in points */ - t << "\\nopagebreak\n" - "\\begin{figure}[H]\n" - "\\begin{center}\n" - "\\leavevmode\n" - "\\includegraphics[width=" << QMIN(width/2,maxWidth) - << "pt]{" << baseName << "}\n" - "\\end{center}\n" - "\\end{figure}\n"; + t << "</td></tr></table></center>" << endl; } - if (Config_getBool("DOT_CLEANUP")) + else if (format==EPS) { - d.remove(baseName+".dot"); + if (regenerate || !writeVecGfxFigure(t,baseName,absBaseName)) + { + int figId = DotManager::instance()->addFigure(fileName,baseName,absBaseName,FALSE); + t << endl << "% FIG " << figId << endl; + } } - unsetDotFontPath(); return baseName; } @@ -22,6 +22,10 @@ #include "qtbc.h" #include <qlist.h> #include <qdict.h> +#include <qwaitcondition.h> +#include <qmutex.h> +#include <qqueue.h> +#include <qthread.h> #include "sortdict.h" class ClassDef; @@ -34,6 +38,7 @@ class Definition; class DirDef; class GroupDef; class DotGroupCollaboration; +class DotRunnerQueue; enum GraphOutputFormat { BITMAP , EPS }; @@ -139,7 +144,7 @@ class DotGfxHierarchyTable public: DotGfxHierarchyTable(); ~DotGfxHierarchyTable(); - void writeGraph(FTextStream &t,const char *path) const; + void writeGraph(FTextStream &t,const char *path,const char *fileName) const; private: void addHierarchy(DotNode *n,ClassDef *cd,bool hide); @@ -160,7 +165,8 @@ class DotClassGraph bool isTrivial() const; bool isTooBig() const; QCString writeGraph(FTextStream &t,GraphOutputFormat f,const char *path, - const char *relPath, bool TBRank=TRUE,bool imageMap=TRUE) const; + const char *fileName, const char *relPath, + bool TBRank=TRUE,bool imageMap=TRUE) const; void writeXML(FTextStream &t); void writeDEF(FTextStream &t); @@ -188,8 +194,8 @@ class DotInclDepGraph public: DotInclDepGraph(FileDef *fd,bool inverse); ~DotInclDepGraph(); - QCString writeGraph(FTextStream &t, GraphOutputFormat f,const char *path, - const char *relPath, + QCString writeGraph(FTextStream &t, GraphOutputFormat f, + const char *path,const char *fileName,const char *relPath, bool writeImageMap=TRUE) const; bool isTrivial() const; bool isTooBig() const; @@ -216,7 +222,8 @@ class DotCallGraph DotCallGraph(MemberDef *md,bool inverse); ~DotCallGraph(); QCString writeGraph(FTextStream &t, GraphOutputFormat f, - const char *path,const char *relPath,bool writeImageMap=TRUE) const; + const char *path,const char *fileName, + const char *relPath,bool writeImageMap=TRUE) const; void buildGraph(DotNode *n,MemberDef *md,int distance); bool isTrivial() const; bool isTooBig() const; @@ -244,6 +251,7 @@ class DotDirDeps QCString writeGraph(FTextStream &out, GraphOutputFormat format, const char *path, + const char *fileName, const char *relPath, bool writeImageMap=TRUE) const; private: @@ -290,7 +298,7 @@ class DotGroupCollaboration DotGroupCollaboration(GroupDef* gd); ~DotGroupCollaboration(); QCString writeGraph(FTextStream &t, GraphOutputFormat format, - const char *path,const char *relPath, + const char *path,const char *fileName,const char *relPath, bool writeImageMap=TRUE) const; void buildGraph(GroupDef* gd); bool isTrivial() const; @@ -314,7 +322,8 @@ class DotRunner { public: /** Creates a runner for a dot \a file. */ - DotRunner(const char *file); + DotRunner(const QCString &file,const QCString &fontPath,bool checkResult, + const QCString &imageName = QCString()); /** Adds an additional job to the run. * Performing multiple jobs one file can be faster. @@ -323,6 +332,8 @@ class DotRunner void addPostProcessing(const char *cmd,const char *args); + void preventCleanUp() { m_cleanUp = FALSE; } + /** Runs dot for all jobs added. */ bool run(); private: @@ -330,6 +341,79 @@ class DotRunner QCString m_postArgs; QCString m_postCmd; QCString m_file; + QCString m_path; + bool m_checkResult; + QCString m_imageName; + bool m_cleanUp; +}; + +/** @brief Helper class to insert a set of map file into an output file */ +class DotMapConverter +{ + public: + struct Map + { + QCString mapFile; + QCString relPath; + bool urlOnly; + QCString context; + QCString label; + }; + DotMapConverter(const char *patchFile); + int addMap(const QCString &mapFile,const QCString &relPath, + bool urlOnly,const QCString &context,const QCString &label); + int addFigure(const QCString &baseName, + const QCString &figureName,bool heightCheck); + bool run(); + + private: + QList<Map> m_maps; + QCString m_patchFile; +}; + +class DotRunnerQueue +{ + public: + void enqueue(DotRunner *runner); + DotRunner *dequeue(); + uint count() const; + private: + QWaitCondition m_bufferNotEmpty; + QQueue<DotRunner> m_queue; + mutable QMutex m_mutex; +}; + +class DotWorkerThread : public QThread +{ + public: + DotWorkerThread(int id,DotRunnerQueue *queue); + void run(); + private: + int m_id; + DotRunnerQueue *m_queue; +}; + +/** @brief singleton that manages dot relation actions */ +class DotManager +{ + public: + static DotManager *instance(); + void addRun(DotRunner *run); + int addMap(const QCString &file,const QCString &mapFile, + const QCString &relPath,bool urlOnly, + const QCString &context,const QCString &label); + int addFigure(const QCString &file,const QCString &baseName, + const QCString &figureName,bool heightCheck); + bool run(); + + private: + DotManager(); + virtual ~DotManager(); + QList<DotRunner> m_dotRuns; + SDict<DotMapConverter> m_dotMaps; + static DotManager *m_theInstance; + DotRunnerQueue *m_queue; + QList<DotWorkerThread> m_workers; }; @@ -339,7 +423,7 @@ void generateGraphLegend(const char *path); void writeDotGraphFromFile(const char *inFile,const char *outDir, const char *outFile,GraphOutputFormat format); QCString getDotImageMapFromFile(const QCString& inFile, const QCString& outDir, - const QCString& relPath,const QCString &context); + const QCString& relPath,const QCString& context); void writeDotDirDepGraph(FTextStream &t,DirDef *dd); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 2efc9ed..6a288ad 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -4968,16 +4968,19 @@ static bool findGlobalMember(EntryNav *rootNav, { QCString fullFuncDecl=decl; if (root->argList) fullFuncDecl+=argListToString(root->argList,TRUE); - warn(root->fileName,root->startLine, - "Warning: no matching file member found for \n%s",fullFuncDecl.data()); + QCString warnMsg = + QCString("Warning: no matching file member found for \n")+fullFuncDecl; if (mn->count()>0) { - warn_cont("Possible candidates:\n"); + warnMsg+="Possible candidates:\n"; for (mni.toFirst();(md=mni.current());++mni) { - warn_cont(" %s\n",md->declaration()); + warnMsg+=" "; + warnMsg+=md->declaration(); + warnMsg+='\n'; } } + warn(root->fileName,root->startLine,warnMsg); } } else // got docs for an undefined member! @@ -5638,10 +5641,9 @@ static void findMember(EntryNav *rootNav, } } - warn(root->fileName,root->startLine, - "Warning: no %smatching class member found for", - noMatchCount>1 ? "uniquely " : "" - ); + QCString warnMsg = "Warning: no "; + if (noMatchCount>1) warnMsg+="uniquely "; + warnMsg+="matching class member found for \n"; if (root->tArgLists) { @@ -5649,17 +5651,21 @@ static void findMember(EntryNav *rootNav, ArgumentList *al; for (;(al=alli.current());++alli) { - warn_cont(" template %s\n",tempArgListToString(al).data()); + warnMsg+=" template "; + warnMsg+=tempArgListToString(al); + warnMsg+='\n'; } } QCString fullFuncDecl=funcDecl.copy(); if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE); - warn_cont(" %s\n",fullFuncDecl.data()); + warnMsg+=" "; + warnMsg+=fullFuncDecl; + warnMsg+='\n'; if (candidates>0) { - warn_cont("Possible candidates:\n"); + warnMsg+="Possible candidates:\n"; for (mni.toFirst();(md=mni.current());++mni) { ClassDef *cd=md->getClassDef(); @@ -5668,21 +5674,33 @@ static void findMember(EntryNav *rootNav, LockingPtr<ArgumentList> templAl = md->templateArguments(); if (templAl!=0) { - warn_cont(" template %s\n",tempArgListToString(templAl.pointer()).data()); + warnMsg+=" template "; + warnMsg+=tempArgListToString(templAl.pointer()); + warnMsg+='\n'; } - warn_cont(" "); + warnMsg+=" "; if (md->typeString()) { - warn_cont("%s ",md->typeString()); + warnMsg+=md->typeString(); + warnMsg+=' '; } QCString qScope = cd->qualifiedNameWithTemplateParameters(); - if (!qScope.isEmpty()) warn_cont("%s::%s",qScope.data(),md->name().data()); - if (md->argsString()) warn_cont("%s",md->argsString()); - if (noMatchCount>1) warn_cont(" at line %d of file %s",md->getDefLine(),md->getDefFileName().data()); - warn_cont("\n"); + if (!qScope.isEmpty()) + warnMsg+=qScope+"::"+md->name(); + if (md->argsString()) + warnMsg+=md->argsString(); + if (noMatchCount>1) + { + QCString lineFile; + lineFile.sprintf(" at line %d of file ",md->getDefLine()); + warnMsg+=lineFile+md->getDefFileName(); + } + + warnMsg+='\n'; } } } + warn(root->fileName,root->startLine,warnMsg); } } else if (cd) // member specialization @@ -10419,15 +10437,6 @@ void generateOutput() //writeDirDependencyGraph(Config_getString("HTML_OUTPUT")); - if (Config_getBool("GENERATE_RTF")) - { - msg("Combining RTF output...\n"); - if (!RTFGenerator::preProcessFileInplace(Config_getString("RTF_OUTPUT"),"refman.rtf")) - { - err("An error occurred during post-processing the RTF files!\n"); - } - } - if (Doxygen::formulaList.count()>0 && Config_getBool("GENERATE_HTML")) { msg("Generating bitmaps for formulas in HTML...\n"); @@ -10484,10 +10493,12 @@ void generateOutput() msg("Running html help compiler...\n"); QString oldDir = QDir::currentDirPath(); QDir::setCurrent(Config_getString("HTML_OUTPUT")); + portable_sysTimerStart(); if (portable_system(Config_getString("HHC_LOCATION"), "index.hhp", FALSE)) { err("Error: failed to run html help compiler on index.hhp\n"); } + portable_sysTimerStop(); QDir::setCurrent(oldDir); } if ( Config_getBool("GENERATE_HTML") && @@ -10501,10 +10512,12 @@ void generateOutput() QCString const args = QCString().sprintf("%s -o \"%s\"", qhpFileName.data(), qchFileName.data()); QString const oldDir = QDir::currentDirPath(); QDir::setCurrent(Config_getString("HTML_OUTPUT")); + portable_sysTimerStart(); if (portable_system(Config_getString("QHG_LOCATION"), args.data(), FALSE)) { err("Error: failed to run qhelpgenerator on index.qhp\n"); } + portable_sysTimerStop(); QDir::setCurrent(oldDir); } @@ -10515,6 +10528,17 @@ void generateOutput() Doxygen::searchIndex->write(Config_getString("HTML_OUTPUT")+"/search/search.idx"); } + if (Config_getBool("GENERATE_RTF")) + { + msg("Combining RTF output...\n"); + if (!RTFGenerator::preProcessFileInplace(Config_getString("RTF_OUTPUT"),"refman.rtf")) + { + err("An error occurred during post-processing the RTF files!\n"); + } + } + + DotManager::instance()->run(); + if (Debug::isFlagSet(Debug::Time)) { msg("Total elapsed time: %.3f seconds\n(of which %.3f seconds waiting for external tools to finish)\n", diff --git a/src/doxygen.css b/src/doxygen.css index bbb8368..035445f 100644 --- a/src/doxygen.css +++ b/src/doxygen.css @@ -138,7 +138,7 @@ dl.el { pre.fragment { border: 1px solid ##CC; - background-color: ##f5; + background-color: ##FC; padding: 4px 6px; margin: 4px 8px 4px 2px; overflow: auto; @@ -400,44 +400,44 @@ table.memberdecls { } .memproto { - border-top: 1px solid ##80; - border-left: 1px solid ##80; - border-right: 1px solid ##80; - padding: 0; - background-color: ##c8; + border-top: 1px solid ##B4; + border-left: 1px solid ##B4; + border-right: 1px solid ##B4; + padding: 6px 0px 6px 0px; color: ##2b; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); /* firefox specific markup */ - background-image: -moz-linear-gradient(center top, ##F8, ##E8 30%, ##E0 90%, ##D0); -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 8px; -moz-border-radius-topleft: 8px; /* webkit specific markup */ - background-image: -webkit-gradient(linear,center top,center bottom,from(##F8),color-stop(0.3,##E0),color-stop(0.9,##E0),to(##D0)); -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 8px; -webkit-border-top-left-radius: 8px; + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: ##E6; } .memdoc { - border-bottom: 1px solid ##80; - border-left: 1px solid ##80; - border-right: 1px solid ##80; + border-bottom: 1px solid ##B4; + border-left: 1px solid ##B4; + border-right: 1px solid ##B4; padding: 2px 5px; - background-color: ##E0; + background-color: ##FC; border-top-width: 0; /* firefox specific markup */ -moz-border-radius-bottomleft: 8px; -moz-border-radius-bottomright: 8px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - background-image: -moz-linear-gradient(center top, ##FF 0%, ##F8 80%, ##F0); + background-image: -moz-linear-gradient(center top, ##FF 0%, ##FF 60%, #F8 95%, #F0); /* webkit specific markup */ -webkit-border-bottom-left-radius: 8px; -webkit-border-bottom-right-radius: 8px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - background-image: -webkit-gradient(linear,center top,center bottom,from(##FF), color-stop(0.2,##F8), to(##F0)); + background-image: -webkit-gradient(linear,center top,center bottom,from(##FF), color-stop(0.6,##FF), color-stop(0.60,#FF), color-stop(0.95,#F8), to(#F0)); } .paramkey { diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in index 4d55180..be3c41c 100644 --- a/src/doxygen.pro.in +++ b/src/doxygen.pro.in @@ -18,15 +18,15 @@ TEMPLATE = app.t CONFIG = console warn_on $extraopts HEADERS = doxygen.h SOURCES = main.cpp -unix:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 +unix:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread win32:INCLUDEPATH += . -win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 +win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread win32-msvc:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib win32-borland:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib win32-borland:TMAKE_LFLAGS += -L..\lib -L$(BCB)\lib\psdk win32:TMAKE_CXXFLAGS += -DQT_NODLL -win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -liconv +win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -liconv -lpthread win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti INCLUDEPATH += ../qtools ../libmd5 . DESTDIR = ../bin diff --git a/src/doxygen_css.h b/src/doxygen_css.h index fc02e37..a9a2d0d 100644 --- a/src/doxygen_css.h +++ b/src/doxygen_css.h @@ -138,7 +138,7 @@ "\n" "pre.fragment {\n" " border: 1px solid ##CC;\n" -" background-color: ##f5;\n" +" background-color: ##FC;\n" " padding: 4px 6px;\n" " margin: 4px 8px 4px 2px;\n" " overflow: auto;\n" @@ -400,44 +400,44 @@ "}\n" "\n" ".memproto {\n" -" border-top: 1px solid ##80;\n" -" border-left: 1px solid ##80;\n" -" border-right: 1px solid ##80;\n" -" padding: 0;\n" -" background-color: ##c8;\n" +" border-top: 1px solid ##B4;\n" +" border-left: 1px solid ##B4;\n" +" border-right: 1px solid ##B4;\n" +" padding: 6px 0px 6px 0px;\n" " color: ##2b;\n" " font-weight: bold;\n" " text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);\n" " /* firefox specific markup */\n" -" background-image: -moz-linear-gradient(center top, ##F8, ##E8 30%, ##E0 90%, ##D0);\n" " -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\n" " -moz-border-radius-topright: 8px;\n" " -moz-border-radius-topleft: 8px;\n" " /* webkit specific markup */\n" -" background-image: -webkit-gradient(linear,center top,center bottom,from(##F8),color-stop(0.3,##E0),color-stop(0.9,##E0),to(##D0));\n" " -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n" " -webkit-border-top-right-radius: 8px;\n" " -webkit-border-top-left-radius: 8px;\n" +" background-image:url('nav_f.png');\n" +" background-repeat:repeat-x;\n" +" background-color: ##E6;\n" "\n" "}\n" "\n" ".memdoc {\n" -" border-bottom: 1px solid ##80; \n" -" border-left: 1px solid ##80; \n" -" border-right: 1px solid ##80; \n" +" border-bottom: 1px solid ##B4; \n" +" border-left: 1px solid ##B4; \n" +" border-right: 1px solid ##B4; \n" " padding: 2px 5px;\n" -" background-color: ##E0;\n" +" background-color: ##FC;\n" " border-top-width: 0;\n" " /* firefox specific markup */\n" " -moz-border-radius-bottomleft: 8px;\n" " -moz-border-radius-bottomright: 8px;\n" " -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\n" -" background-image: -moz-linear-gradient(center top, ##FF 0%, ##F8 80%, ##F0);\n" +" background-image: -moz-linear-gradient(center top, ##FF 0%, ##FF 60%, #F8 95%, #F0);\n" " /* webkit specific markup */\n" " -webkit-border-bottom-left-radius: 8px;\n" " -webkit-border-bottom-right-radius: 8px;\n" " -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n" -" background-image: -webkit-gradient(linear,center top,center bottom,from(##FF), color-stop(0.2,##F8), to(##F0));\n" +" background-image: -webkit-gradient(linear,center top,center bottom,from(##FF), color-stop(0.6,##FF), color-stop(0.60,#FF), color-stop(0.95,#F8), to(#F0));\n" "}\n" "\n" ".paramkey {\n" diff --git a/src/formula.cpp b/src/formula.cpp index d0e3843..149c06f 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -105,6 +105,7 @@ void FormulaList::generateBitmaps(const char *path) //system("latex _formulas.tex </dev/null >/dev/null"); QCString latexCmd = Config_getString("LATEX_CMD_NAME"); if (latexCmd.isEmpty()) latexCmd="latex"; + portable_sysTimerStart(); if (portable_system(latexCmd,"_formulas.tex")!=0) { err("Problems running latex. Check your installation or look " @@ -112,6 +113,7 @@ void FormulaList::generateBitmaps(const char *path) formulaError=TRUE; //return; } + portable_sysTimerStop(); //printf("Running dvips...\n"); QListIterator<int> pli(pagesToGenerate); int *pagePtr; @@ -127,11 +129,14 @@ void FormulaList::generateBitmaps(const char *path) // encapsulated postscript. sprintf(dviArgs,"-q -D 600 -E -n 1 -p %d -o %s.eps _formulas.dvi", pageIndex,formBase.data()); + portable_sysTimerStart(); if (portable_system("dvips",dviArgs)!=0) { err("Problems running dvips. Check your installation!\n"); + portable_sysTimerStop(); return; } + portable_sysTimerStop(); // now we read the generated postscript file to extract the bounding box QFileInfo fi(formBase+".eps"); if (fi.exists()) @@ -184,11 +189,14 @@ void FormulaList::generateBitmaps(const char *path) gx,gy,(int)(scaleFactor*72),(int)(scaleFactor*72), formBase.data(),formBase.data() ); + portable_sysTimerStart(); if (portable_system(portable_ghostScriptCommand(),gsArgs)!=0) { err("Problem running ghostscript %s %s. Check your installation!\n",portable_ghostScriptCommand(),gsArgs); + portable_sysTimerStop(); return; } + portable_sysTimerStop(); f.setName(formBase+".pnm"); uint imageX=0,imageY=0; // we read the generated image again, to obtain the pixel data. diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index c23baed..d888d31 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -480,7 +480,6 @@ void FTVHelp::generateIndent(FTextStream &t, FTVNode *n,int level) void FTVHelp::generateLink(FTextStream &t,FTVNode *n) { - QCString *dest; //printf("FTVHelp::generateLink(ref=%s,file=%s,anchor=%s\n", // n->ref.data(),n->file.data(),n->anchor.data()); if (n->file.isEmpty()) // no link @@ -492,19 +491,14 @@ void FTVHelp::generateLink(FTextStream &t,FTVNode *n) if (!n->ref.isEmpty()) // link to entity imported via tag file { t << "<a class=\"elRef\" "; - t << "target=\"_blank\" doxygen=\"" << n->ref << ":"; - if ((dest=Doxygen::tagDestinationDict[n->ref])) t << *dest << "/"; - t << "\" "; + t << externalLinkTarget() << externalRef("",n->ref,FALSE); } else // local link { t << "<a class=\"el\" "; } t << "href=\""; - if (!n->ref.isEmpty()) - { - if ((dest=Doxygen::tagDestinationDict[n->ref])) t << *dest << "/"; - } + t << externalRef("",n->ref,TRUE); t << n->file << Doxygen::htmlFileExtension; if (!n->anchor.isEmpty()) t << "#" << n->anchor; if (m_topLevelIndex) diff --git a/src/htags.cpp b/src/htags.cpp index 7458f0c..9f45163 100644 --- a/src/htags.cpp +++ b/src/htags.cpp @@ -90,7 +90,9 @@ bool Htags::execute(const QCString &htmldir) QCString oldDir = convertToQCString(QDir::currentDirPath()); QDir::setCurrent(g_inputDir.absPath()); //printf("CommandLine=[%s]\n",commandLine.data()); + portable_sysTimerStart(); bool result=portable_system("htags",commandLine,FALSE)==0; + portable_sysTimerStop(); QDir::setCurrent(oldDir); return result; } diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index b03fd68..790a59e 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -1510,23 +1510,14 @@ void HtmlDocVisitor::startLink(const QCString &ref,const QCString &file, if (!ref.isEmpty()) // link to entity imported via tag file { m_t << "<a class=\"elRef\" "; - m_t << "target=\"_blank\" doxygen=\"" << ref << ":"; - if ((dest=Doxygen::tagDestinationDict[ref])) m_t << *dest << "/"; - m_t << "\" "; + m_t << externalLinkTarget() << externalRef(relPath,ref,FALSE); } else // local link { m_t << "<a class=\"el\" "; } m_t << "href=\""; - if (!ref.isEmpty()) - { - if ((dest=Doxygen::tagDestinationDict[ref])) m_t << *dest << "/"; - } - else - { - m_t << relPath; - } + m_t << externalRef(relPath,ref,TRUE); if (!file.isEmpty()) m_t << file << Doxygen::htmlFileExtension; if (!anchor.isEmpty()) m_t << "#" << anchor; m_t << "\""; @@ -1552,22 +1543,22 @@ void HtmlDocVisitor::popEnabled() delete v; } -void HtmlDocVisitor::writeDotFile(const QCString &fileName,const QCString &relPath, +void HtmlDocVisitor::writeDotFile(const QCString &fn,const QCString &relPath, const QCString &context) { - QCString baseName=fileName; + QCString baseName=fn; int i; if ((i=baseName.findRev('/'))!=-1) { baseName=baseName.right(baseName.length()-i-1); } QCString outDir = Config_getString("HTML_OUTPUT"); - writeDotGraphFromFile(fileName,outDir,baseName,BITMAP); + writeDotGraphFromFile(fn,outDir,baseName,BITMAP); QCString mapName = baseName+".map"; - QCString mapFile = fileName+".map"; + QCString mapFile = fn+".map"; m_t << "<img src=\"" << relPath << baseName << "." - << Config_getEnum("DOT_IMAGE_FORMAT") << "\" alt=\"" - << baseName << "\" border=\"0\" usemap=\"#" << mapName << "\">" << endl; + << Config_getEnum("DOT_IMAGE_FORMAT") << "\" alt=\"" + << baseName << "\" border=\"0\" usemap=\"#" << mapName << "\">" << endl; QCString imap = getDotImageMapFromFile(baseName,outDir,relPath,context); m_t << "<map name=\"" << mapName << "\" id=\"" << mapName << "\">" << imap << "</map>" << endl; } diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index a07619d..f084228 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -89,6 +89,18 @@ static unsigned char header_png[12] = 245, 246, 247, 248, 249, 250 }; +// function header +static unsigned char func_header_png[56] = +{ + 248, 247, 246, 245, 244, 243, 242, 241, + 240, 239, 238, 237, 236, 235, 234, 233, + 232, 231, 230, 229, 228, 223, 223, 223, + 223, 223, 223, 223, 223, 223, 223, 223, + 224, 224, 224, 224, 225, 225, 225, 225, + 225, 226, 226, 226, 227, 227, 227, 227, + 228, 228, 228, 229, 229, 229, 229, 229 +}; + // hovering static unsigned char tab_h_png[36] = { @@ -705,7 +717,8 @@ static colored_img_data_item colored_tab_data[] = { "tab_b.png", 1, 36, tab_b_png, 0 }, { "tab_h.png", 1, 36, tab_h_png, 0 }, { "tab_s.png", 1, 36, tab_s_png, 0 }, - { "nav_h.png", 1, 12, header_png, 0 }, + { "nav_h.png", 1, 12, header_png, 0 }, + { "nav_f.png", 1, 56, func_header_png, 0 }, { "bc_s.png", 8, 32, bc_s_png, bc_s_a_png }, { "doxygen.png", 104,31, doxygen_png, doxygen_a_png }, { "closed.png", 9, 9, closed_png, closed_a_png }, @@ -1265,29 +1278,19 @@ void HtmlGenerator::endIndexListItem() void HtmlGenerator::startIndexItem(const char *ref,const char *f) { //printf("HtmlGenerator::startIndexItem(%s,%s)\n",ref,f); - QCString *dest; if (ref || f) { if (ref) { t << "<a class=\"elRef\" "; - t << "target=\"_blank\" doxygen=\"" << ref << ":"; - if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; - t << "\" "; + t << externalLinkTarget() << externalRef(relPath,ref,FALSE); } else { t << "<a class=\"el\" "; } t << "href=\""; - if (ref) - { - if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; - } - else - { - t << relPath; - } + t << externalRef(relPath,ref,TRUE); if (f) t << f << Doxygen::htmlFileExtension << "\">"; } else @@ -1322,27 +1325,17 @@ void HtmlGenerator::writeStartAnnoItem(const char *,const char *f, void HtmlGenerator::writeObjectLink(const char *ref,const char *f, const char *anchor, const char *name) { - QCString *dest; if (ref) { t << "<a class=\"elRef\" "; - t << "target=\"_blank\" doxygen=\"" << ref << ":"; - if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; - t << "\" "; + t << externalLinkTarget() << externalRef(relPath,ref,FALSE); } else { t << "<a class=\"el\" "; } t << "href=\""; - if (ref) - { - if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; - } - else - { - t << relPath; - } + t << externalRef(relPath,ref,TRUE); if (f) t << f << Doxygen::htmlFileExtension; if (anchor) t << "#" << anchor; t << "\">"; @@ -1354,28 +1347,18 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f, const char *anchor, const char *name, const char *tooltip) { - QCString *dest; //printf("writeCodeLink(ref=%s,f=%s,anchor=%s,name=%s,tooltip=%s)\n",ref,f,anchor,name,tooltip); if (ref) { t << "<a class=\"codeRef\" "; - t << "target=\"_blank\" doxygen=\"" << ref << ":"; - if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; - t << "\" "; + t << externalLinkTarget() << externalRef(relPath,ref,FALSE); } else { t << "<a class=\"code\" "; } t << "href=\""; - if (ref) - { - if ((dest=Doxygen::tagDestinationDict[ref])) t << relPath << *dest << "/"; - } - else - { - t << relPath; - } + t << externalRef(relPath,ref,TRUE); if (f) t << f << Doxygen::htmlFileExtension; if (anchor) t << "#" << anchor; t << "\""; @@ -2010,7 +1993,7 @@ void HtmlGenerator::endDotGraph(const DotClassGraph &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,BITMAP,dir,relPath); + g.writeGraph(t,BITMAP,dir,fileName,relPath); if (Config_getBool("GENERATE_LEGEND")) { t << "<center><span class=\"legend\">["; @@ -2036,7 +2019,7 @@ void HtmlGenerator::endInclDepGraph(const DotInclDepGraph &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,BITMAP,dir,relPath); + g.writeGraph(t,BITMAP,dir,fileName,relPath); endSectionContent(t); m_sectionCount++; @@ -2054,7 +2037,7 @@ void HtmlGenerator::endGroupCollaboration(const DotGroupCollaboration &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,BITMAP,dir,relPath); + g.writeGraph(t,BITMAP,dir,fileName,relPath); endSectionContent(t); m_sectionCount++; @@ -2072,7 +2055,7 @@ void HtmlGenerator::endCallGraph(const DotCallGraph &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,BITMAP,dir,relPath); + g.writeGraph(t,BITMAP,dir,fileName,relPath); endSectionContent(t); m_sectionCount++; @@ -2090,7 +2073,7 @@ void HtmlGenerator::endDirDepGraph(const DotDirDeps &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,BITMAP,dir,relPath); + g.writeGraph(t,BITMAP,dir,fileName,relPath); endSectionContent(t); m_sectionCount++; @@ -2098,7 +2081,7 @@ void HtmlGenerator::endDirDepGraph(const DotDirDeps &g) void HtmlGenerator::writeGraphicalHierarchy(const DotGfxHierarchyTable &g) { - g.writeGraph(t,dir); + g.writeGraph(t,dir,fileName); } void HtmlGenerator::startMemberGroupHeader(bool) diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 731ef2d..a488db2 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -496,6 +496,7 @@ void HtmlHelp::createProjectFile() t << "tab_h.png" << endl; t << "tab_s.png" << endl; t << "nav_h.png" << endl; + t << "nav_f.png" << endl; if (Config_getBool("HTML_DYNAMIC_SECTIONS")) { t << "open.gif" << endl; diff --git a/src/index.cpp b/src/index.cpp index b385d79..8899d43 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2643,32 +2643,20 @@ void writeJavascriptSearchIndex() << "onkeyup=\"" << "return searchResults.Nav(event," << itemCount << ")\" " << "class=\"SRSymbol\" "; - if (!d->getReference().isEmpty()) - { - QCString *dest = Doxygen::tagDestinationDict[d->getReference()]; - if (dest && *dest=='.') // relative path (see bug 593679) - { - t << "target=\"_blank\" doxygen=\"" << d->getReference() << ":../" - << *dest << "/\" href=\"../" << *dest << "/"; - } - else if (dest) // absolute path - { - t << "target=\"_blank\" doxygen=\"" << d->getReference() << ":" - << *dest << "/\" href=\"" << *dest << "/"; - } - } - else - { - t << "href=\"../"; - } + t << externalLinkTarget() << "href=\"" << externalRef("../",d->getReference(),TRUE); t << d->getOutputFileBase() << Doxygen::htmlFileExtension; if (isMemberDef) { t << "#" << ((MemberDef *)d)->anchor(); } - t << "\" target=\""; - if (treeView) t << "basefrm"; else t << "_parent"; - t << "\">"; + static bool extLinksInWindow = Config_getBool("EXT_LINKS_IN_WINDOW"); + if (!extLinksInWindow || d->getReference().isEmpty()) + { + t << "\" target=\""; + if (treeView) t << "basefrm"; else t << "_parent"; + t << "\""; + } + t << ">"; t << convertToXML(d->localName()); t << "</a>" << endl; if (d->getOuterScope()!=Doxygen::globalScope) @@ -2733,25 +2721,22 @@ void writeJavascriptSearchIndex() << "class=\"SRScope\" "; if (!d->getReference().isEmpty()) { - QCString *dest; - t << "target=\"_blank\" doxygen=\"" << d->getReference() << ":../"; - if ((dest=Doxygen::tagDestinationDict[d->getReference()])) t << *dest << "/"; - t << "\" "; - t << "href=\"../"; - if ((dest=Doxygen::tagDestinationDict[d->getReference()])) t << *dest << "/"; - } - else - { - t << "href=\"../"; + t << externalLinkTarget() << externalRef("../",d->getReference(),FALSE); } + t << "href=\"" << externalRef("../",d->getReference(),TRUE); t << d->getOutputFileBase() << Doxygen::htmlFileExtension; if (isMemberDef) { t << "#" << ((MemberDef *)d)->anchor(); } - t << "\" target=\""; - if (treeView) t << "basefrm"; else t << "_parent"; - t << "\">"; + static bool extLinksInWindow = Config_getBool("EXT_LINKS_IN_WINDOW"); + if (!extLinksInWindow || d->getReference().isEmpty()) + { + t << "\" target=\""; + if (treeView) t << "basefrm"; else t << "_parent"; + t << "\""; + } + t << ">"; bool found=FALSE; overloadedFunction = ((prevScope!=0 && scope==prevScope) || (scope && scope==nextScope) diff --git a/src/language.cpp b/src/language.cpp index 90fe85d..b0ab2d5 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -307,7 +307,7 @@ bool setTranslator(const char *langName) #ifdef LANG_BR else if (L_EQUAL("brazilian")) { - theTranslator=new TranslatorDecoder(new TranslatorBrazilian); + theTranslator=new TranslatorBrazilian; } #endif #ifdef LANG_DK @@ -331,7 +331,7 @@ bool setTranslator(const char *langName) #ifdef LANG_GR else if (L_EQUAL("greek")) { - theTranslator=new TranslatorDecoder(new TranslatorGreek); + theTranslator=new TranslatorGreek; } #endif #ifdef LANG_SR @@ -408,6 +408,6 @@ bool setTranslator(const char *langName) } QCString msg = theTranslator->updateNeededMessage(); - if (!msg.isEmpty()) warn_cont(msg); + if (!msg.isEmpty()) err(msg); return TRUE; } diff --git a/src/latexgen.cpp b/src/latexgen.cpp index d848a97..6d562ce 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -546,7 +546,7 @@ static void writeDefaultStyleSheetPart3(FTextStream &t) "}\n\n"; t << "% is used for parameters within a detailed function description\n" "\\newenvironment{DoxyParamCaption}{%\n" - " \\renewcommand{\\item}[2][]{##1 \\em ##2}%\n" + " \\renewcommand{\\item}[2][]{##1 {\\em ##2}}%\n" " }{%\n" "}\n\n"; t << "% Used by return value lists\n" @@ -1847,7 +1847,7 @@ void LatexGenerator::startDotGraph() void LatexGenerator::endDotGraph(const DotClassGraph &g) { - g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),relPath); + g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath); } void LatexGenerator::startInclDepGraph() @@ -1856,7 +1856,7 @@ void LatexGenerator::startInclDepGraph() void LatexGenerator::endInclDepGraph(const DotInclDepGraph &g) { - g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),relPath); + g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath); } void LatexGenerator::startGroupCollaboration() @@ -1865,7 +1865,7 @@ void LatexGenerator::startGroupCollaboration() void LatexGenerator::endGroupCollaboration(const DotGroupCollaboration &g) { - g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),relPath); + g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath); } void LatexGenerator::startCallGraph() @@ -1874,7 +1874,7 @@ void LatexGenerator::startCallGraph() void LatexGenerator::endCallGraph(const DotCallGraph &g) { - g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),relPath); + g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath); } void LatexGenerator::startDirDepGraph() @@ -1883,7 +1883,7 @@ void LatexGenerator::startDirDepGraph() void LatexGenerator::endDirDepGraph(const DotDirDeps &g) { - g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),relPath); + g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),fileName,relPath); } void LatexGenerator::startDescription() @@ -1955,6 +1955,10 @@ void LatexGenerator::startParameterList(bool openBracket) t << endl << "\\begin{DoxyParamCaption}" << endl; } +void LatexGenerator::endParameterList() +{ +} + void LatexGenerator::startParameterType(bool /*first*/,const char *key) { diff --git a/src/latexgen.h b/src/latexgen.h index 6ba7c79..f846ca3 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -221,7 +221,7 @@ class LatexGenerator : public OutputGenerator void startParameterName(bool); void endParameterName(bool,bool,bool); void startParameterList(bool); - void endParameterList() {} + void endParameterList(); void startConstraintList(const char *); void startConstraintParam(); diff --git a/src/memberdef.cpp b/src/memberdef.cpp index e7fa89e..3c6dfd2 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -146,12 +146,18 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, //if (!md->isDefine()) ol.startParameter(TRUE); else ol.docify(" "); bool first=TRUE; bool paramTypeStarted=FALSE; + bool isDefine = md->isDefine(); while (a) { - if (md->isDefine() || first) + if (isDefine || first) { ol.startParameterType(first,md->isObjCMethod()?"dummy":0); paramTypeStarted=TRUE; + if (isDefine) + { + ol.endParameterType(); + ol.startParameterName(TRUE); + } } QRegExp re(")("),res("(.*\\*"); int vp=a->type.find(re); @@ -187,7 +193,7 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md->name(),n); } } - if (!md->isDefine()) + if (!isDefine) { if (paramTypeStarted) { @@ -243,7 +249,7 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, if (a) { if (!md->isObjCMethod()) ol.docify(", "); // there are more arguments - if (!md->isDefine()) + if (!isDefine) { QCString key; if (md->isObjCMethod() && a->attrib.length()>=2) @@ -261,7 +267,7 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, ol.startParameterType(FALSE,key); paramTypeStarted=TRUE; } - else + else // isDefine { ol.endParameterName(FALSE,FALSE,TRUE); } @@ -276,17 +282,16 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, ol.enableAll(); if (htmlOn) ol.enable(OutputGenerator::Html); if (latexOn) ol.enable(OutputGenerator::Latex); - if (!md->isDefine()) + //if (!isDefine) { if (first) ol.startParameterName(defArgList->count()<2); ol.endParameterName(TRUE,defArgList->count()<2,!md->isObjCMethod()); } - else - { - ol.endParameterType(); - ol.startParameterName(TRUE); - ol.endParameterName(TRUE,TRUE,!md->isObjCMethod()); - } + //else // isDefine + //{ + // if (first) ol.startParameterName(TRUE); + // ol.endParameterName(TRUE,defArgList->count()<2,!md->isObjCMethod()); + //} ol.popGeneratorState(); if (md->extraTypeChars()) { diff --git a/src/message.cpp b/src/message.cpp index 96f1cfd..8669650 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -161,16 +161,6 @@ void warn(const char *file,int line,const char *fmt, ...) va_end(args); } -void warn_cont(const char *fmt, ...) -{ - if (!Config_getBool("WARNINGS")) - return; - va_list args; - va_start(args, fmt); - vfprintf(warnFile, fmt, args); - va_end(args); -} - void warn_undoc(const char *file,int line,const char *fmt, ...) { va_list args; diff --git a/src/message.h b/src/message.h index 8e205fa..5a42d50 100644 --- a/src/message.h +++ b/src/message.h @@ -22,7 +22,6 @@ extern void msg(const char *fmt, ...); extern void warn(const char *file,int line,const char *fmt, ...); -extern void warn_cont(const char *fmt, ...); extern void warn_undoc(const char *file,int line,const char *fmt, ...); extern void warn_doc_error(const char *file,int line,const char *fmt, ...); extern void err(const char *fmt, ...); diff --git a/src/msc.cpp b/src/msc.cpp index 72f9681..d844b32 100644 --- a/src/msc.cpp +++ b/src/msc.cpp @@ -68,13 +68,9 @@ static bool convertMapFile(QTextStream &t,const char *mapName,const QCString rel if ( isRef ) { // handle doxygen \ref tag URL reference - QCString *dest; DocRef *df = new DocRef( (DocNode*) 0, url, context ); - if (!df->ref().isEmpty()) - { - if ((dest=Doxygen::tagDestinationDict[df->ref()])) t << *dest << "/"; - } - if (!df->file().isEmpty()) t << relPath << df->file() << Doxygen::htmlFileExtension; + t << externalRef(relPath,df->ref(),TRUE); + if (!df->file().isEmpty()) t << df->file() << Doxygen::htmlFileExtension; if (!df->anchor().isEmpty()) t << "#" << df->anchor(); } else @@ -121,19 +117,24 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir, mscArgs+=extension+"\""; int exitCode; //printf("*** running: %s %s\n",mscExe.data(),mscArgs.data()); + portable_sysTimerStart(); if ((exitCode=portable_system(mscExe,mscArgs,FALSE))!=0) { + portable_sysTimerStop(); goto error; } + portable_sysTimerStop(); if ( (format==MSC_EPS) && (Config_getBool("USE_PDFLATEX")) ) { QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", outFile,outFile); + portable_sysTimerStart(); if (portable_system("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); } + portable_sysTimerStop(); } error: @@ -157,11 +158,14 @@ QCString getMscImageMapFromFile(const QCString& inFile, const QCString& outDir, mscArgs+=outFile + "\""; int exitCode; + portable_sysTimerStart(); if ((exitCode=portable_system(mscExe,mscArgs,FALSE))!=0) { + portable_sysTimerStop(); QDir::setCurrent(oldDir); return ""; } + portable_sysTimerStop(); QString result; QTextOStream tmpout(&result); diff --git a/src/outputgen.cpp b/src/outputgen.cpp index 4e91156..2216bca 100644 --- a/src/outputgen.cpp +++ b/src/outputgen.cpp @@ -41,7 +41,7 @@ OutputGenerator::~OutputGenerator() void OutputGenerator::startPlainFile(const char *name) { //printf("startPlainFile(%s)\n",name); - QCString fileName=dir+"/"+name; + fileName=dir+"/"+name; file = new QFile(fileName); if (!file) { @@ -60,6 +60,7 @@ void OutputGenerator::endPlainFile() { delete file; file=0; + fileName.resize(0); } void OutputGenerator::pushGeneratorState() diff --git a/src/outputgen.h b/src/outputgen.h index 82b6c38..b3e7745 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -408,6 +408,7 @@ class OutputGenerator : public BaseOutputDocInterface protected: FTextStream t; QFile *file; + QCString fileName; QCString dir; bool active; QStack<bool> *genStack; diff --git a/src/portable.cpp b/src/portable.cpp index 41eff1c..eee8239 100644 --- a/src/portable.cpp +++ b/src/portable.cpp @@ -27,11 +27,10 @@ extern char **environ; //#include "doxygen.h" static double sysElapsedTime; +static QTime time; int portable_system(const char *command,const char *args,bool commandHasConsole) { - QTime time; - time.start(); if (command==0) return 1; @@ -79,7 +78,6 @@ int portable_system(const char *command,const char *args,bool commandHasConsole } } } - sysElapsedTime+=((double)time.elapsed())/1000.0; return status; #else // Other Unices just use fork @@ -104,7 +102,6 @@ int portable_system(const char *command,const char *args,bool commandHasConsole } else { - sysElapsedTime+=((double)time.elapsed())/1000.0; if (WIFEXITED(status)) { return WEXITSTATUS(status); @@ -158,7 +155,6 @@ int portable_system(const char *command,const char *args,bool commandHasConsole CloseHandle(sInfo.hProcess); } } - sysElapsedTime+=((double)time.elapsed())/1000.0; return 0; #endif @@ -369,8 +365,26 @@ int portable_pclose(FILE *stream) return pclose(stream); } +void portable_sysTimerStart() +{ + time.start(); +} + +void portable_sysTimerStop() +{ + sysElapsedTime+=((double)time.elapsed())/1000.0; +} + double portable_getSysElapsedTime() { return sysElapsedTime; } +void portable_sleep(int ms) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + Sleep(ms); +#else + usleep(1000*ms); +#endif +} diff --git a/src/portable.h b/src/portable.h index 0718932..cbd8df0 100644 --- a/src/portable.h +++ b/src/portable.h @@ -28,7 +28,10 @@ const char * portable_commandExtension(); bool portable_fileSystemIsCaseSensitive(); FILE * portable_popen(const char *name,const char *type); int portable_pclose(FILE *stream); +void portable_sysTimerStart(); +void portable_sysTimerStop(); double portable_getSysElapsedTime(); +void portable_sleep(int ms); extern "C" { void * portable_iconv_open(const char* tocode, const char* fromcode); diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 1ab36ce..b86fe4e 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -1994,7 +1994,7 @@ void RTFGenerator::incrementIndentLevel() m_listLevel++; if (m_listLevel>rtf_maxIndentLevels-1) { - warn_cont("Warning: Maximum indent level (%d) exceeded while generating RTF output!\n",rtf_maxIndentLevels); + err("Warning: Maximum indent level (%d) exceeded while generating RTF output!\n",rtf_maxIndentLevels); m_listLevel=rtf_maxIndentLevels-1; } } @@ -2004,7 +2004,7 @@ void RTFGenerator::decrementIndentLevel() m_listLevel--; if (m_listLevel<0) { - warn_cont("Warning: Negative indent level while generating RTF output!\n"); + err("Warning: Negative indent level while generating RTF output!\n"); m_listLevel=0; } } @@ -2351,7 +2351,7 @@ void RTFGenerator::endDotGraph(const DotClassGraph &g) newParagraph(); QCString fileName = - g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),relPath,TRUE,FALSE); + g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),fileName,relPath,TRUE,FALSE); // display the file t << "{" << endl; @@ -2373,14 +2373,14 @@ void RTFGenerator::endInclDepGraph(const DotInclDepGraph &g) { newParagraph(); - QCString fileName = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"), - relPath,FALSE); + QCString fn = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"), + fileName,relPath,FALSE); // display the file t << "{" << endl; t << rtf_Style_Reset << endl; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; - t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); + t << fn << "." << Config_getEnum("DOT_IMAGE_FORMAT"); t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "}" << endl; DBG_RTF(t << "{\\comment (endInclDepGraph)}" << endl) @@ -2403,14 +2403,14 @@ void RTFGenerator::endCallGraph(const DotCallGraph &g) { newParagraph(); - QCString fileName = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"), - relPath,FALSE); + QCString fn = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"), + fileName,relPath,FALSE); // display the file t << "{" << endl; t << rtf_Style_Reset << endl; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; - t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); + t << fn << "." << Config_getEnum("DOT_IMAGE_FORMAT"); t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "}" << endl; DBG_RTF(t << "{\\comment (endCallGraph)}" << endl) @@ -2426,7 +2426,7 @@ void RTFGenerator::endDirDepGraph(const DotDirDeps &g) newParagraph(); QCString fileName = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"), - relPath,FALSE); + fileName,relPath,FALSE); // display the file t << "{" << endl; @@ -2631,7 +2631,7 @@ void RTFGenerator::endParamList() void RTFGenerator::startParameterType(bool first,const char *key) { DBG_RTF(t << "{\\comment (startParameterList)}" << endl) - if (!first) + if (!first && key) { t << " " << key << " "; } diff --git a/src/translator_br.h b/src/translator_br.h index 850e4dc..787e457 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -10,11 +10,13 @@ * Documents produced by Doxygen are derivative workns derived from the * input used in their production; they are not affected by this license. * - * Brazilian Portuguese translation version 20091215 + * Brazilian Portuguese translation version 20100531 * Maintainer: Fabio "FJTC" Jun Takada Chino <jun-chino at uol.com.br> * Thanks to Jorge Ramos, Fernando Carijo and others for their contributions. * * History: + * 20100531: + * - Updated to 1.6.3; * 20091218: * - Updated to 1.6.1; * - Copyright year updated; @@ -25,17 +27,12 @@ * - Method trTypeContraints() renamed to trTypeConstraints(). * 20071216: * - New methods since 1.5.4 updated. - * 20070914 - * - "Translate me" fixed - * - Revision number changed from doxygen version to a date string. - * - History cleanup - * - Latex babel package fixed. * Previous history removed from this version. */ #ifndef TRANSLATOR_BR_H #define TRANSLATOR_BR_H -class TranslatorBrazilian : public TranslatorAdapter_1_6_3 +class TranslatorBrazilian : public Translator { public: @@ -1781,7 +1778,6 @@ class TranslatorBrazilian : public TranslatorAdapter_1_6_3 ////////////////////////////////////////////////////////////////////////// /*! directory relation for \a name - * \todo */ virtual QCString trDirRelation(const char *name) { @@ -1811,5 +1807,60 @@ class TranslatorBrazilian : public TranslatorAdapter_1_6_3 { return "Nenhuma entrada encontrada"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 (missing items for the directory pages) +////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)"Grafo de dependência de diretórios para "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)"Arquivo em "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)"Inclui arquivo em "+name; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo" }; + static const char *months[] = { "Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro" }; + QCString sdate; + sdate.sprintf("%s, %d de %s de %d",days[dayOfWeek-1],day,months[month-1],year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } }; #endif diff --git a/src/translator_cz.h b/src/translator_cz.h index a50f40d..e17f5f7 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -20,6 +20,8 @@ // Updates: // -------- +// 2010/06/01 - typo +// 2010/04/28 - Updates for "new since 1.6.3". // 2009/09/02 - Updates for "new since 1.6.0 (mainly for the new search engine)". // 2008/06/09 - Corrections in trLegendDocs(). // 2007/11/13 - Update for "new since 1.5.4 (mainly for Fortran)". @@ -79,7 +81,7 @@ // something else. It is difficult to find the general translation // for all kinds in the Czech language. -class TranslatorCzech : public TranslatorAdapter_1_6_3 +class TranslatorCzech : public Translator { public: // --- Language control methods ------------------- @@ -1847,6 +1849,61 @@ class TranslatorCzech : public TranslatorAdapter_1_6_3 { return "Nic se nenašlo"; } -}; +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 (missing items for the directory pages) +////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)"Graf závislosti adresářů pro "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)"Soubor v "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)"Vkládá (include) soubor z "+name; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "po","út","st","čt","pá","so","ne" }; + static const char *months[] = { "led","úno","bře","dub","kvě","čer","čec","srp","zář","říj","lis","pro" }; + QCString sdate; + sdate.sprintf("%s %d. %s %d",days[dayOfWeek-1],day,months[month-1],year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d.%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } + +}; #endif // TRANSLATOR_CZ_H diff --git a/src/translator_es.h b/src/translator_es.h index f15145e..3737578 100644 --- a/src/translator_es.h +++ b/src/translator_es.h @@ -25,12 +25,13 @@ * Updated to 1.5.5 by Bartomeu Creus Navarro (5-febrero-2008) * Updated to 1.5.8 by Bartomeu Creus Navarro (10-abril-2009) * Updated to 1.6.3 by Bartomeu Creus Navarro (3-marzo-2010) + * Updated to 1.6.4 by Bartomeu Creus Navarro (26-mayo-2010) */ #ifndef TRANSLATOR_ES_H #define TRANSLATOR_ES_H -class TranslatorSpanish : public TranslatorAdapter_1_6_3 +class TranslatorSpanish : public Translator { public: @@ -1870,6 +1871,65 @@ class TranslatorSpanish : public TranslatorAdapter_1_6_3 return "Nada coincide"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 (missing items for the directory pages) +////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)"Grfico de dependencias para el directorio "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)"Fichero en "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)"Incluye ficheros en "+name; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "Lunes","Martes","Mircoles","Jueves", + "Viernes","Sbado","Domingo" }; + static const char *months[] = { "Enero","Febrero","Marzo","Abril", + "Mayo","Junio","Julio","Agosto", + "Septiembre","Octubre","Noviembre","Diciembre" }; + QCString sdate; + sdate.sprintf("%s, %d de %s de %d",days[dayOfWeek-1],day,months[month-1],year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } + + }; #endif diff --git a/src/translator_gr.h b/src/translator_gr.h index c47c054..a6044f5 100644 --- a/src/translator_gr.h +++ b/src/translator_gr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2010 by Dimitri van Heesch. + * Copyright (C) 1997-2008 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 @@ -19,14 +19,14 @@ * 15 Dec 2001 : Translation to greek by * Harry Kalogirou <no email> * - * 04 Feb 2006 : Greek maintainance by - * Paul Gessos <nickreserved@yahoo.com> + * 01 Jan 2009 : Greek maintainance by + * Paul Gessos <gessos.paul@yahoo.gr> */ #ifndef TRANSLATOR_GR_H #define TRANSLATOR_GR_H -class TranslatorGreek : public TranslatorAdapter_1_5_4 +class TranslatorGreek : public Translator { protected: friend class TranslatorAdapterBase; @@ -53,89 +53,89 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! return the language charset. This will be used for the HTML output */ virtual QCString idLanguageCharset() { - return "iso-8859-7"; + return "utf-8"; } // --- Language translation methods ------------------- /*! used in the compound documentation before a list of related functions. */ virtual QCString trRelatedFunctions() - { return " "; } + { return "Σχετικές συναρτήσεις"; } /*! subscript for the related functions. */ virtual QCString trRelatedSubscript() - { return "( .)"; } + { return "(Σημειώστε ότι αυτές δεν είναι συναρτήσεις μέλη.)"; } /*! header that is put before the detailed description of files, classes and namespaces. */ virtual QCString trDetailedDescription() - { return " "; } + { return "Λεπτομερής Περιγραφή"; } /*! header that is put before the list of typedefs. */ virtual QCString trMemberTypedefDocumentation() - { return " Typedef"; } + { return "Τεκμηρίωση Μελών Typedef"; } /*! header that is put before the list of enumerations. */ virtual QCString trMemberEnumerationDocumentation() - { return " "; } + { return "Τεκμηρίωση Απαριθμήσεων Μελών"; } /*! header that is put before the list of member functions. */ virtual QCString trMemberFunctionDocumentation() - { return " "; } + { return "Τεκμηρίωση Συναρτήσεων Μελών"; } /*! header that is put before the list of member attributes. */ virtual QCString trMemberDataDocumentation() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return " "; + return "Τεκμηρίωση Πεδίων"; } else { - return " "; + return "Τεκμηρίωση Δεδομένων Μελών"; } } /*! this is the text of a link put after brief descriptions. */ virtual QCString trMore() - { return "..."; } + { return "Περισσότερα..."; } /*! put in the class documentation */ virtual QCString trListOfAllMembers() - { return " ."; } + { return "Λίστα όλων των μελών."; } /*! used as the title of the "list of all members" page of a class */ virtual QCString trMemberList() - { return " "; } + { return "Λίστα μελών"; } /*! this is the first part of a sentence that is followed by a class name */ virtual QCString trThisIsTheListOfAllMembers() - { return " "; } + { return "Ακολουθεί η πλήρης λίστα των μελών της"; } /*! this is the remainder of the sentence after the class name */ virtual QCString trIncludingInheritedMembers() - { return ", ."; } + { return ", περιλαμβανομένων όλων των κληρονομημένων μελών."; } /*! this is put at the author sections at the bottom of man pages. * parameter s is name of the project name. */ virtual QCString trGeneratedAutomatically(const char *s) - { QCString result=" Doxygen"; - if (s) result+=(QCString)" "+s; - result+=" ."; + { QCString result="Δημιουργήθηκε αυτόματα από το Doxygen"; + if (s) result+=(QCString)" για "+s; + result+=" από τον πηγαίο κώδικα."; return result; } /*! put after an enum name in the list of all members */ virtual QCString trEnumName() - { return " "; } + { return "όνομα απαρύθμισης"; } /*! put after an enum value in the list of all members */ virtual QCString trEnumValue() - { return " "; } + { return "τιμή απαρίθμησης"; } /*! put after an undocumented member in the list of all members */ virtual QCString trDefinedIn() - { return " "; } + { return "ορισμένο στο "; } // quick reference sections @@ -143,43 +143,39 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 * compounds or files (see the \\group command). */ virtual QCString trModules() - { return ""; } + { return "Κομμάτια"; } /*! This is put above each page as a link to the class hierarchy */ virtual QCString trClassHierarchy() - { return " "; } + { return "Ιεραρχία Κλάσεων"; } /*! This is put above each page as a link to the list of annotated classes */ virtual QCString trCompoundList() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return " "; + return "Δομές Δεδομένων"; } else { - return " "; + return "Λίστα Συσσωματωμάτων"; } } /*! This is put above each page as a link to the list of documented files */ virtual QCString trFileList() - { return " "; } - - /*! This is put above each page as a link to the list of all verbatim headers */ - virtual QCString trHeaderFiles() - { return " "; } + { return "Λίστα Αρχείων"; } /*! This is put above each page as a link to all members of compounds. */ virtual QCString trCompoundMembers() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return " "; + return "Πεδία Δεδομένων"; } else { - return " "; + return "Μέλη Συσσωματώματα"; } } @@ -188,38 +184,38 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return " "; + return "Καθολικοί ορισμοί"; } else { - return " "; + return "Μέλη Αρχείων"; } } /*! This is put above each page as a link to all related pages. */ virtual QCString trRelatedPages() - { return " "; } + { return "Σχετικές Σελίδες"; } /*! This is put above each page as a link to all examples. */ virtual QCString trExamples() - { return ""; } + { return "Παραδείγματα"; } /*! This is put above each page as a link to the search engine. */ virtual QCString trSearch() - { return ""; } + { return "Αναζήτηση"; } /*! This is an introduction to the class hierarchy. */ virtual QCString trClassHierarchyDescription() - { return " , " - " , :"; + { return "Αυτή η λίστα κληρονομηκότητας είναι μερικώς ταξινομημένη, " + "αλλά όχι πλήρως, αλφαβητικά:"; } /*! This is an introduction to the list with all files. */ virtual QCString trFileListDescription(bool extractAll) { - QCString result=" "; - if (!extractAll) result+=" "; - result+=" :"; + QCString result="Ακολουθεί μια λίστα όλων των "; + if (!extractAll) result+="τεκμηριωμένων "; + result+="αρχείων με σύντομες περιγραφές:"; return result; } @@ -229,52 +225,52 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return " :"; + return "Ακολουθούνε οι δομές δεδομένων με σύντομες περιγραφές:"; } else { - return " , , " - " :"; + return "Ακολουθούνε οι κλάσεις, οι δομές, " + "τα σώματα και οι διαπροσωπίες με σύντομες περιγραφές:"; } } /*! This is an introduction to the page with all class members. */ virtual QCString trCompoundMembersDescription(bool extractAll) { - QCString result=" "; + QCString result="Ακολουθεί η λίστα όλων των "; if (!extractAll) { - result+=" "; + result+="τεκμηριωμένων "; } if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+=" "; + result+="πεδίων δομών και σωμάτων "; } else { - result+=""; + result+="κλάσεων"; } - result+=" "; + result+=" με συνδέσμους "; if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+=" / :"; + result+="στην τεκμηρίωση των δομών/ενώσεων για κάθε πεδίο:"; } else { - result+=" :"; + result+="στην τεκμηρίωση των κλάσεων για κάθε πεδίο:"; } } else { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+=" / :"; + result+="στις δομές/ενώσεις που ανήκουν:"; } else { - result+=" :"; + result+="στις κλάσεις που ανήκουν:"; } } return result; @@ -283,65 +279,55 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! This is an introduction to the page with all file members. */ virtual QCString trFileMembersDescription(bool extractAll) { - QCString result=" "; - if (!extractAll) result+=" "; + QCString result="Ακολουθεί η λίστα όλων των "; + if (!extractAll) result+="τεκμηριωμένων "; if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+=", , , , "; + result+="συναρτήσεων, μεταβλητών, ορισμών, απαριθμήσεων, και ορισμών τύπων"; } else { - result+=" "; + result+="μελών αρχείων"; } - result+=" "; + result+=" με συνδέσμους "; if (extractAll) - result+=" :"; + result+="στα αρχεία που ανήκουν:"; else - result+=" :"; + result+="στην τεκμηρίωση:"; return result; } - /*! This is an introduction to the page with the list of all header files. */ - virtual QCString trHeaderFilesDescription() - { return " API:"; } - /*! This is an introduction to the page with the list of all examples */ virtual QCString trExamplesDescription() - { return " :"; } + { return "Ακολουθεί η λίστα με τα παραδείγματα:"; } /*! This is an introduction to the page with the list of related pages */ virtual QCString trRelatedPagesDescription() - { return " :"; } + { return "Ακολουθεί η λίστα όλων των σχετικών σελίδων τεκμηρίωσης:"; } /*! This is an introduction to the page with the list of class/file groups */ virtual QCString trModulesDescription() - { return " :"; } - - /*! This sentences is used in the annotated class/file lists if no brief - * description is given. - */ - virtual QCString trNoDescriptionAvailable() - { return " "; } + { return "Ακολουθεί η λίστα όλων των μονάδων:"; } // index titles (the project name is prepended for these) /*! This is used in HTML as the title of index.html. */ virtual QCString trDocumentation() - { return ""; } + { return "Τεκμηρίωση"; } /*! This is used in LaTeX as the title of the chapter with the * index of all groups. */ virtual QCString trModuleIndex() - { return " "; } + { return "Ευρετήριο μονάδων"; } /*! This is used in LaTeX as the title of the chapter with the * class hierarchy. */ virtual QCString trHierarchicalIndex() - { return " "; } + { return "Ιεραρχικό Ευρετήριο"; } /*! This is used in LaTeX as the title of the chapter with the * annotated compound index. @@ -350,11 +336,11 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return " "; + return "Ευρετήριο δομών δεδομένων"; } else { - return " "; + return "Συμπαγές Ευρετήριο"; } } @@ -362,13 +348,13 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 * list of all files. */ virtual QCString trFileIndex() - { return " "; } + { return "Ευρετήτιο Αρχείων"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all groups. */ virtual QCString trModuleDocumentation() - { return " "; } + { return "Τεκμηρίωση Μονάδων"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all classes, structs and unions. @@ -377,11 +363,11 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return " "; + return "Τεκμηρίωση Δομών Δεδομένων"; } else { - return " "; + return "Τεκμηρίωση Κλάσεων"; } } @@ -389,101 +375,101 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 * the documentation of all files. */ virtual QCString trFileDocumentation() - { return " "; } + { return "Τεκμηρίωση Αρχείων"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all examples. */ virtual QCString trExampleDocumentation() - { return " "; } + { return "Τεκμηρίωση Παραδειγμάτων"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all related pages. */ virtual QCString trPageDocumentation() - { return " "; } + { return "Τεκμηρίωση Σελίδων"; } /*! This is used in LaTeX as the title of the document */ virtual QCString trReferenceManual() - { return " "; } + { return "Ενχειρίδιο Αναφοράς"; } /*! This is used in the documentation of a file as a header before the * list of defines */ virtual QCString trDefines() - { return ""; } + { return "Ορισμοί"; } /*! This is used in the documentation of a file as a header before the * list of function prototypes */ virtual QCString trFuncProtos() - { return " "; } + { return "Πρωτοτυπήσεις Συναρτήσεων"; } /*! This is used in the documentation of a file as a header before the * list of typedefs */ virtual QCString trTypedefs() - { return " "; } + { return "Ορισμοί Τύπων"; } /*! This is used in the documentation of a file as a header before the * list of enumerations */ virtual QCString trEnumerations() - { return ""; } + { return "Απαριθμήσεις"; } /*! This is used in the documentation of a file as a header before the * list of (global) functions */ virtual QCString trFunctions() - { return ""; } + { return "Συναρτήσεις"; } /*! This is used in the documentation of a file as a header before the * list of (global) variables */ virtual QCString trVariables() - { return ""; } + { return "Μεταβλητές"; } /*! This is used in the documentation of a file as a header before the * list of (global) variables */ virtual QCString trEnumerationValues() - { return " "; } + { return "Τιμές Απαριθμήσεων"; } /*! This is used in the documentation of a file before the list of * documentation blocks for defines */ virtual QCString trDefineDocumentation() - { return " "; } + { return "Τεκμηρίωση Ορισμών"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for function prototypes */ virtual QCString trFunctionPrototypeDocumentation() - { return " "; } + { return "Τεκμηρίωση Πρωτοτυπήσεων των Συναρτήσεων"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for typedefs */ virtual QCString trTypedefDocumentation() - { return " "; } + { return "Τεκμηρίωση Ορισμών Τύπων"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration types */ virtual QCString trEnumerationTypeDocumentation() - { return " "; } + { return "Τεκμηρίωση Απαριθμήσεων"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for functions */ virtual QCString trFunctionDocumentation() - { return " "; } + { return "Τεκμηρίωση Συναρτήσεων"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for variables */ virtual QCString trVariableDocumentation() - { return " "; } + { return "Τεκμηρίωση Μεταβλητών"; } /*! This is used in the documentation of a file/namespace/group before * the list of links to documented compounds @@ -492,11 +478,11 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return " "; + return "Δομές Δεδομένων"; } else { - return ""; + return "Συσσωματώματα"; } } @@ -505,67 +491,59 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trGeneratedAt(const char *date,const char *projName) { - QCString result=(QCString)" "+date; - if (projName) result+=(QCString)" "+projName; - result+=(QCString)" "; + QCString result=(QCString)"Δημιουργήθηκε στις "+date; + if (projName) result+=(QCString)" για "+projName; + result+=(QCString)" από"; return result; } /*! This is part of the sentence used in the standard footer of each page. */ virtual QCString trWrittenBy() { - return " "; + return "γραμμένο από τον "; } /*! this text is put before a class diagram */ virtual QCString trClassDiagram(const char *clName) { - return (QCString)" "+clName+":"; + return (QCString)"Διάγραμμα κληρονομικότητας για την "+clName+":"; } /*! this text is generated when the \\internal command is used. */ virtual QCString trForInternalUseOnly() - { return " ."; } - - /*! this text is generated when the \\reimp command is used. */ - virtual QCString trReimplementedForInternalReasons() - { return " , API ."; } + { return "Μόνο για εσωτερική χρήση."; } /*! this text is generated when the \\warning command is used. */ virtual QCString trWarning() - { return ""; } - - /*! this text is generated when the \\bug command is used. */ - virtual QCString trBugsAndLimitations() - { return " "; } + { return "Προειδοποίηση"; } /*! this text is generated when the \\version command is used. */ virtual QCString trVersion() - { return ""; } + { return "Έκδοση"; } /*! this text is generated when the \\date command is used. */ virtual QCString trDate() - { return "/"; } + { return "Ημ/νια"; } /*! this text is generated when the \\return command is used. */ virtual QCString trReturns() - { return ""; } + { return "Επιστρέφει"; } /*! this text is generated when the \\sa command is used. */ virtual QCString trSeeAlso() - { return " "; } + { return "Κοιτάξτε επίσης "; } /*! this text is generated when the \\param command is used. */ virtual QCString trParameters() - { return ""; } + { return "Παράμετροι"; } /*! this text is generated when the \\exception command is used. */ virtual QCString trExceptions() - { return ""; } + { return "Εξαίρεση"; } /*! this text is used in the title page of a LaTeX document. */ virtual QCString trGeneratedBy() - { return " "; } + { return "Δημιουργήθηκε από "; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990307 @@ -573,14 +551,14 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! used as the title of page containing all the index of all namespaces. */ virtual QCString trNamespaceList() - { return " Namespace"; } + { return "Λίστα Namespace"; } /*! used as an introduction to the namespace list */ virtual QCString trNamespaceListDescription(bool extractAll) { - QCString result=" "; - if (!extractAll) result+=" "; - result+="Namespace :"; + QCString result="Ακολουθέι η λίστα όλων των "; + if (!extractAll) result+="τεκμηριωμένων "; + result+="Namespace με σύντομες περιγραφές:"; return result; } @@ -588,7 +566,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 * friends of a class */ virtual QCString trFriends() - { return ""; } + { return "Φίλοι"; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990405 @@ -598,7 +576,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 * related classes */ virtual QCString trRelatedFunctionDocumentation() - { return " "; } + { return "Τεκμηρίωση Φιλικών και Συσχετιζόμενων Συναρτήσεων"; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990425 @@ -610,16 +588,16 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 bool isTemplate) { QCString result=(QCString)clName+" "; - result+=" "; + result+=" Αναφορά"; switch(compType) { - case ClassDef::Class: result+=" "; break; - case ClassDef::Struct: result+=" "; break; - case ClassDef::Union: result+=" "; break; - case ClassDef::Interface: result+=" "; break; - case ClassDef::Protocol: result+=" "; break; - case ClassDef::Category: result+=" "; break; - case ClassDef::Exception: result+=" "; break; + case ClassDef::Class: result+=" Κλάσης"; break; + case ClassDef::Struct: result+=" Δομής"; break; + case ClassDef::Union: result+=" Ένωσης"; break; + case ClassDef::Interface: result+=" Διαπροσωπίας"; break; + case ClassDef::Protocol: result+=" Πρωτοκόλλου"; break; + case ClassDef::Category: result+=" Κατηγορίας"; break; + case ClassDef::Exception: result+=" Εξαίρεσης"; break; } if (isTemplate) result+=" Template"; @@ -630,7 +608,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 virtual QCString trFileReference(const char *fileName) { QCString result=fileName; - result+=" "; + result+=" Αναφορά Αρχείου"; return result; } @@ -638,30 +616,30 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 virtual QCString trNamespaceReference(const char *namespaceName) { QCString result=namespaceName; - result+=" Namespace"; + result+=" Αναφορά Namespace"; return result; } virtual QCString trPublicMembers() - { return " "; } + { return "Δημόσιες Μέθοδοι"; } virtual QCString trPublicSlots() - { return " Slots"; } + { return "Δημόσια Slots"; } virtual QCString trSignals() - { return ""; } + { return "Σήματα"; } virtual QCString trStaticPublicMembers() - { return " "; } + { return "Στατικές Δημόσιες Μέδοδοι"; } virtual QCString trProtectedMembers() - { return " "; } + { return "Προστατευμένες Μέδοδοι"; } virtual QCString trProtectedSlots() - { return " Slots"; } + { return "Προστατευμένα Slots"; } virtual QCString trStaticProtectedMembers() - { return " "; } + { return "Στατικές Προστατευμένες Μέδοδοι"; } virtual QCString trPrivateMembers() - { return " "; } + { return "Ιδιοτικές Μέδοδοι"; } virtual QCString trPrivateSlots() - { return " Slots"; } + { return "Ιδιοτικά Slots"; } virtual QCString trStaticPrivateMembers() - { return " "; } + { return "Στατικές Ιδιοτικές Μέδοδοι"; } /*! this function is used to produce a comma-separated list of items. * use generateMarker(i) to indicate where item i should be put. @@ -682,7 +660,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 if (i<numEntries-2) // not the fore last entry result+=", "; else // the fore last entry - result+=", "; + result+=", και "; } } return result; @@ -693,7 +671,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trInheritsList(int numEntries) { - return " "+trWriteList(numEntries)+"."; + return "Κληρονομεί "+trWriteList(numEntries)+"."; } /*! used in class documentation to produce a list of super classes, @@ -701,7 +679,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trInheritedByList(int numEntries) { - return " "+trWriteList(numEntries)+"."; + return "Κληρονομείται από "+trWriteList(numEntries)+"."; } /*! used in member documentation blocks to produce a list of @@ -709,7 +687,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trReimplementedFromList(int numEntries) { - return " "+trWriteList(numEntries)+"."; + return "Επαναϋλοποιείται από "+trWriteList(numEntries)+"."; } /*! used in member documentation blocks to produce a list of @@ -717,36 +695,36 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trReimplementedInList(int numEntries) { - return " "+trWriteList(numEntries)+"."; + return "Επαναϋλοποιείται στην "+trWriteList(numEntries)+"."; } /*! This is put above each page as a link to all members of namespaces. */ virtual QCString trNamespaceMembers() - { return " Namespace"; } + { return "Μέλη Namespace"; } /*! This is an introduction to the page with all namespace members */ virtual QCString trNamespaceMemberDescription(bool extractAll) { - QCString result=" "; - if (!extractAll) result+=" "; - result+=" "; + QCString result="Ακολουθεί η λίστα όλων των "; + if (!extractAll) result+="τεκμηριωμένων "; + result+="μελών χώρων ονομάτων με συνδέσμους "; if (extractAll) - result+=" :"; + result+="στην τεκμηρίωση του χώρου ονομάτων για κάθε μέλος:"; else - result+=" :"; + result+="στους χώρους ονομάτων που ανήκουν:"; return result; } /*! This is used in LaTeX as the title of the chapter with the * index of all namespaces. */ virtual QCString trNamespaceIndex() - { return " "; } + { return "Ευρετήριο Χώρων Ονομάτων"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all namespaces. */ virtual QCString trNamespaceDocumentation() - { return " "; } + { return "Τεκμηρίωση Χώρων Ονομάτων"; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990522 @@ -756,7 +734,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 * namespaces in a file. */ virtual QCString trNamespaces() - { return " "; } + { return "Χώροι Ονομάτων"; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990728 @@ -769,19 +747,19 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 bool single) { // here s is one of " Class", " Struct" or " Union" // single is true implies a single file - QCString result=(QCString)" "; + QCString result=(QCString)"Η τεκμηρίωση για "; switch(compType) { - case ClassDef::Class: result+=" "; break; - case ClassDef::Struct: result+=" "; break; - case ClassDef::Union: result+=" "; break; - case ClassDef::Interface: result+=" "; break; - case ClassDef::Protocol: result+="Protocol"; break; // translate me! - case ClassDef::Category: result+="Category"; break; // translate me! - case ClassDef::Exception: result+=" "; break; + case ClassDef::Class: result+="αυτή την κλάση"; break; + case ClassDef::Struct: result+="αυτή η δομή"; break; + case ClassDef::Union: result+="αυτή η ένωση"; break; + case ClassDef::Interface: result+="αυτή η διαπροσωπία"; break; + case ClassDef::Protocol: result+="Πρωτόκολλο"; break; + case ClassDef::Category: result+="Κατηγορία"; break; + case ClassDef::Exception: result+="αυτή η εξαίρεση"; break; } - result+=" "; - if (single) result+=" :"; else result+=" :"; + result+=" δημιουργήθηκε απο τ"; + if (single) result+="ο ακόλουθο αρχείο:"; else result+="α ακόλουθα αρχεία:"; return result; } @@ -789,7 +767,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 * list. */ virtual QCString trAlphabeticalList() - { return " "; } + { return "Αλφαβητική Λίστα"; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990901 @@ -797,34 +775,30 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! This is used as the heading text for the retval command. */ virtual QCString trReturnValues() - { return " "; } + { return "Τιμές Επιστροφής"; } /*! This is in the (quick) index as a link to the main page (index.html) */ virtual QCString trMainPage() - { return " "; } + { return "Κύρια Σελίδα"; } /*! This is used in references to page that are put in the LaTeX * documentation. It should be an abbreviation of the word page. */ virtual QCString trPageAbbreviation() - { return "."; } + { return "σελ."; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-991003 ////////////////////////////////////////////////////////////////////////// - virtual QCString trSources() - { - return ""; - } virtual QCString trDefinedAtLineInSourceFile() { - return " @0 @1."; + return "Ορισμός στη γραμμή @0 του αρχείου @1."; } virtual QCString trDefinedInSourceFile() { - return " @0."; + return "Ορισμός στο αρχείο @0."; } ////////////////////////////////////////////////////////////////////////// @@ -833,7 +807,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 virtual QCString trDeprecated() { - return ""; + return "Αποσυρμένο"; } ////////////////////////////////////////////////////////////////////////// @@ -843,68 +817,68 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! this text is put before a collaboration diagram */ virtual QCString trCollaborationDiagram(const char *clName) { - return (QCString)" "+clName+":"; + return (QCString)"Δίαγραμμα Συνεργασίας για την κλάση "+clName+":"; } /*! this text is put before an include dependency graph */ virtual QCString trInclDepGraph(const char *fName) { - return (QCString)" Include "+fName+":"; + return (QCString)"Διάγραμμα εξάρτησης Include για το αρχείο "+fName+":"; } /*! header that is put before the list of constructor/destructors. */ virtual QCString trConstructorDocumentation() { - return " Constructor & Destructor"; + return "Τεκμηρίωση Constructor & Destructor"; } /*! Used in the file documentation to point to the corresponding sources. */ virtual QCString trGotoSourceCode() { - return " ."; + return "Πήγαινε στον πηγαίο κώδικα του αρχείου."; } /*! Used in the file sources to point to the corresponding documentation. */ virtual QCString trGotoDocumentation() { - return " ."; + return "Πήγαινε στην τεκμηρίωση του αρχείου."; } /*! Text for the \\pre command */ virtual QCString trPrecondition() { - return ""; + return "Προϋποθέσεις"; } /*! Text for the \\post command */ virtual QCString trPostcondition() { - return ""; + return "Μεταϋποθέσεις"; } /*! Text for the \\invariant command */ virtual QCString trInvariant() { - return ""; + return "Αμετάβλητα"; } /*! Text shown before a multi-line variable/enum initialization */ virtual QCString trInitialValue() { - return " :"; + return "Αρχική τιμή:"; } /*! Text used the source code in the file index */ virtual QCString trCode() { - return ""; + return "κώδικας"; } virtual QCString trGraphicalHierarchy() { - return " "; + return "Γραφική Αναπαράσταση Της Ιεραρχίας Των Κλάσεων"; } virtual QCString trGotoGraphicalHierarchy() { - return " "; + return "Πήγαινε στην γραφική αναπαράσταση της ιεραρχίας των κλάσεων"; } virtual QCString trGotoTextualHierarchy() { - return " "; + return "Πήγαινε στην με κείμενο αναπαράσταση της ιεραρχίας των κλάσεων"; } virtual QCString trPageIndex() { - return " "; + return "Ευρετήριο Σελίδων"; } ////////////////////////////////////////////////////////////////////////// @@ -913,50 +887,50 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 virtual QCString trNote() { - return ""; + return "Σημείωση"; } virtual QCString trPublicTypes() { - return " "; + return "Δημόσιοι Τυποι"; } virtual QCString trPublicAttribs() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return " "; + return "Πεδία Δεδομένων"; } else { - return " "; + return "Δημόσια Χαρακτηριστικά"; } } virtual QCString trStaticPublicAttribs() { - return " "; + return "Στατικά Δημόσια Χαρακτηριστικά"; } virtual QCString trProtectedTypes() { - return " "; + return "Προστατευμένοι Τύποι"; } virtual QCString trProtectedAttribs() { - return " "; + return "Προστατευμένα Χαρακτηριστικά"; } virtual QCString trStaticProtectedAttribs() { - return " "; + return "Στατικά Προστατευμένα Χαρακτηριστικά"; } virtual QCString trPrivateTypes() { - return " "; + return "Ιδιωτικοί Τύποι"; } virtual QCString trPrivateAttribs() { - return " "; + return "Ιδιωτικα Χαρακτηριστικά"; } virtual QCString trStaticPrivateAttribs() { - return " "; + return "Στατικά Ιδιωτικα Χαρακτηριστικά"; } ////////////////////////////////////////////////////////////////////////// @@ -966,12 +940,12 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! Used as a marker that is put before a \\todo item */ virtual QCString trTodo() { - return " "; + return "Προς Υλοποίηση"; } /*! Used as the header of the todo list */ virtual QCString trTodoList() { - return " "; + return "Λίστα των Προς Υλοποίηση"; } ////////////////////////////////////////////////////////////////////////// @@ -980,24 +954,24 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 virtual QCString trReferencedBy() { - return " "; + return "Αναφορά από"; } virtual QCString trRemarks() { - return ""; + return "Παρατήρηση"; } virtual QCString trAttention() { - return ""; + return "Προσοχή"; } virtual QCString trInclByDepGraph() { - return " " - " :"; + return "Το γράφημα αυτό παρουσιάζει ποιά αρχεία άμεσα ή " + "έμεσα περιλαμβάνουν αυτό το αρχείο:"; } virtual QCString trSince() { - return ""; + return "Από"; } ////////////////////////////////////////////////////////////////////////// @@ -1007,7 +981,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! title of the graph legend page */ virtual QCString trLegendTitle() { - return " "; + return "Υπόμνημα Διαγραμμάτων"; } /*! page explaining how the dot graph's should be interpreted * The %A in the text below are to prevent link to classes called "A". @@ -1015,9 +989,9 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 virtual QCString trLegendDocs() { return - " " - " doxygen.<p>\n" - " :" + "Αυτή η σελίδα εξηγεί το πως ερμηνεύονται τα διαγράμματα που δημιουργούνται " + "από το doxygen.<p>\n" + "Θεωρείστε το παρακάτω παράδειγμα:" "\\code\n" "/*! Invisible class because of truncation */\n" "class Invisible { };\n\n" @@ -1046,35 +1020,40 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 " Used *m_usedClass;\n" "};\n" "\\endcode\n" - " \\c MAX_DOT_GRAPH_HEIGHT " - " 200 :" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "Αυτό οδηγεί στο επόμενο γράφημα:" + "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n" "<p>\n" - " :\n" + "Τα κουτιά στο παραπάνω διάγραμμα έχουν την ακόλουθη σημασία:\n" + "</p>\n" "<ul>\n" - "<li> " - " .\n" - "<li> .\n" - "<li> .\n" - "<li> " - " . % " - " ." + "<li>Ένα γεμισμένο μαύρο κουτί αναπαριστά τη δομή ή την κλάση για την οποία" + "αφορά το διάγραμμα.\n" + "<li>Ένα κουτί με μαύρο περίγραμμα αναπαριστά μία τεκμηριωμένη δομή ή κλάση.\n" + "<li>Ένα κουτί με γκρίζο περίγραμμα αναπαριστά μία μη τεκμηριωμένη δομή ή κλάση.\n" + "<li>Ένα κουτί με κόκκινο περίγραμμα αναπαριστά μία τεκμηριωμένη δομή ή κλάση για " + "την οποία δεν παρουσιάζονται όλες οι σχέσεις κληρονομικότητας και περιεχομένου. %Ένα " + "διάγραμμα μειώνεται αν δεν χωράει στις ορισμένες διαστάσεις." "</ul>\n" - " :\n" + "<p>\n" + "Τα βέλη έχουν τις ακόλουθες σημασίες:\n" + "</p>\n" "<ul>\n" - "<li> " - " .\n" - "<li> .\n" - "<li> .\n" - "<li> " - " . () " - " . \n" + "<li>Ένα βαθύ μπλε βέλος χρησιμοποιείται για να παρουσιάσει μία δημόσια σχέση κληρονομικότητας " + "μεταξύ δύο κλάσεων.</li>\n" + "<li>Ένα βαθύ πράσινο βέλος χρησιμοποιείται για προστατευμένη κληρονομικότητα.</li>\n" + "<li>Ένα βαθύ κόκκινο βέλος χρησιμοποιείται για ιδιωτική κληρονομικότητα.</li>\n" + "<li>Ένα μωβ διακεκομένο βέλος χρησιμοποιείται αν μία κλάση περιέχεται ή χρησιμοποιείται " + "από μία άλλη κλάση. Το βέλος ονομάζεται από το όνομα της μεταβλητής(ων) " + "μέσω της οποίας η κλάση ή δομή είναι προσβάσιμη.</li>\n" + "<li>Ένα κίτρινο διακεκομμένο βέλος χρησιμοποιείται για μια σχέση μεταξύ ενός template αντικειμένου και " + "της template κλάσης από την οποία δημιουργήθηκε. Το βέλος ονομάζεται με τις παραμέτρους του template " + "του αντικειμένου.</li>\n" "</ul>\n"; } /*! text for the link to the legend page */ virtual QCString trLegend() { - return ""; + return "υπόμνημα"; } ////////////////////////////////////////////////////////////////////////// @@ -1084,12 +1063,12 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! Used as a marker that is put before a test item */ virtual QCString trTest() { - return ""; + return "Δοκιμαστικό"; } /*! Used as the header of the test list */ virtual QCString trTestList() { - return " "; + return "Λίστα Δοκιμαστικών"; } ////////////////////////////////////////////////////////////////////////// @@ -1099,7 +1078,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! Used as a section header for KDE-2 IDL methods */ virtual QCString trDCOPMethods() { - return " DCOP"; + return "Μέδοδοι DCOP"; } ////////////////////////////////////////////////////////////////////////// @@ -1109,64 +1088,54 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! Used as a section header for IDL properties */ virtual QCString trProperties() { - return ""; + return "Ιδιότητες"; } /*! Used as a section header for IDL property documentation */ virtual QCString trPropertyDocumentation() { - return " "; + return "Τεκμηρίωση Ιδιοτήτων"; } ////////////////////////////////////////////////////////////////////////// // new since 1.2.4 ////////////////////////////////////////////////////////////////////////// - /*! Used for Java interfaces in the summary section of Java packages */ - virtual QCString trInterfaces() - { - return ""; - } /*! Used for Java classes in the summary section of Java packages */ virtual QCString trClasses() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return " "; + return "Δομές Δεδομένων"; } else { - return ""; + return "Κλάσεις"; } } /*! Used as the title of a Java package */ virtual QCString trPackage(const char *name) { - return (QCString)" "+name; + return (QCString)"Πακέτο "+name; } /*! Title of the package index page */ virtual QCString trPackageList() { - return " "; + return "Λίστα Πακέτων"; } /*! The description of the package index page */ virtual QCString trPackageListDescription() { - return " ( ):"; + return "Ακολουθεί η λίστα των πακέτων με σύντομη περιγραφή (αν υπάρχει):"; } /*! The link name in the Quick links header for each page */ virtual QCString trPackages() { - return ""; - } - /*! Used as a chapter title for Latex & RTF output */ - virtual QCString trPackageDocumentation() - { - return " "; + return "Πακέτα"; } /*! Text shown before a multi-line define */ virtual QCString trDefineValue() { - return ":"; + return "Τιμή:"; } ////////////////////////////////////////////////////////////////////////// @@ -1176,12 +1145,12 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! Used as a marker that is put before a \\bug item */ virtual QCString trBug() { - return ""; + return "Πρόβλημα"; } /*! Used as the header of the bug list */ virtual QCString trBugList() { - return " "; + return "Λίστα Προβλημάτων"; } ////////////////////////////////////////////////////////////////////////// @@ -1230,7 +1199,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! Used as header RTF general index */ virtual QCString trRTFGeneralIndex() { - return ""; + return "Ευρετήριο"; } /*! This is used for translation of the word that will possibly @@ -1239,7 +1208,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trClass(bool first_capital, bool singular) { - QCString result((first_capital ? "" : "")); + QCString result((first_capital ? "Κλάση" : "κλάση")); if (!singular) result+=""; return result; } @@ -1250,8 +1219,8 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trFile(bool first_capital, bool singular) { - QCString result((first_capital ? "" : "")); - if (!singular) result+=""; else result+=""; + QCString result((first_capital ? "Αρχεί" : "αρχεί")); + if (!singular) result+="α"; else result+="ο"; return result; } @@ -1272,8 +1241,8 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trGroup(bool first_capital, bool singular) { - QCString result((first_capital ? "" : "")); - if (!singular) result+=""; else result+=""; + QCString result((first_capital ? "Ομάδ" : "ομάδ")); + if (!singular) result+="ες"; else result+="α"; return result; } @@ -1283,8 +1252,8 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trPage(bool first_capital, bool singular) { - QCString result((first_capital ? "" : "")); - if (!singular) result+=""; else result+=""; + QCString result((first_capital ? "Σελίδ" : "σελίδ")); + if (!singular) result+="ες"; else result+="α"; return result; } @@ -1294,19 +1263,8 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trMember(bool first_capital, bool singular) { - QCString result((first_capital ? "" : "")); - if (!singular) result+=""; else result+=""; - return result; - } - - /*! This is used for translation of the word that will possibly - * be followed by a single name or by a list of names - * of the category. - */ - virtual QCString trField(bool first_capital, bool singular) - { - QCString result((first_capital ? "" : "")); - if (!singular) result+=""; else result+=""; + QCString result((first_capital ? "Μέλ" : "μέλ")); + if (!singular) result+="η"; else result+="ος"; return result; } @@ -1316,8 +1274,8 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trGlobal(bool first_capital, bool singular) { - QCString result((first_capital ? "" : "")); - if (!singular) result+=""; else result+=""; + QCString result((first_capital ? "Καθολικ" : "καθολικ")); + if (!singular) result+="ές"; else result+="ή"; return result; } @@ -1329,8 +1287,8 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 * for the author section in man pages. */ virtual QCString trAuthor(bool first_capital, bool singular) { - QCString result((first_capital ? "" : "")); - if (!singular) result+=""; else result+=""; + QCString result((first_capital ? "Συγραφ" : "συγραφ")); + if (!singular) result+=""; else result+="έας"; return result; } @@ -1342,7 +1300,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trReferences() { - return ""; + return "Αναφορές"; } ////////////////////////////////////////////////////////////////////////// @@ -1354,7 +1312,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trImplementedFromList(int numEntries) { - return " "+trWriteList(numEntries)+"."; + return "Υλοποιεί "+trWriteList(numEntries)+"."; } /*! used in member documentation blocks to produce a list of @@ -1362,7 +1320,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trImplementedInList(int numEntries) { - return " "+trWriteList(numEntries)+"."; + return "Υλοποιείται από "+trWriteList(numEntries)+"."; } ////////////////////////////////////////////////////////////////////////// @@ -1374,7 +1332,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trRTFTableOfContents() { - return " "; + return "Πίνακας Περιεχομένων"; } ////////////////////////////////////////////////////////////////////////// @@ -1386,7 +1344,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trDeprecatedList() { - return " "; + return "Λίστα Καταργημένων"; } ////////////////////////////////////////////////////////////////////////// @@ -1398,12 +1356,12 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trEvents() { - return ""; + return "Συμβάντα"; } /*! Header used for the documentation section of a class' events. */ virtual QCString trEventDocumentation() { - return " "; + return "Τεκμηρίωση Συμβάντων"; } ////////////////////////////////////////////////////////////////////////// @@ -1414,35 +1372,35 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trPackageTypes() { - return " "; + return "Τύποι Πακέτων"; } /*! Used as a heading for a list of Java class functions with package * scope. */ virtual QCString trPackageMembers() { - return " "; + return "Συναρτήσεις Πακέτου"; } /*! Used as a heading for a list of static Java class functions with * package scope. */ virtual QCString trStaticPackageMembers() { - return " "; + return "Στατικές Συναρτήσεις Πακέτου"; } /*! Used as a heading for a list of Java class variables with package * scope. */ virtual QCString trPackageAttribs() { - return " "; + return "Μεταβλητές Πακέτου"; } /*! Used as a heading for a list of static Java class variables with * package scope. */ virtual QCString trStaticPackageAttribs() { - return " "; + return "Στατικές Μεταβλητές Πακέτου"; } ////////////////////////////////////////////////////////////////////////// @@ -1454,12 +1412,12 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trAll() { - return ""; + return "Όλα"; } /*! Put in front of the call graph for a function. */ virtual QCString trCallGraph() { - return " :"; + return "Το γράφημα δείχνει ποιές συναρτήσεις καλούνται από αυτή:"; } ////////////////////////////////////////////////////////////////////////// @@ -1472,14 +1430,14 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trSearchForIndex() { - return " "; + return "Αναζήτηση για"; } /*! This string is used as the title for the page listing the search * results. */ virtual QCString trSearchResultsTitle() { - return " "; + return "Αποτελέσματα Αναζήτησης"; } /*! This string is put just before listing the search results. The * text can be different depending on the number of documents found. @@ -1493,16 +1451,16 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 { if (numDocuments==0) { - return ", ."; + return "Συγγνώμη, δεν υπάρχει κείμενο που να ταιριάζει με την αίτησή σας."; } else if (numDocuments==1) { - return " <b>1</b> ."; + return "Βρέθηκε <b>1</b> κείμενο που ταιριάζει με την αίτησή σας."; } else { - return " <b>$num</b> . " - " ."; + return "Βρέθηκαν <b>$num</b> κείμενα που ταιριάζουν με την αίτησή σας. " + "Πρώτα εμφανίζονται τα κείμενα που ταιριάζουν πιο πολύ."; } } /*! This string is put before the list of matched words, for each search @@ -1510,7 +1468,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trSearchMatches() { - return ":"; + return "Ταίριαξαν:"; } ////////////////////////////////////////////////////////////////////////// @@ -1521,7 +1479,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trSourceFile(QCString& filename) { - return " " + filename; + return "Αρχείο κώδικα " + filename; } ////////////////////////////////////////////////////////////////////////// @@ -1532,41 +1490,41 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 * hierarchy. */ virtual QCString trDirIndex() - { return " "; } + { return "Ιεραρχία Καταλόγου"; } /*! This is used as the name of the chapter containing the documentation * of the directories. */ virtual QCString trDirDocumentation() - { return " "; } + { return "Τεκμηρίωση Καταλόγου"; } /*! This is used as the title of the directory index and also in the * Quick links of an HTML page, to link to the directory hierarchy. */ virtual QCString trDirectories() - { return ""; } + { return "Κατάλογοι"; } /*! This returns a sentences that introduces the directory hierarchy. * and the fact that it is sorted alphabetically per level */ virtual QCString trDirDescription() { - return " , :"; + return "Η ιεραρχία καταλόγων ταξινομήθηκε αλφαβητικά, αλλά όχι πολύ αυστηρά:"; } /*! This returns the title of a directory page. The name of the * directory is passed via \a dirName. */ virtual QCString trDirReference(const char *dirName) - { QCString result=QCString(" ") + dirName; return result; } + { QCString result=QCString("Αναφορά του Καταλόγου ") + dirName; return result; } /*! This returns the word directory with or without starting capital * (\a first_capital) and in sigular or plural form (\a singular). */ virtual QCString trDir(bool first_capital, bool singular) { - QCString result((first_capital ? "" : "")); - if (singular) result+=""; else result+=""; + QCString result((first_capital ? "Κατάλογο" : "κατάλογο")); + if (singular) result+="ς"; else result+="ι"; return result; } @@ -1579,9 +1537,9 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 */ virtual QCString trOverloadText() { - return " -, " - " . " - " ."; + return "Αυτή είναι μια υπερφορτωμένη συνάρτηση-μέλος, " + "που παρέχεται για ευκολία. Διαφέρει από την παραπάνω " + "συνάρτηση μόνο στον τύπο των παραμέτρων που δέχεται."; } ////////////////////////////////////////////////////////////////////////// @@ -1591,7 +1549,7 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 /*! This is used to introduce a caller (or called-by) graph */ virtual QCString trCallerGraph() { - return " :"; + return "Το γράφημα δείχνει από ποιές συναρτήσεις καλείται αυτή η συνάρτηση:"; } /*! This is used in the documentation of a file/namespace before the list @@ -1600,6 +1558,294 @@ class TranslatorGreek : public TranslatorAdapter_1_5_4 virtual QCString trEnumerationValueDocumentation() { return "Enumerator Documentation"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.5.4 (mainly for Fortran) +////////////////////////////////////////////////////////////////////////// + + /*! header that is put before the list of member subprograms (Fortran). */ + virtual QCString trMemberFunctionDocumentationFortran() + { return "Τεκμηρίωση Συνάρτησης/Υπορουτίνας Μέλους"; } + + /*! This is put above each page as a link to the list of annotated data types (Fortran). */ + virtual QCString trCompoundListFortran() + { return "Λίστα Τύπων Δεδομένων"; } + + /*! This is put above each page as a link to all members of compounds (Fortran). */ + virtual QCString trCompoundMembersFortran() + { return "Πεδία Δεδομένων"; } + + /*! This is an introduction to the annotated compound list (Fortran). */ + virtual QCString trCompoundListDescriptionFortran() + { return "Εδώ είναι οι τύποι δεδομένων με σύντομη περιγραφή:"; } + + /*! This is an introduction to the page with all data types (Fortran). */ + virtual QCString trCompoundMembersDescriptionFortran(bool extractAll) + { + QCString result="Εδώ είναι η λίστα όλων των "; + if (!extractAll) + { + result+="τεκμηριωμένων "; + } + result+="μελών τύπων δεδομένων"; + result+=" με συνδέσεις "; + if (!extractAll) + { + result+="στην τεκμηρίωση της δομής δεδομένων για κάθε μέλος"; + } + else + { + result+="στους τύπους δεδομένων που ανήκουν:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index (Fortran). + */ + virtual QCString trCompoundIndexFortran() + { return "Περιεχόμενα Τύπων Δεδομένων"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all data types (Fortran). + */ + virtual QCString trTypeDocumentation() + { return "Τεκμηρίωση Τύπων Δεδομένων"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) subprograms (Fortran). + */ + virtual QCString trSubprograms() + { return "Συναρτήσεις/Υπορουτίνες"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for subprograms (Fortran) + */ + virtual QCString trSubprogramDocumentation() + { return "Τεκμηρίωση Συνάρτησης/Υπορουτίνας"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds (Fortran) + */ + virtual QCString trDataTypes() + { return "Τύποι Δεδομένων"; } + + /*! used as the title of page containing all the index of all modules (Fortran). */ + virtual QCString trModulesList() + { return "Λίστα Υπομονάδων"; } + + /*! used as an introduction to the modules list (Fortran) */ + virtual QCString trModulesListDescription(bool extractAll) + { + QCString result="Εδώ είναι μια λίστα με όλες τις "; + if (!extractAll) result+="τεκμηριωμένες "; + result+="υπομονάδες με σύντομή περιγραφή:"; + return result; + } + + /*! used as the title of the HTML page of a module/type (Fortran) */ + virtual QCString trCompoundReferenceFortran(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result=(QCString)clName; + switch(compType) + { + case ClassDef::Class: result+=" Υπομονάδα"; break; + case ClassDef::Struct: result+=" Τύπος"; break; + case ClassDef::Union: result+=" Ένωση"; break; + case ClassDef::Interface: result+=" Interface"; break; + case ClassDef::Protocol: result+=" Πρωτόκολλο"; break; + case ClassDef::Category: result+=" Κατηγορία"; break; + case ClassDef::Exception: result+=" Εξαίρεση"; break; + } + if (isTemplate) result+=" Πρότυπο"; + result+=" Δήλωση"; + return result; + } + /*! used as the title of the HTML page of a module (Fortran) */ + virtual QCString trModuleReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=" Δηλώσεις Υπομονάδων"; + return result; + } + + /*! This is put above each page as a link to all members of modules. (Fortran) */ + virtual QCString trModulesMembers() + { return "Υπομονάδες Μέλη"; } + + /*! This is an introduction to the page with all modules members (Fortran) */ + virtual QCString trModulesMemberDescription(bool extractAll) + { + QCString result="Εδώ είναι μια λίστα με όλες τις "; + if (!extractAll) result+="τεκμηριωμένες "; + result+="μέλη υπομονάδες με συνδέσεις "; + if (extractAll) + { + result+="στην τεκμηρίωση της υπομονάδας για κάθε μέλος:"; + } + else + { + result+="στις υπομονάδες που ανήκουν:"; + } + return result; + } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all modules (Fortran). + */ + virtual QCString trModulesIndex() + { return "Περιεχόμενα Υπομονάδων"; } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trModule(bool first_capital, bool singular) + { + QCString result((first_capital ? "Υπομονάδ" : "υπομονάδ")); + if (!singular) result+="ες"; else result+="α"; + return result; + } + /*! This is put at the bottom of a module documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Module", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Η τεκμηρίωση για "; + switch(compType) + { + case ClassDef::Class: result+="αυτή την υπομονάδα"; break; + case ClassDef::Struct: result+="αυτό τον τύπο δεδομένων"; break; + case ClassDef::Union: result+="αυτή την ένωση"; break; + case ClassDef::Interface: result+="αυτό το interface"; break; + case ClassDef::Protocol: result+="αυτό το πρωτόκολλο"; break; + case ClassDef::Category: result+="αυτή την κατηγορία"; break; + case ClassDef::Exception: result+="αυτή την εξαίρεση"; break; + } + result+=" δημιουργήθηκε από "; + if (single) result+="το παρακάτω αρχείο:"; else result+="τα παρακάτω αρχεία:"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trType(bool first_capital, bool singular) + { + QCString result((first_capital ? "Τύπο" : "τύπο")); + if (!singular) result+="ι"; else result+="ος"; + result+= first_capital ? " Δεδομένων" : " δεδομένων"; + return result; + } + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trSubprogram(bool first_capital, bool singular) + { + QCString result((first_capital ? "Υποπρ" : "υποπρ")); + if (!singular) result+="ογράμματα"; else result+="όγραμμα"; + return result; + } + + /*! C# Type Constraint list */ + virtual QCString trTypeConstraints() + { + return "Περιορισμοί Τύπων Δεδομένων"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.0 (mainly for the new search engine) +////////////////////////////////////////////////////////////////////////// + + /*! directory relation for \a name */ + virtual QCString trDirRelation(const char *name) + { + return "Σχέση του "+QCString(name); + } + + /*! Loading message shown when loading search results */ + virtual QCString trLoading() + { + return "Φόρτωση..."; + } + + /*! Label used for search results in the global namespace */ + virtual QCString trGlobalNamespace() + { + return "Γενικός χώρος ονομάτων"; + } + + /*! Message shown while searching */ + virtual QCString trSearching() + { + return "Αναζήτηση..."; + } + + /*! Text shown when no search results are found */ + virtual QCString trNoMatches() + { + return "Δεν βρέθηκαν αποτελέσματα αναζήτησης"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 (missing items for the directory pages) +////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)"Γράφημα εξάρτησης φακέλου για το "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)"Αρχείο σε "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)"Εσωκλείει το αρχείο στο "+name; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ","Κυρ" }; + static const char *months[] = { "Ιαν","Φεβ","Μαρ","Απρ","Μαι","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ" }; + QCString sdate; + sdate.sprintf("%s %.2d %s %d",days[dayOfWeek-1],day,months[month-1],year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } }; + #endif diff --git a/src/translator_hr.h b/src/translator_hr.h index aeca4d1..eeba2c8 100644 --- a/src/translator_hr.h +++ b/src/translator_hr.h @@ -75,10 +75,13 @@ // - Updates for "new since 1.6.0 (mainly for the new search engine)". // - UTF-8 // - removed decode() +// +// 2010/05/27 +// - Updates for 1.6.3 #ifndef TRANSLATOR_HR_H #define TRANSLATOR_HR_H -class TranslatorCroatian : public TranslatorAdapter_1_6_3 +class TranslatorCroatian : public Translator { private: @@ -1491,6 +1494,62 @@ class TranslatorCroatian : public TranslatorAdapter_1_6_3 { return "Nema traženih podataka"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 (missing items for the directory pages) +////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)"Graf povezanih direktorija za "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)"Datoteka u "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)"Uključuje datotake u "+name; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "Pon","Uto","Sri","Čet","Pet","Sub","Ned" }; + static const char *months[] = { "Sje","Velj","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro" }; + QCString sdate; + sdate.sprintf("%s %s %d %d",days[dayOfWeek-1],months[month-1],day,year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } + }; #endif diff --git a/src/util.cpp b/src/util.cpp index 86e825e..2a288e4 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -463,7 +463,7 @@ NamespaceDef *getResolvedNamespace(const char *name) } if (count==10) { - warn_cont("Warning: possible recursive namespace alias detected for %s!\n",name); + err("Warning: possible recursive namespace alias detected for %s!\n",name); } return Doxygen::namespaceSDict->find(subst->data()); } @@ -6996,5 +6996,35 @@ void writeSummaryLink(OutputList &ol,const char *label,const char *title, ol.writeString("</a>"); } +QCString externalLinkTarget() +{ + static bool extLinksInWindow = Config_getBool("EXT_LINKS_IN_WINDOW"); + if (extLinksInWindow) return "target=\"_blank\" "; else return ""; +} +QCString externalRef(const QCString &relPath,const QCString &ref,bool href) +{ + QCString result; + if (!ref.isEmpty()) + { + QCString *dest = Doxygen::tagDestinationDict[ref]; + if (dest) + { + result = *dest; + int l = result.length(); + if (!relPath.isEmpty() && l>0 && result.at(0)=='.') + { // relative path -> prepend relPath. + result.prepend(relPath); + } + if (!href) result.prepend("doxygen=\""+ref+":"); + if (l>0 && !result.at(l-1)!='/') result+='/'; + if (!href) result.append("\" "); + } + } + else + { + result = relPath; + } + return result; +} @@ -377,5 +377,8 @@ bool patternMatch(const QFileInfo &fi,const QStrList *patList); void writeSummaryLink(OutputList &ol,const char *label,const char *title, bool &first); +QCString externalLinkTarget(); +QCString externalRef(const QCString &relPath,const QCString &ref,bool href); + #endif diff --git a/tmake/lib/macosx-c++/tmake.conf b/tmake/lib/macosx-c++/tmake.conf index 96dc836..01f036d 100755 --- a/tmake/lib/macosx-c++/tmake.conf +++ b/tmake/lib/macosx-c++/tmake.conf @@ -36,14 +36,14 @@ TMAKE_LIBDIR_OPENGL = /usr/X11R6/lib TMAKE_LINK = c++ TMAKE_LINK_SHLIB = c++ -TMAKE_LFLAGS = -Wl,-search_paths_first +TMAKE_LFLAGS = -Wl,-search_paths_first TMAKE_LFLAGS_RELEASE = TMAKE_LFLAGS_DEBUG = TMAKE_LFLAGS_SHLIB = -shared TMAKE_LFLAGS_SONAME = -dynamiclib -install_name -TMAKE_LIBS = -liconv +TMAKE_LIBS = -liconv -framework CoreServices TMAKE_LIBS_X11 = TMAKE_LIBS_QT = -lqt TMAKE_LIBS_QT_MT = -lqt-mt diff --git a/tmake/lib/macosx-uni-c++/tmake.conf b/tmake/lib/macosx-uni-c++/tmake.conf index 2ac8534..2c34161 100644 --- a/tmake/lib/macosx-uni-c++/tmake.conf +++ b/tmake/lib/macosx-uni-c++/tmake.conf @@ -8,7 +8,7 @@ TEMPLATE = app CONFIG = qt warn_on release TMAKE_CC = cc -TMAKE_CFLAGS = -pipe -arch i386 -arch ppc +TMAKE_CFLAGS = -pipe -arch i386 -arch ppc TMAKE_CFLAGS_WARN_ON = -Wall -W TMAKE_CFLAGS_WARN_OFF = TMAKE_CFLAGS_RELEASE = -O2 @@ -17,7 +17,7 @@ TMAKE_CFLAGS_SHLIB = -fPIC TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses TMAKE_CXX = c++ -TMAKE_CXXFLAGS = $$TMAKE_CFLAGS -D__FreeBSD__=6 +TMAKE_CXXFLAGS = $$TMAKE_CFLAGS -D__FreeBSD__=6 -mmacosx-version-min=10.5 TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE @@ -36,14 +36,14 @@ TMAKE_LIBDIR_OPENGL = /usr/X11R6/lib TMAKE_LINK = c++ TMAKE_LINK_SHLIB = c++ -TMAKE_LFLAGS = -Wl,-search_paths_first -arch i386 -arch ppc +TMAKE_LFLAGS = -Wl,-search_paths_first -arch i386 -arch ppc TMAKE_LFLAGS_RELEASE = TMAKE_LFLAGS_DEBUG = TMAKE_LFLAGS_SHLIB = -shared TMAKE_LFLAGS_SONAME = -dynamiclib -install_name -TMAKE_LIBS = -liconv +TMAKE_LIBS = -liconv -framework CoreServices -mmacosx-version-min=10.5 TMAKE_LIBS_X11 = TMAKE_LIBS_QT = -lqt TMAKE_LIBS_QT_MT = -lqt-mt diff --git a/winbuild/Doxygen.sln b/winbuild/Doxygen.sln index 98cad9a..7910673 100644 --- a/winbuild/Doxygen.sln +++ b/winbuild/Doxygen.sln @@ -1,6 +1,6 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Doxygen", "Doxygen.vcproj", "{309C9A4A-94D2-4837-9A11-45B0A6CF35C3}" ProjectSection(ProjectDependencies) = postProject {B6BB4771-8A4E-4656-AC08-1EF8AC182F64} = {B6BB4771-8A4E-4656-AC08-1EF8AC182F64} diff --git a/winbuild/Doxygen.vcproj b/winbuild/Doxygen.vcproj index 0320fcd..de78070 100644 --- a/winbuild/Doxygen.vcproj +++ b/winbuild/Doxygen.vcproj @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" - Version="8.00" + Version="9.00" Name="Doxygen" ProjectGUID="{309C9A4A-94D2-4837-9A11-45B0A6CF35C3}" RootNamespace="Doxygen" + TargetFrameworkVersion="131072" > <Platforms> <Platform @@ -87,6 +88,8 @@ GenerateDebugInformation="true" ProgramDatabaseFile=".\Debug/Doxygen.pdb" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="1" /> <Tool @@ -110,9 +113,6 @@ Name="VCAppVerifierTool" /> <Tool - Name="VCWebDeploymentTool" - /> - <Tool Name="VCPostBuildEventTool" /> </Configuration> @@ -187,6 +187,8 @@ AdditionalLibraryDirectories="Release" ProgramDatabaseFile=".\Release/Doxygen.pdb" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="1" /> <Tool @@ -210,9 +212,6 @@ Name="VCAppVerifierTool" /> <Tool - Name="VCWebDeploymentTool" - /> - <Tool Name="VCPostBuildEventTool" /> </Configuration> diff --git a/winbuild/Doxytag.vcproj b/winbuild/Doxytag.vcproj index 2dce58f..486465a 100644 --- a/winbuild/Doxytag.vcproj +++ b/winbuild/Doxytag.vcproj @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" - Version="8.00" + Version="9.00" Name="Doxytag" ProjectGUID="{EE0E8466-1E25-4FBC-B273-5EA6776EFE95}" RootNamespace="Doxytag" + TargetFrameworkVersion="131072" > <Platforms> <Platform @@ -86,6 +87,8 @@ GenerateDebugInformation="true" ProgramDatabaseFile=".\Debug/Doxytag.pdb" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="1" /> <Tool @@ -109,9 +112,6 @@ Name="VCAppVerifierTool" /> <Tool - Name="VCWebDeploymentTool" - /> - <Tool Name="VCPostBuildEventTool" /> </Configuration> @@ -182,6 +182,8 @@ AdditionalLibraryDirectories="Release" ProgramDatabaseFile=".\Release/Doxytag.pdb" SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="1" /> <Tool @@ -205,9 +207,6 @@ Name="VCAppVerifierTool" /> <Tool - Name="VCWebDeploymentTool" - /> - <Tool Name="VCPostBuildEventTool" /> </Configuration> diff --git a/winbuild/Doxywizard.vcproj b/winbuild/Doxywizard.vcproj index e211b1c..9598628 100644 --- a/winbuild/Doxywizard.vcproj +++ b/winbuild/Doxywizard.vcproj @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" - Version="8.00" + Version="9.00" Name="doxywizard" ProjectGUID="{77C9C2D3-EA3F-3D59-8B4C-0ED852890172}" Keyword="Qt4VSv1.0" + TargetFrameworkVersion="131072" > <Platforms> <Platform @@ -81,6 +82,8 @@ ProgramDatabaseFile="" SubSystem="2" LinkTimeCodeGeneration="0" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" /> <Tool Name="VCALinkTool" @@ -101,9 +104,6 @@ Name="VCAppVerifierTool" /> <Tool - Name="VCWebDeploymentTool" - /> - <Tool Name="VCPostBuildEventTool" /> </Configuration> @@ -137,7 +137,7 @@ Name="VCCLCompilerTool" AdditionalOptions="-Zm200 -w34100 -w34189 -Zm200 -w34100 -w34189 -w34100 -w34189" Optimization="2" - AdditionalIncludeDirectories=""..\..\..\Qt\4.4.3\include\QtCore","..\..\..\Qt\4.4.3\include\QtCore","..\..\..\Qt\4.4.3\include\QtGui","..\..\..\Qt\4.4.3\include\QtGui","..\..\..\Qt\4.4.3\include\QtXml","..\..\..\Qt\4.4.3\include\QtXml","..\..\..\Qt\4.4.3\include","..\addon\doxywizard","c:\Qt\4.4.3\include\ActiveQt","..\addon\doxywizard\moc","..\addon\doxywizard",".",..\..\..\Qt\4.4.3\mkspecs\win32-msvc2005" + AdditionalIncludeDirectories=""..\..\..\Qt\4.4.3\include\QtCore","..\..\..\Qt\4.4.3\include\QtCore","..\..\..\Qt\4.4.3\include\QtGui","..\..\..\Qt\4.4.3\include\QtGui","..\..\..\Qt\4.4.3\include\QtXml","..\..\..\Qt\4.4.3\include\QtXml","..\..\..\Qt\4.4.3\include","..\addon\doxywizard","c:\Qt\4.4.3\include\ActiveQt","..\addon\doxywizard\moc","..\addon\doxywizard",".",..\..\..\Qt\4.4.3\mkspecs\win32-msvc2008" PreprocessorDefinitions="QT_NO_DEBUG,NDEBUG,_WINDOWS,UNICODE,WIN32,QT_LARGEFILE_SUPPORT,QT_NO_CAST_FROM_ASCII,QT_NO_CAST_TO_ASCII,QT_NO_DEBUG,QT_XML_LIB,QT_GUI_LIB,QT_CORE_LIB,QT_THREAD_SUPPORT,NDEBUG" GeneratePreprocessedFile="0" ExceptionHandling="1" @@ -177,6 +177,8 @@ ProgramDatabaseFile="" SubSystem="2" LinkTimeCodeGeneration="0" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" /> <Tool Name="VCALinkTool" @@ -197,9 +199,6 @@ Name="VCAppVerifierTool" /> <Tool - Name="VCWebDeploymentTool" - /> - <Tool Name="VCPostBuildEventTool" /> </Configuration> @@ -528,7 +527,7 @@ <Tool Name="VCCustomBuildTool" Description="Lex ..\addon\doxywizard\config.l" - CommandLine="flex -Pconfig ..\addon\doxywizard\config.l && del config_lex.cpp && move lex.config.c config_lex.cpp
" + CommandLine="flex -Pconfig ..\addon\doxywizard\config.l && del config_lex.cpp && move lex.config.c config_lex.cpp
" AdditionalDependencies="..\addon\doxywizard\config.l;flex" Outputs="config_lex.cpp" /> @@ -539,7 +538,7 @@ <Tool Name="VCCustomBuildTool" Description="Lex ..\addon\doxywizard\config.l" - CommandLine="flex -Pconfig ..\addon\doxywizard\config.l && del config_lex.cpp && move lex.config.c config_lex.cpp
" + CommandLine="flex -Pconfig ..\addon\doxywizard\config.l && del config_lex.cpp && move lex.config.c config_lex.cpp
" AdditionalDependencies="..\addon\doxywizard\config.l;flex" Outputs="config_lex.cpp" /> @@ -578,6 +577,10 @@ /> </FileConfiguration> </File> + <File + RelativePath="..\addon\doxywizard\doxywizard.rc" + > + </File> </Filter> </Files> <Globals> diff --git a/winbuild/qtools.vcproj b/winbuild/qtools.vcproj index bc9a42e..73d91da 100644 --- a/winbuild/qtools.vcproj +++ b/winbuild/qtools.vcproj @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" - Version="8.00" + Version="9.00" Name="qtools" ProjectGUID="{B6BB4771-8A4E-4656-AC08-1EF8AC182F64}" + TargetFrameworkVersion="131072" > <Platforms> <Platform @@ -575,6 +576,14 @@ </FileConfiguration> </File> <File + RelativePath="..\qtools\qmutex.cpp" + > + </File> + <File + RelativePath="..\qtools\qmutex_win32.cpp" + > + </File> + <File RelativePath="..\qtools\qregexp.cpp" > <FileConfiguration @@ -685,6 +694,18 @@ </FileConfiguration> </File> <File + RelativePath="..\qtools\qthread.cpp" + > + </File> + <File + RelativePath="..\qtools\qthread_win32.cpp" + > + </File> + <File + RelativePath="..\qtools\qwaitcondition_win32.cpp" + > + </File> + <File RelativePath="..\qtools\qxml.cpp" > <FileConfiguration @@ -846,6 +867,14 @@ > </File> <File + RelativePath="..\qtools\qmutex.h" + > + </File> + <File + RelativePath="..\qtools\qmutex_p.h" + > + </File> + <File RelativePath="..\qtools\qptrdict.h" > </File> @@ -894,6 +923,14 @@ > </File> <File + RelativePath="..\qtools\qthread.h" + > + </File> + <File + RelativePath="..\qtools\qthread_p.h" + > + </File> + <File RelativePath="..\qtools\qtl.h" > </File> @@ -910,6 +947,10 @@ > </File> <File + RelativePath="..\qtools\qwaitcondition.h" + > + </File> + <File RelativePath="..\qtools\qxml.h" > </File> |