From eb591296685b8268427173e0a24f74abd987170d Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Mon, 19 Feb 2007 18:51:10 +0000 Subject: Release-1.5.1-20070219 --- INSTALL | 4 +- README | 4 +- addon/doxywizard/Makefile.in | 20 +- addon/doxywizard/Makefile.win_nmake.in | 2 +- addon/doxywizard/doxywizard.pro.in | 10 +- addon/doxywizard/doxywizard.t | 2 +- addon/doxywizard/expert.cpp | 2 +- addon/doxywizard/expert.h | 2 +- addon/doxywizard/inputbool.cpp | 2 +- addon/doxywizard/inputbool.h | 2 +- addon/doxywizard/inputint.cpp | 2 +- addon/doxywizard/inputint.h | 2 +- addon/doxywizard/inputstring.cpp | 2 +- addon/doxywizard/inputstring.h | 2 +- addon/doxywizard/inputstrlist.cpp | 2 +- addon/doxywizard/inputstrlist.h | 2 +- addon/doxywizard/qtbc.h | 2 +- addon/doxywizard/version.h | 2 +- configure | 2 +- doc/Makefile.in | 2 +- doc/Makefile.win_make.in | 2 +- doc/Makefile.win_nmake.in | 2 +- doc/arch.doc | 2 +- doc/autolink.doc | 2 +- doc/commands.doc | 2 +- doc/config.doc | 10 +- doc/diagrams.doc | 2 +- doc/docblocks.doc | 4 +- doc/doxygen.1 | 2 +- doc/doxygen_manual.tex | 4 +- doc/doxygen_usage.doc | 2 +- doc/doxytag.1 | 3 +- doc/doxytag_usage.doc | 2 +- doc/doxywizard_usage.doc | 2 +- doc/external.doc | 2 +- doc/faq.doc | 2 +- doc/features.doc | 2 +- doc/formulas.doc | 2 +- doc/grouping.doc | 2 +- doc/history.doc | 2 +- doc/htmlcmds.doc | 2 +- doc/index.doc | 4 +- doc/install.doc | 2 +- doc/installdox_usage.doc | 2 +- doc/language.doc | 11 +- doc/maintainers.txt | 1 + doc/output.doc | 2 +- doc/preprocessing.doc | 2 +- doc/starting.doc | 2 +- doc/translator_report.txt | 26 +- doc/trouble.doc | 2 +- doc/xmlcmds.doc | 2 +- src/Makefile.in | 2 +- src/bufstr.h | 2 +- src/classdef.cpp | 5 +- src/classdef.h | 2 +- src/classlist.cpp | 2 +- src/classlist.h | 2 +- src/cmdmapper.cpp | 2 +- src/cmdmapper.h | 2 +- src/code.h | 2 +- src/code.l | 2 +- src/commentcnv.h | 2 +- src/commentcnv.l | 2 +- src/commentscan.h | 2 +- src/commentscan.l | 2 +- src/config.h | 3 + src/config.l | 253 +++++++++---- src/constexp.h | 2 +- src/constexp.l | 2 +- src/constexp.y | 2 +- src/cppvalue.cpp | 2 +- src/cppvalue.h | 2 +- src/debug.cpp | 2 +- src/debug.h | 2 +- src/declinfo.h | 2 +- src/declinfo.l | 2 +- src/defargs.h | 2 +- src/defargs.l | 2 +- src/defgen.cpp | 2 +- src/defgen.h | 2 +- src/define.cpp | 2 +- src/define.h | 2 +- src/definition.cpp | 68 +++- src/definition.h | 2 +- src/diagram.cpp | 5 +- src/diagram.h | 2 +- src/dirdef.cpp | 2 +- src/dirdef.h | 2 +- src/docparser.cpp | 6 +- src/docparser.h | 2 +- src/doctokenizer.h | 2 +- src/doctokenizer.l | 5 +- src/docvisitor.h | 2 +- src/dot.cpp | 48 +-- src/dot.h | 2 +- src/doxygen.cpp | 139 +++++-- src/doxygen.h | 2 +- src/doxygen.pro.in | 8 +- src/doxytag.l | 4 +- src/doxytag.pro.in | 2 +- src/doxytag.t | 2 +- src/entry.cpp | 2 +- src/entry.h | 2 +- src/example.h | 2 +- src/filedef.cpp | 15 +- src/filedef.h | 2 +- src/filename.cpp | 2 +- src/filename.h | 2 +- src/formula.cpp | 21 +- src/formula.h | 2 +- src/groupdef.cpp | 9 +- src/groupdef.h | 2 +- src/htags.cpp | 5 +- src/htags.h | 2 +- src/htmlattrib.h | 2 +- src/htmldocvisitor.cpp | 4 +- src/htmldocvisitor.h | 2 +- src/htmlgen.cpp | 11 +- src/htmlgen.h | 2 +- src/htmlhelp.cpp | 2 +- src/htmlhelp.h | 2 +- src/image.cpp | 2 +- src/image.h | 2 +- src/index.cpp | 2 +- src/index.h | 2 +- src/instdox.cpp | 2 +- src/instdox.h | 2 +- src/language.cpp | 67 ++-- src/language.h | 2 +- src/latexdocvisitor.cpp | 2 +- src/latexdocvisitor.h | 2 +- src/latexgen.cpp | 21 +- src/latexgen.h | 2 +- src/libdoxycfg.pro.in | 6 +- src/libdoxycfg.t | 2 +- src/libdoxygen.pro.in | 2 +- src/libdoxygen.t | 2 +- src/lockingptr.h | 2 +- src/logos.cpp | 2 +- src/logos.h | 2 +- src/main.cpp | 2 +- src/mandocvisitor.cpp | 2 +- src/mandocvisitor.h | 2 +- src/mangen.cpp | 2 +- src/mangen.h | 2 +- src/memberdef.cpp | 18 +- src/memberdef.h | 4 +- src/membergroup.cpp | 2 +- src/membergroup.h | 2 +- src/memberlist.cpp | 2 +- src/memberlist.h | 2 +- src/membername.cpp | 2 +- src/membername.h | 2 +- src/message.cpp | 2 +- src/message.h | 2 +- src/namespacedef.cpp | 3 +- src/namespacedef.h | 2 +- src/objcache.cpp | 2 +- src/objcache.h | 2 +- src/outputgen.cpp | 35 +- src/outputgen.h | 5 +- src/outputlist.cpp | 2 +- src/outputlist.h | 2 +- src/pagedef.h | 2 +- src/parserintf.h | 2 +- src/perlmodgen.cpp | 2 +- src/perlmodgen.h | 2 +- src/pngenc.cpp | 2 +- src/pngenc.h | 2 +- src/portable.cpp | 385 +++++++++++++++++++ src/portable.h | 38 ++ src/pre.h | 2 +- src/pre.l | 16 +- src/printdocvisitor.h | 2 +- src/pycode.h | 2 +- src/pycode.l | 2 +- src/pyscanner.h | 2 +- src/pyscanner.l | 2 +- src/qtbc.h | 2 +- src/reflist.cpp | 2 +- src/reflist.h | 2 +- src/rtfdocvisitor.cpp | 44 +-- src/rtfdocvisitor.h | 2 +- src/rtfgen.cpp | 48 ++- src/rtfgen.h | 5 +- src/rtfstyle.cpp | 2 +- src/rtfstyle.h | 2 +- src/scanner.h | 2 +- src/scanner.l | 2 +- src/searchindex.cpp | 2 +- src/searchindex.h | 2 +- src/section.h | 2 +- src/sortdict.h | 2 +- src/store.cpp | 71 ++-- src/store.h | 15 +- src/tagreader.cpp | 2 +- src/tagreader.h | 2 +- src/textdocvisitor.cpp | 2 +- src/textdocvisitor.h | 2 +- src/translator.h | 2 +- src/translator_ar.h | 4 +- src/translator_br.h | 4 +- src/translator_ca.h | 5 +- src/translator_cn.h | 2 +- src/translator_cz.h | 35 +- src/translator_de.h | 7 +- src/translator_dk.h | 3 +- src/translator_en.h | 2 +- src/translator_es.h | 422 +++++++++++++-------- src/translator_fa.h | 2 +- src/translator_fi.h | 2 +- src/translator_fr.h | 2 +- src/translator_gr.h | 5 +- src/translator_hr.h | 30 +- src/translator_hu.h | 5 +- src/translator_id.h | 4 +- src/translator_it.h | 2 +- src/translator_je.h | 16 +- src/translator_jp.h | 36 +- src/translator_ke.h | 2 +- src/translator_kr.h | 6 +- src/translator_lt.h | 5 +- src/translator_nl.h | 2 +- src/translator_no.h | 3 +- src/translator_pl.h | 33 +- src/translator_pt.h | 2 +- src/translator_ro.h | 4 +- src/translator_ru.h | 46 +-- src/translator_se.h | 4 +- src/translator_si.h | 12 +- src/translator_sk.h | 20 +- src/translator_sr.h | 241 ++++++------ src/translator_tw.h | 2 +- src/translator_ua.h | 28 +- src/translator_za.h | 2 +- src/translatordecoder.h | 658 +++++++++++++++++++++++++++++++++ src/unistd.h | 7 - src/util.cpp | 325 ++++++---------- src/util.h | 10 +- src/version.h | 2 +- src/xmldocvisitor.cpp | 2 +- src/xmldocvisitor.h | 2 +- src/xmlgen.cpp | 10 +- src/xmlgen.h | 2 +- tmake/lib/macosx-c++/tmake.conf | 2 +- tmake/lib/macosx-uni-c++/tmake.conf | 2 +- winbuild/Doxygen.vcproj | 229 +++++++----- winbuild/Doxytag.vcproj | 24 +- winbuild/Doxywizard.vcproj | 43 ++- winbuild/Lex.rules | 40 ++ winbuild/iconv.h | 141 +++++++ winbuild/iconv.lib | Bin 0 -> 958612 bytes winbuild/runbison.bat | 3 + winbuild/unistd.h | 7 + 255 files changed, 3009 insertions(+), 1303 deletions(-) create mode 100644 src/portable.cpp create mode 100644 src/portable.h create mode 100644 src/translatordecoder.h delete mode 100644 src/unistd.h create mode 100644 winbuild/Lex.rules create mode 100644 winbuild/iconv.h create mode 100644 winbuild/iconv.lib create mode 100644 winbuild/runbison.bat create mode 100644 winbuild/unistd.h diff --git a/INSTALL b/INSTALL index 5af0ebe..5adbe97 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ -DOXYGEN Version 1.5.1-20070107 +DOXYGEN Version 1.5.1-20070219 Please read the installation section of the manual (http://www.doxygen.org/install.html) for instructions. -------- -Dimitri van Heesch (07 January 2007) +Dimitri van Heesch (19 February 2007) diff --git a/README b/README index 6e03c65..2a5e75d 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.5.1_20070107 +DOXYGEN Version 1.5.1_20070219 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 January 2007) +Dimitri van Heesch (dimitri@stack.nl) (19 February 2007) diff --git a/addon/doxywizard/Makefile.in b/addon/doxywizard/Makefile.in index 2be7628..91adeab 100644 --- a/addon/doxywizard/Makefile.in +++ b/addon/doxywizard/Makefile.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 @@ -10,18 +10,24 @@ # See the GNU General Public License for more details. # -all: config.h config.l version.cpp Makefile.doxywizard +all: version.cpp config.h config.l portable.h portable.cpp Makefile.doxywizard $(MAKE) -f Makefile.doxywizard QTDIR=$(QTDIR) $@ +version.cpp: ../../src/version.cpp + $(CP) ../../src/version.cpp version.cpp + +portable.cpp: ../../src/portable.cpp + $(CP) ../../src/portable.cpp portable.cpp + +portable.h: ../../src/portable.h + $(CP) ../../src/portable.h portable.h + config.h: ../../src/config.h $(CP) ../../src/config.h config.h config.l: ../../src/config.l $(CP) ../../src/config.l config.l -version.cpp: ../../src/version.cpp - $(CP) ../../src/version.cpp version.cpp - Makefile.doxywizard: doxywizard.pro $(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard @@ -30,10 +36,10 @@ tmake: clean: Makefile.doxywizard $(MAKE) -f Makefile.doxywizard clean - $(RM) config.cpp + $(RM) config.cpp distclean: clean - $(RM) Makefile.doxywizard config.l config.h version.cpp + $(RM) Makefile.doxywizard version.cpp config.l config.h portable.h portable.cpp install: $(INSTTOOL) -d $(INSTALL)/bin diff --git a/addon/doxywizard/Makefile.win_nmake.in b/addon/doxywizard/Makefile.win_nmake.in index e48e05e..764cef6 100644 --- a/addon/doxywizard/Makefile.win_nmake.in +++ b/addon/doxywizard/Makefile.win_nmake.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/doxywizard.pro.in b/addon/doxywizard/doxywizard.pro.in index 1562b51..ebecae5 100644 --- a/addon/doxywizard/doxywizard.pro.in +++ b/addon/doxywizard/doxywizard.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 @@ -27,8 +27,9 @@ HEADERS = doxywizard.h \ inputbool.h \ inputstrlist.h \ inputint.h \ - expert.h \ - config.h + expert.h \ + config.h \ + portable.h # source flle for the project SOURCES = doxywizard.cpp \ @@ -38,7 +39,8 @@ SOURCES = doxywizard.cpp \ inputstrlist.cpp \ inputint.cpp \ expert.cpp \ - config.cpp + config.cpp \ + portable.cpp # where to put the objects OBJECTS_DIR = obj diff --git a/addon/doxywizard/doxywizard.t b/addon/doxywizard/doxywizard.t index 1c82788..3c0b8de 100644 --- a/addon/doxywizard/doxywizard.t +++ b/addon/doxywizard/doxywizard.t @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp index 10a2e04..d0ecd88 100644 --- a/addon/doxywizard/expert.cpp +++ b/addon/doxywizard/expert.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/expert.h b/addon/doxywizard/expert.h index 3e13b47..9d2097f 100644 --- a/addon/doxywizard/expert.h +++ b/addon/doxywizard/expert.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/inputbool.cpp b/addon/doxywizard/inputbool.cpp index a2208f5..13178ac 100644 --- a/addon/doxywizard/inputbool.cpp +++ b/addon/doxywizard/inputbool.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/inputbool.h b/addon/doxywizard/inputbool.h index ed7861d..10e5b67 100644 --- a/addon/doxywizard/inputbool.h +++ b/addon/doxywizard/inputbool.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/inputint.cpp b/addon/doxywizard/inputint.cpp index 6489f60..cf2077e 100644 --- a/addon/doxywizard/inputint.cpp +++ b/addon/doxywizard/inputint.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/inputint.h b/addon/doxywizard/inputint.h index 50e4b61..ca8227d 100644 --- a/addon/doxywizard/inputint.h +++ b/addon/doxywizard/inputint.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp index 754e045..7a6004a 100644 --- a/addon/doxywizard/inputstring.cpp +++ b/addon/doxywizard/inputstring.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/inputstring.h b/addon/doxywizard/inputstring.h index 7e7b639..afce279 100644 --- a/addon/doxywizard/inputstring.h +++ b/addon/doxywizard/inputstring.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/inputstrlist.cpp b/addon/doxywizard/inputstrlist.cpp index 2dc80ab..35115aa 100644 --- a/addon/doxywizard/inputstrlist.cpp +++ b/addon/doxywizard/inputstrlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/inputstrlist.h b/addon/doxywizard/inputstrlist.h index 7c79adb..a441bfb 100644 --- a/addon/doxywizard/inputstrlist.h +++ b/addon/doxywizard/inputstrlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/qtbc.h b/addon/doxywizard/qtbc.h index b1baec4..61a7896 100644 --- a/addon/doxywizard/qtbc.h +++ b/addon/doxywizard/qtbc.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/addon/doxywizard/version.h b/addon/doxywizard/version.h index 226de7e..a040af7 100644 --- a/addon/doxywizard/version.h +++ b/addon/doxywizard/version.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/configure b/configure index f747376..ba19263 100755 --- a/configure +++ b/configure @@ -20,7 +20,7 @@ doxygen_version_minor=5 doxygen_version_revision=1 #NOTE: Setting version_mmn to "NO" will omit mmn info from the package. -doxygen_version_mmn=20070107 +doxygen_version_mmn=20070219 bin_dirs=`echo $PATH | sed -e "s/:/ /g"` diff --git a/doc/Makefile.in b/doc/Makefile.in index e813ff8..0a9341b 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 diff --git a/doc/Makefile.win_make.in b/doc/Makefile.win_make.in index 7d825df..27d60ae 100644 --- a/doc/Makefile.win_make.in +++ b/doc/Makefile.win_make.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 diff --git a/doc/Makefile.win_nmake.in b/doc/Makefile.win_nmake.in index d1b6bb3..560141f 100644 --- a/doc/Makefile.win_nmake.in +++ b/doc/Makefile.win_nmake.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 diff --git a/doc/arch.doc b/doc/arch.doc index 5a431e2..9f06ac4 100644 --- a/doc/arch.doc +++ b/doc/arch.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/autolink.doc b/doc/autolink.doc index c6b85f9..be64876 100644 --- a/doc/autolink.doc +++ b/doc/autolink.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/commands.doc b/doc/commands.doc index fa076c8..1b03dbb 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/config.doc b/doc/config.doc index be0c4a5..e1c9481 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -148,6 +148,7 @@ followed by the descriptions of the tags grouped by category. \refitem cfg_inline_inherited_memb INLINE_INHERITED_MEMB \refitem cfg_inline_sources INLINE_SOURCES \refitem cfg_input INPUT +\refitem cfg_input_encoding INPUT_ENCODING \refitem cfg_input_filter INPUT_FILTER \refitem cfg_internal_docs INTERNAL_DOCS \refitem cfg_javadoc_autobrief JAVADOC_AUTOBRIEF @@ -750,6 +751,13 @@ function's detailed documentation block. \b Note: If this tag is empty the current directory is searched. +\anchor cfg_input_encoding + This tag can be used to specify the character encoding of the source files that + doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default + input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. + See the libiconv documentation for + the list of possible encodings. + \anchor cfg_file_patterns
\c FILE_PATTERNS
\addindex FILE_PATTERNS diff --git a/doc/diagrams.doc b/doc/diagrams.doc index 2329631..88a1dfc 100644 --- a/doc/diagrams.doc +++ b/doc/diagrams.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/docblocks.doc b/doc/docblocks.doc index 9be933e..c0853cf 100644 --- a/doc/docblocks.doc +++ b/doc/docblocks.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -223,7 +223,7 @@ If you want to document the members of a file, struct, union, class, or enum, and you want to put the documentation for these members inside the compound, it is sometimes desired to place the documentation block after the member instead of before. For this purpose you have to put an additional \< marker -in the comment block. +in the comment block. Note that this also works for the parameters of a function. Here are some examples: \verbatim diff --git a/doc/doxygen.1 b/doc/doxygen.1 index 157a924..46b0320 100644 --- a/doc/doxygen.1 +++ b/doc/doxygen.1 @@ -41,6 +41,6 @@ doxygen \fB\-e\fR rtf extensionsFile If \fB\-s\fR is specified the comments in the config file will be omitted. If configName is omitted `Doxyfile' will be used as a default. .SH AUTHOR -Doxygen version VERSION, Copyright Dimitri van Heesch 1997-2006 +Doxygen version VERSION, Copyright Dimitri van Heesch 1997-2007 .SH SEE ALSO doxytag(1), doxywizard(1). diff --git a/doc/doxygen_manual.tex b/doc/doxygen_manual.tex index a50ec7a..9e8efb2 100644 --- a/doc/doxygen_manual.tex +++ b/doc/doxygen_manual.tex @@ -1,7 +1,7 @@ % % % -% Copyright (C) 1997-2006 by Dimitri van Heesch. +% Copyright (C) 1997-2007 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 @@ -37,7 +37,7 @@ \begin{center} Manual for version $VERSION\\[2ex] Written by Dimitri van Heesch\\[2ex] -\copyright 1997-2006 +\copyright 1997-2007 \end{center} \end{titlepage} \clearemptydoublepage diff --git a/doc/doxygen_usage.doc b/doc/doxygen_usage.doc index c6b07b3..5fc3d9e 100644 --- a/doc/doxygen_usage.doc +++ b/doc/doxygen_usage.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/doxytag.1 b/doc/doxytag.1 index fcaa84b..a28879a 100644 --- a/doc/doxytag.1 +++ b/doc/doxytag.1 @@ -12,7 +12,8 @@ doxysearch as a CGI program to search the tag file generated by doxytag. \fB\-t\fR Generate tag file . .TP -\fB\-s\fR Generate search index . +\fB\-s\fR +Generate search index . .PP If no HTML files are given all files in the current dir that have a .html extension are parsed. diff --git a/doc/doxytag_usage.doc b/doc/doxytag_usage.doc index dfb7ffb..0f2b019 100644 --- a/doc/doxytag_usage.doc +++ b/doc/doxytag_usage.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/doxywizard_usage.doc b/doc/doxywizard_usage.doc index cf9ad10..671b64f 100644 --- a/doc/doxywizard_usage.doc +++ b/doc/doxywizard_usage.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/external.doc b/doc/external.doc index e17ec2c..0344c1d 100644 --- a/doc/external.doc +++ b/doc/external.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/faq.doc b/doc/faq.doc index c9f43d2..8ade978 100644 --- a/doc/faq.doc +++ b/doc/faq.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/features.doc b/doc/features.doc index b53ddcb..9acf6b8 100644 --- a/doc/features.doc +++ b/doc/features.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/formulas.doc b/doc/formulas.doc index cde7f06..1ff846a 100644 --- a/doc/formulas.doc +++ b/doc/formulas.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/grouping.doc b/doc/grouping.doc index ec3072b..3762687 100644 --- a/doc/grouping.doc +++ b/doc/grouping.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/history.doc b/doc/history.doc index 9ba453d..f106d33 100644 --- a/doc/history.doc +++ b/doc/history.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/htmlcmds.doc b/doc/htmlcmds.doc index 08a6b1a..d190204 100644 --- a/doc/htmlcmds.doc +++ b/doc/htmlcmds.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/index.doc b/doc/index.doc index 921624b..7dce69d 100644 --- a/doc/index.doc +++ b/doc/index.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -115,7 +115,7 @@ The third part provides information for developers: \addindex license \addindex GPL -Copyright © 1997-2006 by +Copyright © 1997-2007 by Dimitri van Heesch.

Permission to use, copy, modify, and distribute this software and its diff --git a/doc/install.doc b/doc/install.doc index 67eac06..b9ce3e0 100644 --- a/doc/install.doc +++ b/doc/install.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/installdox_usage.doc b/doc/installdox_usage.doc index 05784ec..7d6e290 100644 --- a/doc/installdox_usage.doc +++ b/doc/installdox_usage.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/language.doc b/doc/language.doc index ed9cf6f..e2f9114 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -1,7 +1,7 @@ /****************************************************************************** * Do not edit this file. It was generated by the translator.py script. * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -244,9 +244,9 @@ when the translator was updated. Spanish - Francisco Oltra Thennet - foltra at puc dot cl - 1.4.6 + Bartomeu
Francisco Oltra Thennet + bartomeu at loteria3cornella dot com
foltra at puc dot cl + up-to-date Swedish @@ -350,7 +350,8 @@ when the translator was updated. \hline Slovene & Matja\v{z} Ostrover\v{s}nik & {\tt\tiny matjaz.ostroversnik@ostri.org} & 1.4.6 \\ \hline - Spanish & Francisco Oltra Thennet & {\tt\tiny foltra@puc.cl} & 1.4.6 \\ + Spanish & Bartomeu & {\tt\tiny bartomeu@loteria3cornella.com} & up-to-date \\ + ~ & Francisco Oltra Thennet & {\tt\tiny foltra@puc.cl} & ~ \\ \hline Swedish & Mikael Hallin & {\tt\tiny mikaelhallin@yahoo.se} & 1.4.6 \\ \hline diff --git a/doc/maintainers.txt b/doc/maintainers.txt index 5ce55f1..c32f1c4 100644 --- a/doc/maintainers.txt +++ b/doc/maintainers.txt @@ -111,6 +111,7 @@ TranslatorSlovene Matjaž Ostroveršnik: matjaz.ostroversnik@ostri.org TranslatorSpanish +Bartomeu: bartomeu@loteria3cornella.com Francisco Oltra Thennet: foltra@puc.cl TranslatorSwedish diff --git a/doc/output.doc b/doc/output.doc index ec382bd..76c1b68 100644 --- a/doc/output.doc +++ b/doc/output.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/preprocessing.doc b/doc/preprocessing.doc index 851d36c..69cc477 100644 --- a/doc/preprocessing.doc +++ b/doc/preprocessing.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/starting.doc b/doc/starting.doc index ef7331f..8bb32e4 100644 --- a/doc/starting.doc +++ b/doc/starting.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/translator_report.txt b/doc/translator_report.txt index 65f29c6..1f65482 100644 --- a/doc/translator_report.txt +++ b/doc/translator_report.txt @@ -8,7 +8,7 @@ German, Greek, Hungarian, Indonesian, Italian, Japanese (+En), Korean (+En), Lithuanian, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. -Of them, 14 translators are up-to-date, 19 translators are based on +Of them, 15 translators are up-to-date, 18 translators are based on some adapter class, and 2 are English based. ---------------------------------------------------------------------- @@ -31,6 +31,7 @@ still may be some details listed even for them: TranslatorItalian TranslatorJapanese -- Remove the obsolete methods (never used). TranslatorRussian + TranslatorSpanish ---------------------------------------------------------------------- The following translator classes need some maintenance (the most @@ -39,7 +40,6 @@ version when the class was last updated and number of methods that must be implemented to become up-to-date: TranslatorSwedish 1.4.6 2 methods to implement - TranslatorSpanish 1.4.6 1 method to implement TranslatorSlovene 1.4.6 2 methods to implement TranslatorPolish 1.4.6 1 method to implement TranslatorPersian 1.4.6 1 method to implement @@ -562,28 +562,6 @@ TranslatorSlovene (TranslatorAdapter_1_4_6) 2 methods to implement virtual QCString trEnumerationValueDocumentation() -TranslatorSpanish (TranslatorAdapter_1_4_6) 1 method to implement ------------------ - - Implements 193 of the required methods. - - Missing methods (should be implemented): - - virtual QCString trCallerGraph() - - 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() - - TranslatorSwedish (TranslatorAdapter_1_4_6) 2 methods to implement ----------------- diff --git a/doc/trouble.doc b/doc/trouble.doc index ac612c7..060a19b 100644 --- a/doc/trouble.doc +++ b/doc/trouble.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/doc/xmlcmds.doc b/doc/xmlcmds.doc index 79d47df..415b00e 100644 --- a/doc/xmlcmds.doc +++ b/doc/xmlcmds.doc @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/Makefile.in b/src/Makefile.in index e9decc4..bef323e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -2,7 +2,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 diff --git a/src/bufstr.h b/src/bufstr.h index 3fcdd1d..3d33cce 100644 --- a/src/bufstr.h +++ b/src/bufstr.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/classdef.cpp b/src/classdef.cpp index 6d00ea5..e815517 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -359,6 +359,8 @@ void ClassDef::internalInsertMember(MemberDef *md, bool addToAllList ) { + if (md->isHidden()) return; + //printf("adding %s::%s\n",name().data(),md->name().data()); if (!isReference()) { @@ -2043,6 +2045,7 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level) if (level>256) { err("Possible recursive class relation while inside %s and looking for %s\n",name().data(),bcd->name().data()); + abort(); return FALSE; } if (baseClasses()) diff --git a/src/classdef.h b/src/classdef.h index 5d745bf..2153def 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/classlist.cpp b/src/classlist.cpp index 67507d6..0e9de89 100644 --- a/src/classlist.cpp +++ b/src/classlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/classlist.h b/src/classlist.h index 0b74b03..ace8195 100644 --- a/src/classlist.h +++ b/src/classlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp index 12b1432..da66f45 100644 --- a/src/cmdmapper.cpp +++ b/src/cmdmapper.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/cmdmapper.h b/src/cmdmapper.h index 6a261fa..1ef3053 100644 --- a/src/cmdmapper.h +++ b/src/cmdmapper.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/code.h b/src/code.h index 15dcdee..b2f11f2 100644 --- a/src/code.h +++ b/src/code.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/code.l b/src/code.l index 6a6224d..7ee6a82 100644 --- a/src/code.l +++ b/src/code.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/commentcnv.h b/src/commentcnv.h index 7ccbc4f..a2965f7 100644 --- a/src/commentcnv.h +++ b/src/commentcnv.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/commentcnv.l b/src/commentcnv.l index c26334e..25a0f1a 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/commentscan.h b/src/commentscan.h index a30ae61..85ff2a0 100644 --- a/src/commentscan.h +++ b/src/commentscan.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/commentscan.l b/src/commentscan.l index ddd62a5..ec58264 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -1,6 +1,6 @@ /***************************************************************************** * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/config.h b/src/config.h index 311bfb8..ea8fdad 100644 --- a/src/config.h +++ b/src/config.h @@ -50,6 +50,7 @@ class ConfigOption QCString dependsOn() const { return m_dependency; } void addDependency(const char *dep) { m_dependency = dep; } + void setEncoding(const QCString &e) { m_encoding = e; } protected: virtual void writeTemplate(QTextStream &t,bool sl,bool upd) = 0; @@ -67,6 +68,7 @@ class ConfigOption QCString m_name; QCString m_doc; QCString m_dependency; + QCString m_encoding; OptionType m_kind; }; @@ -357,6 +359,7 @@ class Config static void deleteInstance() { delete m_instance; + m_instance=0; } /*! Returns an iterator that can by used to iterate over the diff --git a/src/config.l b/src/config.l index 19d3c1e..2818b0a 100644 --- a/src/config.l +++ b/src/config.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -31,6 +32,7 @@ #include "config.h" #include "version.h" +#include "portable.h" #include "lang_cfg.h" @@ -62,6 +64,11 @@ void config_warn(const char *fmt, ...) va_end(args); } +static QCString configStringRecode( + const QCString &str, + const char *fromEncoding, + const char *toEncoding); + #define MAX_INCLUDE_DEPTH 10 #define YY_NEVER_INTERACTIVE 1 @@ -100,9 +107,11 @@ void ConfigOption::writeIntValue(QTextStream &t,int i) void ConfigOption::writeStringValue(QTextStream &t,QCString &s) { - const char *p=s.data(); char c; bool needsEscaping=FALSE; + // convert the string back to it original encoding + QCString se = configStringRecode(s,"UTF-8",m_encoding); + const char *p=se.data(); if (p) { while ((c=*p++)!=0 && !needsEscaping) @@ -110,7 +119,7 @@ void ConfigOption::writeStringValue(QTextStream &t,QCString &s) if (needsEscaping) { t << "\""; - p=s.data(); + p=se.data(); while (*p) { if (*p=='"') t << "\\"; // escape quotes @@ -120,7 +129,7 @@ void ConfigOption::writeStringValue(QTextStream &t,QCString &s) } else { - t << s; + t << se; } } } @@ -297,6 +306,7 @@ static QCString enumValuesPerLineString; static QCString treeViewWidthString; static QCString maxDotGraphWidthString; static QCString maxDotGraphHeightString; +static QCString encoding; static Config *config; @@ -327,6 +337,51 @@ static int yyread(char *buf,int max_size) } +static QCString configStringRecode( + const QCString &str, + const char *fromEncoding, + const char *toEncoding) +{ + QCString inputEncoding = fromEncoding; + QCString outputEncoding = toEncoding; + if (inputEncoding.isEmpty() || outputEncoding.isEmpty() || inputEncoding==outputEncoding) return str; + int inputSize=str.length(); + int outputSize=inputSize*4+1; + QCString output(outputSize); + void *cd = portable_iconv_open(outputEncoding,inputEncoding); + if (cd==(void *)(-1)) + { + fprintf(stderr,"Error: unsupported character conversion: '%s'->'%s'\n", + inputEncoding.data(),outputEncoding.data()); + exit(1); + } + size_t iLeft=inputSize; + size_t oLeft=outputSize; + const char *inputPtr = str.data(); + char *outputPtr = output.data(); + if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft)) + { + outputSize-=oLeft; + output.resize(outputSize+1); + output.at(outputSize+1)='\0'; + //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data()); + } + else + { + fprintf(stderr,"Error: failed to translate characters from %s to %s: %s\n", + inputEncoding.data(),outputEncoding.data(),strerror(errno)); + exit(1); + } + portable_iconv_close(cd); + return output; +} + +static void checkEncoding() +{ + ConfigString *option = (ConfigString*)config->get("DOXYFILE_ENCODING"); + encoding = *option->valueRef(); +} + static FILE *tryPath(const char *path,const char *fileName) { QCString absName=(QCString)path+"/"+fileName; @@ -429,6 +484,7 @@ static void readIncludeFile(const char *incName) [a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { QCString cmd=yytext; cmd=cmd.left(cmd.length()-1).stripWhiteSpace(); ConfigOption *option = config->get(cmd); + option->setEncoding(encoding); if (option==0) // oops not known { config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", @@ -521,7 +577,7 @@ static void readIncludeFile(const char *incName) /* include a config file */ "@INCLUDE"[ \t]*"=" { BEGIN(Include);} ([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") { - readIncludeFile(yytext); + readIncludeFile(configStringRecode(yytext,encoding,"UTF-8")); BEGIN(Start); } <> { @@ -565,7 +621,9 @@ static void readIncludeFile(const char *incName) } elemStr.resize(0); } -[^ \"\t\r\n]+ { (*s)+=yytext; } +[^ \"\t\r\n]+ { (*s)+=configStringRecode(yytext,encoding,"UTF-8"); + checkEncoding(); + } "\"" { lastState=YY_START; BEGIN(GetQuotedString); tmpString.resize(0); @@ -573,9 +631,14 @@ static void readIncludeFile(const char *incName) "\""|"\n" { //printf("Quoted String = `%s'\n",tmpString.data()); if (lastState==GetString) - (*s)+=tmpString; + { + (*s)+=configStringRecode(tmpString,encoding,"UTF-8"); + checkEncoding(); + } else - elemStr+=tmpString; + { + elemStr+=configStringRecode(tmpString,encoding,"UTF-8"); + } if (*yytext=='\n') { config_err("Warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data()); @@ -603,7 +666,7 @@ static void readIncludeFile(const char *incName) } } [^ \#\"\t\r\n]+ { - elemStr+=yytext; + elemStr+=configStringRecode(yytext,encoding,"UTF-8"); } \n { yyLineNr++; BEGIN(Start); } \\[ \r\t]*\n { yyLineNr++; BEGIN(Start); } @@ -704,7 +767,7 @@ static void substEnvVarsInString(QCString &s) while ((i=re.match(s,p,&l))!=-1) { //printf("Found environment var s.mid(%d,%d)=`%s'\n",i+2,l-3,s.mid(i+2,l-3).data()); - QCString env=getenv(s.mid(i+2,l-3)); + QCString env=portable_getenv(s.mid(i+2,l-3)); substEnvVarsInString(env); // recursively expand variables if needed. s = s.left(i)+env+s.right(s.length()-i-l); p=i+env.length(); // next time start at the end of the expanded string @@ -1040,11 +1103,7 @@ void Config::check() dotPath+='/'; } } -#if defined(_WIN32) - QFileInfo dp(dotPath+"dot.exe"); -#else - QFileInfo dp(dotPath+"dot"); -#endif + QFileInfo dp(dotPath+portable_dotCommand()); if (!dp.exists() || !dp.isFile()) { config_err("Warning: the dot tool could not be found at %s\n",dotPath.data()); @@ -1117,23 +1176,24 @@ void Config::check() filePatternList.append("*.mm"); filePatternList.append("*.dox"); filePatternList.append("*.py"); -#if !defined(_WIN32) - // unix => case sensitive match => also include useful uppercase versions - filePatternList.append("*.C"); - filePatternList.append("*.CC"); - filePatternList.append("*.C++"); - filePatternList.append("*.II"); - filePatternList.append("*.I++"); - filePatternList.append("*.H"); - filePatternList.append("*.HH"); - filePatternList.append("*.H++"); - filePatternList.append("*.CS"); - filePatternList.append("*.PHP"); - filePatternList.append("*.PHP3"); - filePatternList.append("*.M"); - filePatternList.append("*.MM"); - filePatternList.append("*.PY"); -#endif + if (portable_fileSystemIsCaseSensitive()) + { + // unix => case sensitive match => also include useful uppercase versions + filePatternList.append("*.C"); + filePatternList.append("*.CC"); + filePatternList.append("*.C++"); + filePatternList.append("*.II"); + filePatternList.append("*.I++"); + filePatternList.append("*.H"); + filePatternList.append("*.HH"); + filePatternList.append("*.H++"); + filePatternList.append("*.CS"); + filePatternList.append("*.PHP"); + filePatternList.append("*.PHP3"); + filePatternList.append("*.M"); + filePatternList.append("*.MM"); + filePatternList.append("*.PY"); + } } // add default pattern if needed @@ -1143,44 +1203,35 @@ void Config::check() examplePatternList.append("*"); } -#undef PUTENV -#undef SEP -#if defined(_WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ < 0x0550)) -#define PUTENV _putenv -#define SEP ";" -#else -#define PUTENV putenv -#define SEP ":" -#endif if (Config_getBool("HAVE_DOT")) { - char *curFontPath = getenv("DOTFONTPATH"); - int l=curFontPath ? strlen(curFontPath)+1 : 0; - static char *buf = 0; - buf = (char *)realloc(buf,strlen("DOTFONTPATH=.")+l+1); - strcpy(buf,"DOTFONTPATH=."); - if (l>0) + QCString curFontPath = portable_getenv("DOTFONTPATH"); + QCString newFontPath = "."; + if (!curFontPath.isEmpty()) { - strcat(buf,SEP); - strcat(buf,curFontPath); + newFontPath+=portable_pathListSeparator(); + newFontPath+=curFontPath; } - PUTENV(buf); + portable_setenv("DOTFONTPATH",newFontPath); } -#if 0 - int &depth = Config_getInt("MAX_DOT_GRAPH_DEPTH"); - if (depth==0) - { - depth=1000; - } -#endif - if (Config_getBool("OPTIMIZE_OUTPUT_JAVA") && Config_getBool("INLINE_INFO")) { // don't show inline info for Java output, since Java has no inline // concept. Config_getBool("INLINE_INFO")=FALSE; } + +#if 0 + if (Config_getString("RTF_OUTPUT_ENCODING").isEmpty()) + { + Config_getString("RTF_OUTPUT_ENCODING")="ISO-8859-1"; + } + if (Config_getString("LATEX_OUTPUT_ENCODING").isEmpty()) + { + Config_getString("LATEX_OUTPUT_ENCODING")="ISO-8859-1"; + } +#endif // add default words if needed QStrList &annotationFromBrief = Config_getList("ABBREVIATE_BRIEF"); @@ -1247,7 +1298,15 @@ void Config::create() addInfo("Project","Project related configuration options"); //----------------------------------------------------------------------------------------------- - + cs = addString( + "DOXYFILE_ENCODING", + "This tag specifies the encoding used for all characters in the config file that \n" + "follow. The default is UTF-8 which is also the encoding used for all text before \n" + "the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into \n" + "libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of \n" + "possible encodings.\n" + ); + cs->setDefaultValue("UTF-8"); cs = addString( "PROJECT_NAME", "The PROJECT_NAME tag is a single word (or a sequence of words surrounded \n" @@ -1386,6 +1445,8 @@ void Config::create() #ifdef LANG_UA ce->addValue("Ukrainian"); #endif + +#if 0 cb = addBool( "USE_WINDOWS_ENCODING", "This tag can be used to specify the encoding used in the generated output. \n" @@ -1401,6 +1462,9 @@ void Config::create() FALSE #endif ); +#endif + addObsolete("USE_WINDOWS_ENCODING"); + cb = addBool( "BRIEF_MEMBER_DESC", "If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will \n" @@ -1667,11 +1731,7 @@ void Config::create() "allowed. This is useful if you have classes or files whose names only differ \n" "in case and if your file system supports case sensitive file names. Windows \n" "and Mac users are advised to set this option to NO.\n", -#if defined(_WIN32) || defined(macintosh) || defined(__MACOSX__) || defined(__APPLE__) - FALSE // case insensitive file system expected -#else - TRUE // case sensitive file system expected -#endif + portable_fileSystemIsCaseSensitive() ); cb = addBool( "HIDE_SCOPE_NAMES", @@ -1858,6 +1918,13 @@ void Config::create() "with spaces. \n" ); cl->setWidgetType(ConfigList::FileAndDir); + cs = addString( "INPUT_ENCODING", + "This tag can be used to specify the character encoding of the source files that \n" + "doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default \n" + "input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. \n" + "See http://www.gnu.org/software/libiconv for the list of possible encodings.\n" + ); + cs->setDefaultValue("UTF-8"); cl = addList( "FILE_PATTERNS", "If the value of the INPUT tag contains directories, you can use the \n" @@ -1897,6 +1964,13 @@ void Config::create() "for example use the pattern */test/* \n" ); cl = addList( + "EXCLUDE_SYMBOLS", + "The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names \n" + "(namespaces, classes, functions, etc.) that should be excluded from the output. \n" + "The symbol name can be a fully qualified name, a word, or if the wildcard * is used, \n" + "a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test \n" + ); + cl = addList( "EXAMPLE_PATH", "The EXAMPLE_PATH tag can be used to specify one or more files or \n" "directories that contain example code fragments that are included (see \n" @@ -2206,6 +2280,16 @@ void Config::create() cs->setDefaultValue("latex"); cs->setWidgetType(ConfigString::Dir); cs->addDependency("GENERATE_LATEX"); +#if 0 + cs = addString( "LATEX_OUTPUT_ENCODING", + "The LATEX_OUTPUT_ENCODING specifies the character encoding of the LaTeX output.\n" + "produced by doxygen. If left blank ISO-8859-1 will be used. Doxygen uses \n" + "libiconv for the transcoding. See http://www.gnu.org/software/libiconv for \n" + "the list of possible encodings.\n" + ); + cs->setDefaultValue("ISO-8859-1"); + cs->addDependency("GENERATE_LATEX"); +#endif cs = addString( "LATEX_CMD_NAME", "The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be \n" @@ -2312,6 +2396,16 @@ void Config::create() cs->setDefaultValue("rtf"); cs->setWidgetType(ConfigString::Dir); cs->addDependency("GENERATE_RTF"); +#if 0 + cs = addString( "RTF_OUTPUT_ENCODING", + "The RTF_OUTPUT_ENCODING specifies the character encoding of the RTF output.\n" + "produced by doxygen. If left blank ISO-8859-1 will be used. Doxygen uses \n" + "libiconv for the transcoding. See http://www.gnu.org/software/libiconv for \n" + "the list of possible encodings.\n" + ); + cs->setDefaultValue("ISO-8859-1"); + cs->addDependency("GENERATE_RTF"); +#endif cb = addBool( "COMPACT_RTF", "If the COMPACT_RTF tag is set to YES Doxygen generates more compact \n" @@ -2855,21 +2949,21 @@ static QCString configFileToString(const char *name) config_err("Error: file `%s' not found\n",name); return ""; } - f.setName(name); - fileOpened=f.open(IO_ReadOnly); - if (fileOpened) - { - int fsize=f.size(); - QCString contents(fsize+2); - f.readBlock(contents.data(),fsize); - f.close(); - if (fsize==0 || contents[fsize-1]=='\n') - contents[fsize]='\0'; - else - contents[fsize]='\n'; // to help the scanner - contents[fsize+1]='\0'; - return contents; - } + f.setName(name); + fileOpened=f.open(IO_ReadOnly); + if (fileOpened) + { + int fsize=f.size(); + QCString contents(fsize+2); + f.readBlock(contents.data(),fsize); + f.close(); + if (fsize==0 || contents[fsize-1]=='\n') + contents[fsize]='\0'; + else + contents[fsize]='\n'; // to help the scanner + contents[fsize+1]='\0'; + return contents; + } } if (!fileOpened) { @@ -2897,6 +2991,7 @@ bool Config::parseString(const char *fn,const char *str) bool Config::parse(const char *fn) { + encoding = "UTF-8"; return parseString(fn,configFileToString(fn)); } diff --git a/src/constexp.h b/src/constexp.h index 1a6c37b..0df7ec3 100644 --- a/src/constexp.h +++ b/src/constexp.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/constexp.l b/src/constexp.l index 3a09242..c2cd529 100644 --- a/src/constexp.l +++ b/src/constexp.l @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/constexp.y b/src/constexp.y index 81282dc..04c6224 100644 --- a/src/constexp.y +++ b/src/constexp.y @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/cppvalue.cpp b/src/cppvalue.cpp index f1df666..983a55f 100644 --- a/src/cppvalue.cpp +++ b/src/cppvalue.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/cppvalue.h b/src/cppvalue.h index 0a8d638..b080431 100644 --- a/src/cppvalue.h +++ b/src/cppvalue.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/debug.cpp b/src/debug.cpp index 258980e..f1033a5 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/debug.h b/src/debug.h index 777b8fe..95891d2 100644 --- a/src/debug.h +++ b/src/debug.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/declinfo.h b/src/declinfo.h index 28c8add..7287e1e 100644 --- a/src/declinfo.h +++ b/src/declinfo.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/declinfo.l b/src/declinfo.l index c269700..3ca4c97 100644 --- a/src/declinfo.l +++ b/src/declinfo.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/defargs.h b/src/defargs.h index aeb8175..fe9ea28 100644 --- a/src/defargs.h +++ b/src/defargs.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/defargs.l b/src/defargs.l index e5a2de4..94578ff 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/defgen.cpp b/src/defgen.cpp index 8211151..26201b7 100644 --- a/src/defgen.cpp +++ b/src/defgen.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/defgen.h b/src/defgen.h index 0e03064..5560602 100644 --- a/src/defgen.h +++ b/src/defgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/define.cpp b/src/define.cpp index 12846b9..42789be 100644 --- a/src/define.cpp +++ b/src/define.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/define.h b/src/define.h index fc32bfe..4c1f904 100644 --- a/src/define.h +++ b/src/define.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/definition.cpp b/src/definition.cpp index ce8d1c4..bfcfbad 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -135,6 +135,63 @@ void DefinitionImpl::init(const char *df,int dl, //----------------------------------------------------------------------------------------- +static bool matchExcludedSymbols(const char *name) +{ + static QStrList &exclSyms = Config_getList("EXCLUDE_SYMBOLS"); + if (exclSyms.count()==0) return FALSE; // nothing specified + const char *pat = exclSyms.first(); + QCString symName = name; + while (pat) + { + QCString pattern = pat; + bool forceStart=FALSE; + bool forceEnd=FALSE; + if (pattern.at(0)=='^') + pattern=pattern.mid(1),forceStart=TRUE; + if (pattern.at(pattern.length()-1)=='$') + pattern=pattern.left(pattern.length()-1),forceEnd=TRUE; + if (pattern.find('*')!=-1) // wildcard mode + { + QRegExp re(substitute(pattern,"*",".*"),TRUE); + int i,pl; + i = re.match(symName,0,&pl); + //printf(" %d = re.match(%s) pattern=%s\n",i,symName.data(),pattern.data()); + if (i!=-1) // wildcard match + { + int sl=symName.length(); + // check if it is a whole word match + if ((i==0 || pattern.at(0)=='*' || (!isId(symName.at(i-1)) && !forceStart)) && + (i+pl==sl || pattern.at(i+pl)=='*' || (!isId(symName.at(i+pl)) && !forceEnd)) + ) + { + //printf("--> name=%s pattern=%s match at %d\n",symName.data(),pattern.data(),i); + return TRUE; + } + } + } + else if (!pattern.isEmpty()) // match words + { + int i = symName.find(pattern); + if (i!=-1) // we have a match! + { + int pl=pattern.length(); + int sl=symName.length(); + // check if it is a whole word match + if ((i==0 || (!isId(symName.at(i-1)) && !forceStart)) && + (i+pl==sl || (!isId(symName.at(i+pl)) && !forceEnd)) + ) + { + //printf("--> name=%s pattern=%s match at %d\n",symName.data(),pattern.data(),i); + return TRUE; + } + } + } + pat = exclSyms.next(); + } + //printf("--> name=%s: no match\n",name); + return FALSE; +} + void Definition::addToMap(const char *name,Definition *d) { QCString symbolName = name; @@ -224,6 +281,7 @@ Definition::Definition(const char *df,int dl, if (isSymbol) addToMap(name,this); _setBriefDescription(b,df,dl); _setDocumentation(d,df,dl,TRUE); + if (matchExcludedSymbols(name)) m_impl->hidden = TRUE; } Definition::~Definition() @@ -472,6 +530,7 @@ static bool readCodeFragment(const char *fileName, } if (Config_getBool("FILTER_SOURCE_FILES")) pclose(f); else fclose(f); } + result = transcodeCharacterStringToUTF8(result); return found; } @@ -849,6 +908,7 @@ void Definition::setOuterScope(Definition *d) m_impl->qualifiedName.resize(0); // flush cached scope name m_impl->outerScope = d; } + m_impl->hidden = m_impl->hidden || d->isHidden(); } QCString Definition::localName() const @@ -1079,12 +1139,12 @@ bool Definition::isHidden() const bool Definition::isVisibleInProject() const { - return isLinkableInProject() || m_impl->hidden; + return isLinkableInProject() && !m_impl->hidden; } bool Definition::isVisible() const { - return isLinkable() || m_impl->hidden; + return isLinkable() && !m_impl->hidden; } QCString Definition::getReference() const @@ -1155,7 +1215,7 @@ void Definition::_setSymbolName(const QCString &name) void Definition::setHidden(bool b) { makeResident(); - m_impl->hidden = b; + m_impl->hidden = m_impl->hidden || b; } void Definition::setLocalName(const QCString name) diff --git a/src/definition.h b/src/definition.h index d3723a1..0b8b95e 100644 --- a/src/definition.h +++ b/src/definition.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/diagram.cpp b/src/diagram.cpp index d169617..45e839b 100644 --- a/src/diagram.cpp +++ b/src/diagram.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -33,6 +33,7 @@ //#include "latexgen.h" //#include "htmlgen.h" #include "doxygen.h" +#include "portable.h" //----------------------------------------------------------------------------- @@ -1251,7 +1252,7 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path, epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", epsBaseName.data(),epsBaseName.data()); //printf("Converting eps using `%s'\n",epstopdfCmd.data()); - if (iSystem("epstopdf",epstopdfArgs)!=0) + if (portable_system("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); return; diff --git a/src/diagram.h b/src/diagram.h index bf95ef7..ad19723 100644 --- a/src/diagram.h +++ b/src/diagram.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/dirdef.cpp b/src/dirdef.cpp index ef5d7b9..7768c32 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -908,7 +908,7 @@ void writeDirDependencyGraph(const char *dirName) //QCString dotArgs(4096); //dotArgs.sprintf("%s -Tgif -o %s",path.data(),outFile.data()); - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs,FALSE)!=0) + //if (portable_system(Config_getString("DOT_PATH")+"dot",dotArgs,FALSE)!=0) //{ // err("Problems running dot. Check your installation!\n"); //} diff --git a/src/dirdef.h b/src/dirdef.h index d8d7cf1..27224de 100644 --- a/src/dirdef.h +++ b/src/dirdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/docparser.cpp b/src/docparser.cpp index dc87b57..090c67f 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -40,6 +40,7 @@ #include "section.h" #include "searchindex.h" #include "language.h" +#include "portable.h" // debug off #define DBG(x) do {} while(0) @@ -220,7 +221,7 @@ 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()); - if (iSystem("epstopdf",epstopdfArgs)!=0) + if (portable_system("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); } @@ -5642,7 +5643,6 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, bool isExample, const char *exampleName, bool singleLine, bool linkFromIndex) { - //printf("validatingParseDoc(%s,%s)\n",ctx?ctx->name().data():"", // md?md->name().data():""); //printf("========== validating %s at line %d\n",fileName,startLine); diff --git a/src/docparser.h b/src/docparser.h index 4ce3a11..7f074e4 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/doctokenizer.h b/src/doctokenizer.h index 3602b95..301f79b 100644 --- a/src/doctokenizer.h +++ b/src/doctokenizer.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/doctokenizer.l b/src/doctokenizer.l index b285322..d26db37 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -31,6 +31,7 @@ #include "membergroup.h" #include "definition.h" #include "doxygen.h" +#include "portable.h" #define YY_NEVER_INTERACTIVE 1 @@ -472,7 +473,7 @@ REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"|"/"))*({ID}(":")?){FUNCARG}? "$("{ID}")" { /* environment variable */ QCString name = &yytext[2]; name = name.left(name.length()-1); - QCString value = getenv(name); + QCString value = portable_getenv(name); for (int i=value.length()-1;i>=0;i--) unput(value.at(i)); } {HTMLTAG} { /* html tag */ diff --git a/src/docvisitor.h b/src/docvisitor.h index c0a5e4d..82f5137 100644 --- a/src/docvisitor.h +++ b/src/docvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/dot.cpp b/src/dot.cpp index e57557a..dae373c 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -1,9 +1,9 @@ /***************************************************************************** * - * $Id$ + * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -33,6 +33,7 @@ #include "docparser.h" #include "debug.h" #include "pagedef.h" +#include "portable.h" #include #include @@ -527,7 +528,7 @@ bool DotRunner::run() dotArgs+=' '; dotArgs+=*s; } - if ((exitCode=iSystem(dotExe,dotArgs,FALSE))!=0) + if ((exitCode=portable_system(dotExe,dotArgs,FALSE))!=0) { goto error; } @@ -537,7 +538,7 @@ bool DotRunner::run() for (li.toFirst();(s=li.current());++li) { dotArgs="\""+m_file+"\" "+*s; - if ((exitCode=iSystem(dotExe,dotArgs,FALSE))!=0) + if ((exitCode=portable_system(dotExe,dotArgs,FALSE))!=0) { goto error; } @@ -2063,7 +2064,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out, QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", baseName.data(),baseName.data()); - if (iSystem("epstopdf",epstopdfArgs)!=0) + if (portable_system("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); QDir::setCurrent(oldDir); @@ -2370,7 +2371,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", baseName.data(),baseName.data()); - if (iSystem("epstopdf",epstopdfArgs)!=0) + if (portable_system("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); QDir::setCurrent(oldDir); @@ -2649,7 +2650,7 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", baseName.data(),baseName.data()); - if (iSystem("epstopdf",epstopdfArgs)!=0) + if (portable_system("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); QDir::setCurrent(oldDir); @@ -2780,7 +2781,7 @@ QCString DotDirDeps::writeGraph(QTextStream &out, QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", baseName.data(),baseName.data()); - if (iSystem("epstopdf",epstopdfArgs)!=0) + if (portable_system("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); QDir::setCurrent(oldDir); @@ -2902,22 +2903,11 @@ void generateGraphLegend(const char *path) QDir::setCurrent(oldDir); } -#undef PUTENV -#if defined(_WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ < 0x0550)) -#define PUTENV _putenv -#else -#define PUTENV putenv -#endif - void writeDotGraphFromFile(const char *inFile,const char *outDir, const char *outFile,GraphOutputFormat format) { QCString absOutFile = outDir; -#ifdef _WIN32 - absOutFile+='\\'; -#else - absOutFile+='/'; -#endif + absOutFile+=portable_pathSeparator(); absOutFile+=outFile; // chdir to the output dir, so dot can find the font file. @@ -2926,18 +2916,14 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, QDir::setCurrent(outDir); //printf("Going to dir %s\n",QDir::currentDirPath().data()); - QCString env = getenv("DOTFONTPATH"); + QCString env = portable_getenv("DOTFONTPATH"); if (env==".") // this path was set by doxygen, so dot can find the FreeSans.ttf font, // for user defined graphs we use the default search path built into dot, // unless the user has set the DOTFONTPATH as well. { // temporarily remove the DOTFONTPATH environment variable // so dot will use the built-in search path. -#ifdef _WIN32 - SetEnvironmentVariable("DOTFONTPATH", 0); -#else - unsetenv("DOTFONTPATH"); -#endif + portable_unsetenv("DOTFONTPATH"); } QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); @@ -2959,7 +2945,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", outFile,outFile); - if (iSystem("epstopdf",epstopdfArgs)!=0) + if (portable_system("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); } @@ -2970,11 +2956,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, if (env==".") { // restore the DOTFONTPATH variable again -#ifdef _WIN32 - SetEnvironmentVariable("DOTFONTPATH", env); -#else - setenv("DOTFONTPATH",env,1); -#endif + portable_setenv("DOTFONTPATH",env); } error: @@ -3320,7 +3302,7 @@ QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat fo QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", baseName.data(),baseName.data()); - if (iSystem("epstopdf",epstopdfArgs)!=0) + if (portable_system("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); QDir::setCurrent(oldDir); diff --git a/src/dot.h b/src/dot.h index 5ca8724..030b12f 100644 --- a/src/dot.h +++ b/src/dot.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 68d7055..b4b2025 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -28,6 +28,7 @@ #include #include #include +#include #include "version.h" #include "doxygen.h" @@ -71,6 +72,7 @@ #include "objcache.h" #include "store.h" #include "marshal.h" +#include "portable.h" #define RECURSE_ENTRYTREE(func,var) \ do { if (var->children()) { \ @@ -79,11 +81,6 @@ } } while(0) -#if defined(_MSC_VER) || defined(__BORLANDC__) -#define popen _popen -#define pclose _pclose -#endif - #if !defined(_WIN32) || defined(__CYGWIN__) #include #define HAS_SIGNALS @@ -149,6 +146,8 @@ FileStorage *g_storage = 0; QCString spaces; +static bool g_successfulRun = FALSE; + void clearAll() @@ -1422,7 +1421,6 @@ static void buildNamespaceList(EntryNav *rootNav) nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition nd->setBriefDescription(root->brief,root->briefFile,root->briefLine); nd->addSectionsToDefinition(root->anchors); - nd->setHidden(root->hidden); //printf("Adding namespace to group\n"); addNamespaceToGroups(root,nd); @@ -3846,8 +3844,15 @@ static bool findTemplateInstanceRelation(Entry *root, EntryNav *templateRootNav = classEntries.find(templateClass->name()); if (templateRootNav) { - templateRootNav->loadEntry(g_storage); + bool unloadNeeded=FALSE; Entry *templateRoot = templateRootNav->entry(); + if (templateRoot==0) // not yet loaded + { + templateRootNav->loadEntry(g_storage); + templateRoot = templateRootNav->entry(); + ASSERT(templateRoot!=0); // now it should really be loaded + unloadNeeded=TRUE; + } Debug::print(Debug::Classes,0," template root found %s templSpec=%s!\n", templateRoot->name.data(),templSpec.data()); @@ -3860,7 +3865,10 @@ static bool findTemplateInstanceRelation(Entry *root, isArtificial,templArgs,templateNames); delete templArgs; - templateRootNav->releaseEntry(); + if (unloadNeeded) // still cleanup to do + { + templateRootNav->releaseEntry(); + } } else { @@ -8022,6 +8030,7 @@ static void generateConfigFile(const char *configFile,bool shortList, if (fileOpened) { QTextStream t(&f); + t.setEncoding(QTextStream::Latin1); Config::instance()->writeTemplate(t,shortList,updateOnly); if (!writeToStdout) { @@ -8128,6 +8137,43 @@ static bool patternMatch(QFileInfo *fi,QStrList *patList) return found; } +static int transcodeCharacterBuffer(BufStr &srcBuf,int size, + const char *inputEncoding,const char *outputEncoding) +{ + if (inputEncoding==0 || outputEncoding==0) return size; + if (qstricmp(inputEncoding,outputEncoding)==0) return size; + void *cd = portable_iconv_open(outputEncoding,inputEncoding); + if (cd==(void *)(-1)) + { + err("Error: unsupported character conversion: '%s'->'%s': %s\n" + "Check the INPUT_ENCODING setting in the config file!\n", + inputEncoding,outputEncoding,strerror(errno)); + exit(1); + } + int tmpBufSize=size*4+1; + BufStr tmpBuf(tmpBufSize); + size_t iLeft=size; + size_t oLeft=tmpBufSize; + const char *srcPtr = srcBuf.data(); + char *dstPtr = tmpBuf.data(); + uint newSize=0; + if (!portable_iconv(cd, &srcPtr, &iLeft, &dstPtr, &oLeft)) + { + newSize = tmpBufSize-oLeft; + srcBuf.shrink(newSize); + strncpy(srcBuf.data(),tmpBuf.data(),newSize); + //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data()); + } + else + { + err("Error: failed to translate characters from %s to %s: check INPUT_ENCODING\n", + inputEncoding,outputEncoding); + exit(1); + } + portable_iconv_close(cd); + return newSize; +} + //---------------------------------------------------------------------------- // reads a file into an array and filters out any 0x00 and 0x06 bytes, // because these are special for the parser. @@ -8136,7 +8182,7 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest) { // try to open file int size=0; - uint oldPos = dest.curPos(); + //uint oldPos = dest.curPos(); //printf(".......oldPos=%d\n",oldPos); QFileInfo fi(fileName); @@ -8153,7 +8199,7 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest) size=fi.size(); // read the file dest.skip(size); - if (f.readBlock(dest.data()+oldPos,size)!=size) + if (f.readBlock(dest.data()/*+oldPos*/,size)!=size) { err("Error while reading file %s\n",fileName); return; @@ -8162,7 +8208,7 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest) else { QCString cmd=filterName+" \""+fileName+"\""; - FILE *f=popen(cmd,"r"); + FILE *f=portable_popen(cmd,"r"); if (!f) { err("Error: could not execute filter %s\n",filterName.data()); @@ -8176,7 +8222,7 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest) //printf(">>>>>>>>Reading %d bytes\n",numRead); dest.addArray(buf,numRead),size+=numRead; } - pclose(f); + portable_pclose(f); } // filter unwanted bytes from the resulting data uchar conv[256]; @@ -8185,14 +8231,14 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest) conv[0x06]=0x20; // replace the offending characters with spaces conv[0x00]=0x20; // remove any special markers from the input - uchar *p=(uchar *)dest.data()+oldPos; + uchar *p=(uchar *)dest.data()/*+oldPos*/; for (i=0;ineedsPreprocessing(extension)) { msg("Preprocessing %s...\n",s->data()); - preprocessFile(fileName,*bufPtr); + preprocessFile(fileName,preBuf); } else { msg("Reading %s...\n",s->data()); - copyAndFilterFile(fileName,*bufPtr); + copyAndFilterFile(fileName,preBuf); } - bufPtr->addChar('\n'); /* to prevent problems under Windows ? */ + preBuf.addChar('\n'); /* to prevent problems under Windows ? */ + + // do character transcoding if needed. + transcodeCharacterBuffer(preBuf,preBuf.curPos(), + Config_getString("INPUT_ENCODING"),"UTF-8"); - BufStr convBuf(bufPtr->curPos()+1024); + BufStr convBuf(preBuf.curPos()+1024); // convert multi-line C++ comments to C style comments convertCppComments(&preBuf,&convBuf,fileName); @@ -8622,7 +8684,7 @@ static void readAliases() static void usage(const char *name) { - msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2006\n\n",versionString); + msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2007\n\n",versionString); msg("You can use doxygen in a number of ways:\n\n"); msg("1) Use doxygen to generate a template configuration file:\n"); msg(" %s [-s] -g [configName]\n\n",name); @@ -9073,9 +9135,27 @@ static void stopDoxygen(int) } #endif +static void exitDoxygen() +{ + if (!g_successfulRun) // premature exit + { + QDir thisDir; + msg("Exiting...\n"); + if (!Doxygen::entryDBFileName.isEmpty()) + { + thisDir.remove(Doxygen::entryDBFileName); + } + if (!Doxygen::objDBFileName.isEmpty()) + { + thisDir.remove(Doxygen::objDBFileName); + } + } +} void parseInput() { + atexit(exitDoxygen); + /************************************************************************** * Make sure the output directory exists **************************************************************************/ @@ -9120,7 +9200,7 @@ void parseInput() signal(SIGINT, stopDoxygen); #endif - uint pid = iPid(); + uint pid = portable_pid(); Doxygen::objDBFileName.sprintf("doxygen_objdb_%d.tmp",pid); Doxygen::objDBFileName.prepend(outputDirectory+"/"); Doxygen::entryDBFileName.sprintf("doxygen_entrydb_%d.tmp",pid); @@ -9741,17 +9821,15 @@ void generateOutput() msg("Generating style sheet...\n"); //printf("writing style info\n"); + QCString genString = + theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME")); outputList->writeStyleInfo(0); // write first part outputList->disableAllBut(OutputGenerator::Latex); - outputList->parseText( - theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME")) - ); + outputList->parseText(genString); outputList->writeStyleInfo(1); // write second part //parseText(*outputList,theTranslator->trWrittenBy()); outputList->writeStyleInfo(2); // write third part - outputList->parseText( - theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME")) - ); + outputList->parseText(genString); outputList->writeStyleInfo(3); // write fourth part //parseText(*outputList,theTranslator->trWrittenBy()); outputList->writeStyleInfo(4); // write last part @@ -9897,7 +9975,7 @@ void generateOutput() msg("Running html help compiler...\n"); QString oldDir = QDir::currentDirPath(); QDir::setCurrent(Config_getString("HTML_OUTPUT")); - if (iSystem(Config_getString("HHC_LOCATION"), "index.hhp", FALSE)) + if (portable_system(Config_getString("HHC_LOCATION"), "index.hhp", FALSE)) { err("Error: failed to run html help compiler on index.hhp"); } @@ -9934,5 +10012,6 @@ void generateOutput() delete Doxygen::symbolCache; delete Doxygen::symbolMap; delete Doxygen::symbolStorage; + g_successfulRun=TRUE; } diff --git a/src/doxygen.h b/src/doxygen.h index c52829c..bb98dab 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in index 7d1e812..25fdfb3 100644 --- a/src/doxygen.pro.in +++ b/src/doxygen.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 @@ -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 -lpng -lmd5 +unix:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lpng -lmd5 win32:INCLUDEPATH += . -win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lpng -lmd5 +win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lpng -lmd5 win32-msvc:LIBS += qtools.lib png.lib md5.lib doxygen.lib doxycfg.lib shell32.lib win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib win32-borland:LIBS += qtools.lib png.lib md5.lib doxygen.lib doxycfg.lib shell32.lib win32-borland:TMAKE_LFLAGS += -L..\lib -L$(BCB)\lib\psdk win32:TMAKE_CXXFLAGS += -DQT_NODLL -win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lpng -lmd5 +win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lpng -lmd5 win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti INCLUDEPATH += ../qtools ../libpng ../libmd5 . #win32-g++:INCLUDEPATH -= ../libpng diff --git a/src/doxytag.l b/src/doxytag.l index 53e89a3..5c8a4b3 100644 --- a/src/doxytag.l +++ b/src/doxytag.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -750,7 +750,7 @@ void parseFileOrDir(const char *fileName) void usage(const char *name) { - fprintf(stderr,"Doxytag version %s\nCopyright Dimitri van Heesch 1997-2006\n\n", + fprintf(stderr,"Doxytag version %s\nCopyright Dimitri van Heesch 1997-2007\n\n", versionString); fprintf(stderr," Generates a tag file and/or a search index for a set of HTML files\n\n"); fprintf(stderr,"Usage: %s [-t tag_file] [ html_file [html_file...] ]\n",name); diff --git a/src/doxytag.pro.in b/src/doxytag.pro.in index 8df2777..28e829e 100644 --- a/src/doxytag.pro.in +++ b/src/doxytag.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 diff --git a/src/doxytag.t b/src/doxytag.t index 82cf04b..570acc3 100644 --- a/src/doxytag.t +++ b/src/doxytag.t @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 diff --git a/src/entry.cpp b/src/entry.cpp index eaeaf5e..ca831c8 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/entry.h b/src/entry.h index 30b55fb..8c45ad0 100644 --- a/src/entry.h +++ b/src/entry.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/example.h b/src/example.h index 4b6e06e..98fde77 100644 --- a/src/example.h +++ b/src/example.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/filedef.cpp b/src/filedef.cpp index 046232c..ecbb102 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -33,11 +33,7 @@ #include "searchindex.h" #include "htags.h" #include "parserintf.h" - -#if defined(_MSC_VER) || defined(__BORLANDC__) -#define popen _popen -#define pclose _pclose -#endif +#include "portable.h" class DevNullCodeDocInterface : public CodeOutputInterface { @@ -712,6 +708,7 @@ void FileDef::addMembersToMemberGroup() /*! Adds member definition \a md to the list of all members of this file */ void FileDef::insertMember(MemberDef *md) { + if (md->isHidden()) return; //printf("%s:FileDef::insertMember(%s (=%p) list has %d elements)\n", // name().data(),md->name().data(),md,allMemberList.count()); MemberList *allMemberList = getMemberList(MemberList::allMembersList); @@ -769,6 +766,7 @@ void FileDef::insertMember(MemberDef *md) /*! Adds compound definition \a cd to the list of all compounds of this file */ void FileDef::insertClass(ClassDef *cd) { + if (cd->isHidden()) return; if (classSDict==0) { classSDict = new ClassSDict(17); @@ -782,6 +780,7 @@ void FileDef::insertClass(ClassDef *cd) /*! Adds namespace definition \a nd to the list of all compounds of this file */ void FileDef::insertNamespace(NamespaceDef *nd) { + if (nd->isHidden()) return; if (!nd->name().isEmpty() && (namespaceSDict==0 || namespaceSDict->find(nd->name())==0)) { @@ -1310,7 +1309,7 @@ void FileDef::acquireFileVersion() if (!vercmd.isEmpty()) { msg("Version of %s : ",filepath.data()); - FILE *f=popen(vercmd+" \""+filepath+"\"","r"); + FILE *f=portable_popen(vercmd+" \""+filepath+"\"","r"); if (!f) { err("Error: could not execute %s\n",vercmd.data()); @@ -1319,7 +1318,7 @@ void FileDef::acquireFileVersion() const int bufSize=1024; char buf[bufSize]; int numRead = fread(buf,1,bufSize,f); - pclose(f); + portable_pclose(f); if (numRead > 0) { fileVersion = QCString(buf,numRead).stripWhiteSpace(); diff --git a/src/filedef.h b/src/filedef.h index c5b99ab..1ad232c 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/filename.cpp b/src/filename.cpp index 2399124..21659ef 100644 --- a/src/filename.cpp +++ b/src/filename.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/filename.h b/src/filename.h index c1b30b6..b665255 100644 --- a/src/filename.h +++ b/src/filename.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/formula.cpp b/src/formula.cpp index 07d60d2..673ca7e 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -2,7 +2,7 @@ i * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -17,9 +17,6 @@ #include #include -#ifdef _WIN32 -#include -#endif #include "qtbc.h" #include @@ -32,6 +29,7 @@ #include "util.h" #include "message.h" #include "config.h" +#include "portable.h" Formula::Formula(const char *text) { @@ -105,7 +103,7 @@ void FormulaList::generateBitmaps(const char *path) //system("latex _formulas.tex /dev/null"); QCString latexCmd = Config_getString("LATEX_CMD_NAME"); if (latexCmd.isEmpty()) latexCmd="latex"; - if (iSystem(latexCmd,"_formulas.tex")!=0) + if (portable_system(latexCmd,"_formulas.tex")!=0) { err("Problems running latex. Check your installation or look " "for typos in _formulas.tex and check _formulas.log!\n"); @@ -127,7 +125,7 @@ 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()); - if (iSystem("dvips",dviArgs)!=0) + if (portable_system("dvips",dviArgs)!=0) { err("Problems running dvips. Check your installation!\n"); return; @@ -175,22 +173,15 @@ void FormulaList::generateBitmaps(const char *path) // The pixmap is a truecolor image, where only black and white are // used. -#if defined(_WIN32) && !defined(__CYGWIN__) - // used the c version of program, so standard in / standard out work. - const char *ghostscriptCommand = "gswin32c.exe"; -#else - const char *ghostscriptCommand = "gs"; -#endif - char gsArgs[4096]; sprintf(gsArgs,"-q -g%dx%d -r%dx%dx -sDEVICE=ppmraw " "-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -- %s.ps", gx,gy,(int)(scaleFactor*72),(int)(scaleFactor*72), formBase.data(),formBase.data() ); - if (iSystem(ghostscriptCommand,gsArgs)!=0) + if (portable_system(portable_ghostScriptCommand(),gsArgs)!=0) { - err("Problem running ghostscript %s %s. Check your installation!\n",ghostscriptCommand,gsArgs); + err("Problem running ghostscript %s %s. Check your installation!\n",portable_ghostScriptCommand(),gsArgs); return; } f.setName(formBase+".pnm"); diff --git a/src/formula.h b/src/formula.h index a4c0f53..581b6a2 100644 --- a/src/formula.h +++ b/src/formula.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 13a5681..4370f5c 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -153,6 +153,7 @@ void GroupDef::findSectionsInDocumentation() void GroupDef::addFile(const FileDef *def) { + if (def->isHidden()) return; if (Config_getBool("SORT_BRIEF_DOCS")) fileList->inSort(def); else @@ -161,6 +162,7 @@ void GroupDef::addFile(const FileDef *def) void GroupDef::addClass(const ClassDef *cd) { + if (cd->isHidden()) return; if (Config_getBool("SORT_BRIEF_DOCS")) classSDict->inSort(cd->name(),cd); else @@ -169,6 +171,7 @@ void GroupDef::addClass(const ClassDef *cd) void GroupDef::addNamespace(const NamespaceDef *def) { + if (def->isHidden()) return; if (Config_getBool("SORT_BRIEF_DOCS")) namespaceSDict->inSort(def->name(),def); else @@ -177,6 +180,7 @@ void GroupDef::addNamespace(const NamespaceDef *def) void GroupDef::addDir(const DirDef *def) { + if (def->isHidden()) return; if (Config_getBool("SORT_BRIEF_DOCS")) dirList->inSort(def); else @@ -185,6 +189,7 @@ void GroupDef::addDir(const DirDef *def) void GroupDef::addPage(PageDef *def) { + if (def->isHidden()) return; //printf("Making page %s part of a group\n",def->name.data()); pageDict->append(def->name(),def); def->makePartOfGroup(this); @@ -192,6 +197,7 @@ void GroupDef::addPage(PageDef *def) void GroupDef::addExample(const PageDef *def) { + if (def->isHidden()) return; exampleDict->append(def->name(),def); } @@ -229,6 +235,7 @@ void GroupDef::addMembersToMemberGroup() bool GroupDef::insertMember(MemberDef *md,bool docOnly) { + if (md->isHidden()) return FALSE; //printf("GroupDef(%s)::insertMember(%s)\n", title.data(), md->name().data()); MemberNameInfo *mni=0; if ((mni=(*allMemberNameInfoSDict)[md->name()])) diff --git a/src/groupdef.h b/src/groupdef.h index 25bc79d..dddf52b 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/htags.cpp b/src/htags.cpp index 012c844..05cf07b 100644 --- a/src/htags.cpp +++ b/src/htags.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -23,6 +23,7 @@ #include "util.h" #include "message.h" #include "config.h" +#include "portable.h" bool Htags::useHtags = FALSE; @@ -89,7 +90,7 @@ bool Htags::execute(const QCString &htmldir) QCString oldDir = convertToQCString(QDir::currentDirPath()); QDir::setCurrent(g_inputDir.absPath()); //printf("CommandLine=[%s]\n",commandLine.data()); - bool result=iSystem("htags",commandLine,FALSE)==0; + bool result=portable_system("htags",commandLine,FALSE)==0; QDir::setCurrent(oldDir); return result; } diff --git a/src/htags.h b/src/htags.h index 1038e91..a75e9c7 100644 --- a/src/htags.h +++ b/src/htags.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/htmlattrib.h b/src/htmlattrib.h index 9a1609b..3291d05 100644 --- a/src/htmlattrib.h +++ b/src/htmlattrib.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index cc59c47..4f1034f 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -1081,7 +1081,7 @@ void HtmlDocVisitor::startLink(const QString &ref,const QString &file, m_t << "href=\""; if (!ref.isEmpty()) { - if ((dest=Doxygen::tagDestinationDict[ref])) m_t << relPath << *dest << "/"; + if ((dest=Doxygen::tagDestinationDict[ref])) m_t << *dest << "/"; } else { diff --git a/src/htmldocvisitor.h b/src/htmldocvisitor.h index 5cf95c0..7dedf88 100644 --- a/src/htmldocvisitor.h +++ b/src/htmldocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 235fb64..3dbec0e 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -546,8 +546,9 @@ static void writeDefaultHeaderFile(QTextStream &t, const char *title, t << "\n" "" - "idLanguageCharset() << "\">\n" + "idLanguageCharset() + << "\">\n" ""; t << convertToHtml(title); t << "\n"; @@ -778,6 +779,10 @@ void HtmlGenerator::startIndexItem(const char *ref,const char *f) { if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; } + else + { + t << relPath; + } if (f) t << f << Doxygen::htmlFileExtension << "\">"; } else diff --git a/src/htmlgen.h b/src/htmlgen.h index ed57628..8ca87d0 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index c9328e6..5cbb5c7 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/htmlhelp.h b/src/htmlhelp.h index 67e0e20..81cac26 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/image.cpp b/src/image.cpp index ee00835..811317a 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/image.h b/src/image.h index 49ba9ba..34a07f3 100644 --- a/src/image.h +++ b/src/image.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/index.cpp b/src/index.cpp index 076a68b..dc8cdd5 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/index.h b/src/index.h index e63537f..ebe563e 100644 --- a/src/index.h +++ b/src/index.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/instdox.cpp b/src/instdox.cpp index 3f814d4..85ff84d 100644 --- a/src/instdox.cpp +++ b/src/instdox.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/instdox.h b/src/instdox.h index ede8e8f..a35e2b1 100644 --- a/src/instdox.h +++ b/src/instdox.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/language.cpp b/src/language.cpp index 58655d8..1168bef 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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,6 +19,7 @@ #include "language.h" #include "lang_cfg.h" #include "translator.h" +#include "translatordecoder.h" #include "translator_en.h" #if !defined(ENGLISH_ONLY) #include "translator_adapter.h" @@ -159,55 +160,55 @@ bool setTranslator(const char *langName) #ifdef LANG_SE else if (L_EQUAL("swedish")) { - theTranslator=new TranslatorSwedish; + theTranslator=new TranslatorDecoder(new TranslatorSwedish); } #endif #ifdef LANG_CZ else if (L_EQUAL("czech")) { - theTranslator=new TranslatorCzech; + theTranslator=new TranslatorDecoder(new TranslatorCzech); } #endif #ifdef LANG_FR else if (L_EQUAL("french")) { - theTranslator=new TranslatorFrench; + theTranslator=new TranslatorDecoder(new TranslatorFrench); } #endif #ifdef LANG_ID else if (L_EQUAL("indonesian")) { - theTranslator=new TranslatorIndonesian; + theTranslator=new TranslatorDecoder(new TranslatorIndonesian); } #endif #ifdef LANG_IT else if (L_EQUAL("italian")) { - theTranslator=new TranslatorItalian; + theTranslator=new TranslatorDecoder(new TranslatorItalian); } #endif #ifdef LANG_DE else if (L_EQUAL("german")) { - theTranslator=new TranslatorGerman; + theTranslator=new TranslatorDecoder(new TranslatorGerman); } #endif #ifdef LANG_JP else if (L_EQUAL("japanese")) { - theTranslator=new TranslatorJapanese; + theTranslator=new TranslatorDecoder(new TranslatorJapanese); } #endif #ifdef LANG_JE else if (L_EQUAL("japanese-en")) { - theTranslator=new TranslatorJapaneseEn; + theTranslator=new TranslatorDecoder(new TranslatorJapaneseEn); } #endif #ifdef LANG_ES else if (L_EQUAL("spanish")) { - theTranslator=new TranslatorSpanish; + theTranslator=new TranslatorDecoder(new TranslatorSpanish); } #endif #ifdef LANG_FI @@ -221,139 +222,139 @@ bool setTranslator(const char *langName) #ifdef LANG_RU else if (L_EQUAL("russian")) { - theTranslator=new TranslatorRussian; + theTranslator=new TranslatorDecoder(new TranslatorRussian); } #endif #ifdef LANG_HR else if (L_EQUAL("croatian")) { - theTranslator=new TranslatorCroatian; + theTranslator=new TranslatorDecoder(new TranslatorCroatian); } #endif #ifdef LANG_PL else if (L_EQUAL("polish")) { - theTranslator=new TranslatorPolish; + theTranslator=new TranslatorDecoder(new TranslatorPolish); } #endif #ifdef LANG_PT else if (L_EQUAL("portuguese")) { - theTranslator=new TranslatorPortuguese; + theTranslator=new TranslatorDecoder(new TranslatorPortuguese); } #endif #ifdef LANG_HU else if (L_EQUAL("hungarian")) { - theTranslator=new TranslatorHungarian; + theTranslator=new TranslatorDecoder(new TranslatorHungarian); } #endif #ifdef LANG_KR else if (L_EQUAL("korean")) { - theTranslator=new TranslatorKorean; + theTranslator=new TranslatorDecoder(new TranslatorKorean); } #endif #ifdef LANG_KE else if (L_EQUAL("korean-en")) { - theTranslator=new TranslatorKoreanEn; + theTranslator=new TranslatorDecoder(new TranslatorKoreanEn); } #endif #ifdef LANG_RO else if (L_EQUAL("romanian")) { - theTranslator=new TranslatorRomanian; + theTranslator=new TranslatorDecoder(new TranslatorRomanian); } #endif #ifdef LANG_SI else if (L_EQUAL("slovene")) { - theTranslator=new TranslatorSlovene; + theTranslator=new TranslatorDecoder(new TranslatorSlovene); } #endif #ifdef LANG_CN else if (L_EQUAL("chinese")) { - theTranslator=new TranslatorChinese; + theTranslator=new TranslatorDecoder(new TranslatorChinese); } #endif #ifdef LANG_TW else if (L_EQUAL("chinese-traditional")) { - theTranslator=new TranslatorChinesetraditional; + theTranslator=new TranslatorDecoder(new TranslatorChinesetraditional); } #endif #ifdef LANG_NO else if (L_EQUAL("norwegian")) { - theTranslator=new TranslatorNorwegian; + theTranslator=new TranslatorDecoder(new TranslatorNorwegian); } #endif #ifdef LANG_BR else if (L_EQUAL("brazilian")) { - theTranslator=new TranslatorBrazilian; + theTranslator=new TranslatorDecoder(new TranslatorBrazilian); } #endif #ifdef LANG_DK else if (L_EQUAL("danish")) { - theTranslator=new TranslatorDanish; + theTranslator=new TranslatorDecoder(new TranslatorDanish); } #endif #ifdef LANG_SK else if (L_EQUAL("slovak")) { - theTranslator=new TranslatorSlovak; + theTranslator=new TranslatorDecoder(new TranslatorSlovak); } #endif #ifdef LANG_UA else if (L_EQUAL("ukrainian")) { - theTranslator=new TranslatorUkrainian; + theTranslator=new TranslatorDecoder(new TranslatorUkrainian); } #endif #ifdef LANG_GR else if (L_EQUAL("greek")) { - theTranslator=new TranslatorGreek; + theTranslator=new TranslatorDecoder(new TranslatorGreek); } #endif #ifdef LANG_SR else if (L_EQUAL("serbian")) { - theTranslator=new TranslatorSerbian; + theTranslator=new TranslatorDecoder(new TranslatorSerbian); } #endif #ifdef LANG_CA else if (L_EQUAL("catalan")) { - theTranslator=new TranslatorCatalan; + theTranslator=new TranslatorDecoder(new TranslatorCatalan); } #endif #ifdef LANG_LT else if (L_EQUAL("lithuanian")) { - theTranslator=new TranslatorLithuanian; + theTranslator=new TranslatorDecoder(new TranslatorLithuanian); } #endif #ifdef LANG_ZA else if (L_EQUAL("afrikaans")) { - theTranslator=new TranslatorAfrikaans; + theTranslator=new TranslatorDecoder(new TranslatorAfrikaans); } #endif #ifdef LANG_AR else if (L_EQUAL("arabic")) { - theTranslator=new TranslatorArabic; + theTranslator=new TranslatorDecoder(new TranslatorArabic); } #endif #ifdef LANG_FA else if (L_EQUAL("persian")) { - theTranslator=new TranslatorPersian; + theTranslator=new TranslatorDecoder(new TranslatorPersian); } #endif #endif // ENGLISH_ONLY diff --git a/src/language.h b/src/language.h index 22932eb..2028387 100644 --- a/src/language.h +++ b/src/language.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 9ac9a87..9426a1e 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h index 2241f06..62f1011 100644 --- a/src/latexdocvisitor.h +++ b/src/latexdocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 624278d..385c7bc 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -239,19 +239,22 @@ static void writeDefaultHeaderPart1(QTextStream &t) << "\\usepackage[ps2pdf," << endl << " pagebackref=true," << endl << " colorlinks=true," << endl - << " linkcolor=blue" << endl + << " linkcolor=blue," << endl + << " unicode" << endl << " ]{hyperref}" << endl << "\\usepackage{pspicture}" << endl << "\\else" << endl << "\\usepackage[pdftex," << endl << " pagebackref=true," << endl << " colorlinks=true," << endl - << " linkcolor=blue" << endl + << " linkcolor=blue," << endl + << " unicode" << endl << " ]{hyperref}" << endl << "\\fi" << endl; } // Try to get the command for switching on the language // support + t << "\\usepackage[utf8]{inputenc}" << endl; QCString sLanguageSupportCommand( theTranslator->latexLanguageSupportCommand()); @@ -261,7 +264,6 @@ static void writeDefaultHeaderPart1(QTextStream &t) // if the command is empty, no output is needed. t << sLanguageSupportCommand << endl; } - t << "\\usepackage{doxygen}\n"; QStrList &extraPackages = Config_getList("EXTRA_PACKAGES"); const char *s=extraPackages.first(); @@ -425,17 +427,20 @@ void LatexGenerator::writeStyleSheetFile(QFile &f) t << theTranslator->trGeneratedAt( dateToString(TRUE), projectName ); t << " doxygen"; //t << " " << theTranslator->trWrittenBy() << " "; - //t << "Dimitri van Heesch \\copyright~1997-2006"; + //t << "Dimitri van Heesch \\copyright~1997-2007"; writeDefaultStyleSheetPart2(t); t << theTranslator->trGeneratedAt( dateToString(TRUE), projectName ); t << " doxygen"; //t << " << theTranslator->trWrittenBy() << " "; - //t << "Dimitri van Heesch \\copyright~1997-2006"; + //t << "Dimitri van Heesch \\copyright~1997-2007"; writeDefaultStyleSheetPart3(t); } void LatexGenerator::startFile(const char *name,const char *,const char *) { +#if 0 + setEncoding(Config_getString("LATEX_OUTPUT_ENCODING")); +#endif QCString fileName=name; relPath = relativePathToRoot(fileName); if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex"; @@ -845,14 +850,14 @@ void LatexGenerator::writeStyleInfo(int part) break; case 2: { - //t << " Dimitri van Heesch \\copyright~1997-2006"; + //t << " Dimitri van Heesch \\copyright~1997-2007"; t << "}]{}\n"; writeDefaultStyleSheetPart2(t); } break; case 4: { - //t << " Dimitri van Heesch \\copyright~1997-2006"; + //t << " Dimitri van Heesch \\copyright~1997-2007"; writeDefaultStyleSheetPart3(t); endPlainFile(); } diff --git a/src/latexgen.h b/src/latexgen.h index 4d361ab..e4e4378 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/libdoxycfg.pro.in b/src/libdoxycfg.pro.in index cf4454e..1632b4f 100644 --- a/src/libdoxycfg.pro.in +++ b/src/libdoxycfg.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 @@ -16,8 +16,8 @@ TEMPLATE = libdoxycfg.t CONFIG = console warn_on staticlib $extraopts -HEADERS = config.h -SOURCES = config.cpp +HEADERS = config.h portable.h +SOURCES = config.cpp portable.cpp win32:TMAKE_CXXFLAGS += -DQT_NODLL win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti INCLUDEPATH += ../qtools diff --git a/src/libdoxycfg.t b/src/libdoxycfg.t index aa75498..6be6e51 100644 --- a/src/libdoxycfg.t +++ b/src/libdoxycfg.t @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in index ae89a80..656c75f 100644 --- a/src/libdoxygen.pro.in +++ b/src/libdoxygen.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 diff --git a/src/libdoxygen.t b/src/libdoxygen.t index 7910d01..541ec97 100644 --- a/src/libdoxygen.t +++ b/src/libdoxygen.t @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2006 by Dimitri van Heesch. +# Copyright (C) 1997-2007 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 diff --git a/src/lockingptr.h b/src/lockingptr.h index 99a1772..a3cedfd 100644 --- a/src/lockingptr.h +++ b/src/lockingptr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/logos.cpp b/src/logos.cpp index 861e942..dfed41c 100644 --- a/src/logos.cpp +++ b/src/logos.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/logos.h b/src/logos.h index b4c95ad..1dc89cc 100644 --- a/src/logos.h +++ b/src/logos.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/main.cpp b/src/main.cpp index 232bf0e..64006bc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 530b272..3f305a9 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/mandocvisitor.h b/src/mandocvisitor.h index 93e2eb1..c2c5f0d 100644 --- a/src/mandocvisitor.h +++ b/src/mandocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/mangen.cpp b/src/mangen.cpp index 3a47043..f8bfb57 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/mangen.h b/src/mangen.h index df9effa..38b566a 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 55a8fb8..155e10d 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -771,6 +771,8 @@ bool MemberDef::isLinkableInProject() const static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); static bool extractStatic = Config_getBool("EXTRACT_STATIC"); makeResident(); + + if (isHidden()) return FALSE; //printf("MemberDef::isLinkableInProject(name=%s)\n",name().data()); if (m_impl->templateMaster) { @@ -1792,7 +1794,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, else if (protection()==Package) sl.append("package"); if (lvirt==Virtual) sl.append("virtual"); else if (lvirt==Pure) sl.append("pure virtual"); - if (isSignal()) sl.append("signal"); + if (isSignal()) sl.append("signal"); if (isSlot()) sl.append("slot"); } if (m_impl->classDef && m_impl->classDef!=container) sl.append("inherited"); @@ -2562,14 +2564,22 @@ void MemberDef::setSectionList(Definition *d, MemberList *sl) m_impl->classSectionSDict->append(key,sl); } -Specifier MemberDef::virtualness() const +Specifier MemberDef::virtualness(int count) const { + if (count>25) + { + warn(getDefFileName(),getDefLine(), + "Warning: Internal inconsistency: recursion detected in overload relation for member %s!" + ,name().data() + ); + return Normal; + } makeResident(); Specifier v = m_impl->virt; MemberDef *rmd = reimplements(); while (rmd && v==Normal) { - v = rmd->virtualness()==Normal ? Normal : Virtual; + v = rmd->virtualness(count+1)==Normal ? Normal : Virtual; rmd = rmd->reimplements(); } return v; diff --git a/src/memberdef.h b/src/memberdef.h index b313f30..c396346 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -114,7 +114,7 @@ class MemberDef : public Definition // direct kind info Protection protection() const; - Specifier virtualness() const; + Specifier virtualness(int count=0) const; MemberType memberType() const; QCString memberTypeName() const; diff --git a/src/membergroup.cpp b/src/membergroup.cpp index 60ac5d4..dc2f200 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/membergroup.h b/src/membergroup.h index 885341a..93f9184 100644 --- a/src/membergroup.h +++ b/src/membergroup.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 8864488..6bb14af 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/memberlist.h b/src/memberlist.h index 1467835..c032c21 100644 --- a/src/memberlist.h +++ b/src/memberlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/membername.cpp b/src/membername.cpp index e05e28b..136d215 100644 --- a/src/membername.cpp +++ b/src/membername.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/membername.h b/src/membername.h index 8c71af0..8b7ac22 100644 --- a/src/membername.h +++ b/src/membername.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/message.cpp b/src/message.cpp index 572542a..8b24e31 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/message.h b/src/message.h index 12af48c..a5b3031 100644 --- a/src/message.h +++ b/src/message.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 54278b1..1ebaaf9 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -171,6 +171,7 @@ void NamespaceDef::addMembersToMemberGroup() void NamespaceDef::insertMember(MemberDef *md) { + if (md->isHidden()) return; MemberList *allMemberList = getMemberList(MemberList::allMembersList); if (allMemberList==0) { diff --git a/src/namespacedef.h b/src/namespacedef.h index 827ace3..f36e89c 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/objcache.cpp b/src/objcache.cpp index f45a0e7..05c62cf 100644 --- a/src/objcache.cpp +++ b/src/objcache.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/objcache.h b/src/objcache.h index 3516534..2795e34 100644 --- a/src/objcache.h +++ b/src/objcache.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/outputgen.cpp b/src/outputgen.cpp index 4a5c54a..d085312 100644 --- a/src/outputgen.cpp +++ b/src/outputgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -20,6 +20,7 @@ #include "qtbc.h" #include "outputgen.h" #include "message.h" +#include "portable.h" OutputGenerator::OutputGenerator() { @@ -63,11 +64,37 @@ void OutputGenerator::startPlainFile(const char *name) void OutputGenerator::endPlainFile() { - //printf("endPlainFile(%s)\n",file->name()); - fs.writeRawBytes(a.data(),a.size()) ; // write string buffer to file + bool converted=false; + if (!encoding.isEmpty()) + { + QByteArray enc(a.size()*4); + void *cd = portable_iconv_open(encoding,"UTF-8"); + if (cd!=(void *)(-1)) + { + size_t iLeft=a.size(); + size_t oLeft=enc.size(); + const char *inputPtr = a.data(); + char *outputPtr = enc.data(); + if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft)) + { + enc.resize(enc.size()-oLeft); + postProcess(enc); + //printf("a.size()=%d enc.size()=%d iLeft=%d oLeft=%d enc2.size()=%d\n", + // a.size(),enc.size(),iLeft,oLeft,enc2.size()); + fs.writeRawBytes(enc.data(),enc.size()) ; // write string buffer to file + converted=TRUE; + } + portable_iconv_close(cd); + } + } + if (!converted) + { + //printf("endPlainFile(%s)\n",file->name()); + fs.writeRawBytes(a.data(),a.size()) ; // write string buffer to file + } + b.close(); delete file; file=0; - b.close(); a.resize(0); b.setBuffer(a); b.open(IO_WriteOnly); diff --git a/src/outputgen.h b/src/outputgen.h index 13f2970..0a7c06c 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -278,6 +278,8 @@ class OutputGenerator : public BaseOutputDocInterface bool isEnabled() const { return active; } void pushGeneratorState(); void popGeneratorState(); + void setEncoding(const QCString &enc) { encoding = enc; } + virtual void postProcess(QByteArray &) { } virtual void printDoc(DocNode *,const char *langExt) = 0; @@ -383,6 +385,7 @@ class OutputGenerator : public BaseOutputDocInterface QCString dir; bool active; QStack *genStack; + QString encoding; private: OutputGenerator(const OutputGenerator &o); diff --git a/src/outputlist.cpp b/src/outputlist.cpp index dac4972..27e1237 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/outputlist.h b/src/outputlist.h index 6a8c4c8..4a8a0d7 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/pagedef.h b/src/pagedef.h index 2d4c59d..a605aaf 100644 --- a/src/pagedef.h +++ b/src/pagedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/parserintf.h b/src/parserintf.h index 477958a..6e45a96 100644 --- a/src/parserintf.h +++ b/src/parserintf.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index c1298d5..73f25db 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 by Dimitri van Heesch. * Authors: Dimitri van Heesch, Miguel Lobo. * * Permission to use, copy, modify, and distribute this software and its diff --git a/src/perlmodgen.h b/src/perlmodgen.h index 7bc1068..14daa25 100644 --- a/src/perlmodgen.h +++ b/src/perlmodgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/pngenc.cpp b/src/pngenc.cpp index 79a83ac..0624c91 100644 --- a/src/pngenc.cpp +++ b/src/pngenc.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/pngenc.h b/src/pngenc.h index f32248e..88dfa25 100644 --- a/src/pngenc.h +++ b/src/pngenc.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/portable.cpp b/src/portable.cpp new file mode 100644 index 0000000..94f8c20 --- /dev/null +++ b/src/portable.cpp @@ -0,0 +1,385 @@ +#include +#include +#if defined(_WIN32) && !defined(__CYGWIN__) +#undef UNICODE +#include +#else +#include +#include +#include +#include +#include +extern char **environ; +#endif + +#include +#include +#include + +#if defined(_MSC_VER) || defined(__BORLANDC__) +#define popen _popen +#define pclose _pclose +#endif + +#include "portable.h" +//#include "debug.h" +//#include "doxygen.h" + +static double sysElapsedTime; + +int portable_system(const char *command,const char *args,bool commandHasConsole) +{ + QTime time; + time.start(); + + if (command==0) return 1; + + QCString fullCmd=command; + fullCmd=fullCmd.stripWhiteSpace(); + if (fullCmd.at(0)!='"' && fullCmd.find(' ')!=-1) + { + // add quotes around command as it contains spaces and is not quoted already + fullCmd="\""+fullCmd+"\""; + } + fullCmd += " "; + fullCmd += args; + //Debug::print(Debug::ExtCmd,0,"Executing external command `%s`\n",fullCmd.data()); + +#if !defined(_WIN32) || defined(__CYGWIN__) + commandHasConsole=commandHasConsole; + /*! taken from the system() manpage on my Linux box */ + int pid,status=0; + +#ifdef _OS_SOLARIS // for Solaris we use vfork since it is more memory efficient + + // on Solaris fork() duplicates the memory usage + // so we use vfork instead + + // spawn shell + if ((pid=vfork())<0) + { + status=-1; + } + else if (pid==0) + { + execl("/bin/sh","sh","-c",fullCmd.data(),(char*)0); + _exit(127); + } + else + { + while (waitpid(pid,&status,0 )<0) + { + if (errno!=EINTR) + { + status=-1; + break; + } + } + } + sysElapsedTime+=((double)time.elapsed())/1000.0; + return status; + +#else // Other Unices just use fork + + pid = fork(); + if (pid==-1) return -1; + if (pid==0) + { + const char * argv[4]; + argv[0] = "sh"; + argv[1] = "-c"; + argv[2] = fullCmd.data(); + argv[3] = 0; + execve("/bin/sh",(char * const *)argv,environ); + exit(127); + } + for (;;) + { + if (waitpid(pid,&status,0)==-1) + { + if (errno!=EINTR) return -1; + } + else + { + sysElapsedTime+=((double)time.elapsed())/1000.0; + if (WIFEXITED(status)) + { + return WEXITSTATUS(status); + } + else + { + return status; + } + } + } +#endif // !_OS_SOLARIS + +#else // Win32 specific + if (commandHasConsole) + { + return system(fullCmd); + } + else + { + // gswin32 is a GUI api which will pop up a window and run + // asynchronously. To prevent both, we use ShellExecuteEx and + // WaitForSingleObject (thanks to Robert Golias for the code) + + SHELLEXECUTEINFO sInfo = { + sizeof(SHELLEXECUTEINFO), /* structure size */ + SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI, /* leave the process running */ + NULL, /* window handle */ + NULL, /* action to perform: open */ + command, /* file to execute */ + args, /* argument list */ + NULL, /* use current working dir */ + SW_HIDE, /* minimize on start-up */ + 0, /* application instance handle */ + NULL, /* ignored: id list */ + NULL, /* ignored: class name */ + NULL, /* ignored: key class */ + 0, /* ignored: hot key */ + NULL, /* ignored: icon */ + NULL /* resulting application handle */ + }; + if (!ShellExecuteEx(&sInfo)) + { + return -1; + } + else if (sInfo.hProcess) /* executable was launched, wait for it to finish */ + { + WaitForSingleObject(sInfo.hProcess,INFINITE); + CloseHandle(sInfo.hProcess); + } + } + sysElapsedTime+=((double)time.elapsed())/1000.0; + return 0; +#endif + +} + +uint portable_pid() +{ + uint pid; +#if !defined(_WIN32) || defined(__CYGWIN__) + pid = (uint)getpid(); +#else + pid = (uint)GetCurrentProcessId(); +#endif + return pid; +} + +static char **last_environ; + +void portable_setenv(const char *name,const char *value) +{ +#ifdef _WIN32 + SetEnvironmentVariable(name,value); +#else + register char **ep = 0; + register size_t size; + const size_t namelen=strlen(name); + const size_t vallen=strlen(value) + 1; + + size = 0; + if (environ!=0) + { + for (ep = environ; *ep; ++ep) + { + if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=') + break; + else + ++size; + } + } + + if (environ==0 || *ep==0) /* add new string */ + { + char **new_environ; + if (environ == last_environ && environ!=0) + { + // We allocated this space; we can extend it. + new_environ = (char **) realloc (last_environ, (size + 2) * sizeof (char *)); + } + else + { + new_environ = (char **) malloc ((size + 2) * sizeof (char *)); + } + + if (new_environ==0) // no more memory + { + return; + } + + new_environ[size] = (char *)malloc (namelen + 1 + vallen); + if (new_environ[size]==0) + { + free (new_environ); + return; + } + + if (environ != last_environ) + { + memcpy ((char *) new_environ, environ, size * sizeof (char *)); + } + + memcpy(new_environ[size], name, namelen); + new_environ[size][namelen] = '='; + memcpy(&new_environ[size][namelen + 1], value, vallen); + new_environ[size + 1] = 0; + last_environ = environ = new_environ; + } + else /* replace existing string */ + { + size_t len = strlen (*ep); + if (len + 1 < namelen + 1 + vallen) + { + /* The existing string is too short; malloc a new one. */ + char *newString = (char *)malloc(namelen + 1 + vallen); + if (newString==0) + { + return; + } + *ep = newString; + } + memcpy(*ep, name, namelen); + (*ep)[namelen] = '='; + memcpy(&(*ep)[namelen + 1], value, vallen); + } + +#endif +} + +void portable_unsetenv(const char *variable) +{ +#ifdef _WIN32 + SetEnvironmentVariable(variable,0); +#else + /* Some systems don't have unsetenv(), so we do it ourselves */ + size_t len; + char **ep; + + if (variable == NULL || *variable == '\0' || strchr (variable, '=') != NULL) + { + return; // not properly formatted + } + + len = strlen(variable); + + ep = environ; + while (*ep != NULL) + { + if (!strncmp(*ep, variable, len) && (*ep)[len]=='=') + { + /* Found it. Remove this pointer by moving later ones back. */ + char **dp = ep; + do dp[0] = dp[1]; while (*dp++); + /* Continue the loop in case NAME appears again. */ + } + else + { + ++ep; + } + } +#endif +} + +const char *portable_getenv(const char *variable) +{ + return getenv(variable); +} + +portable_off_t portable_fseek(FILE *f,portable_off_t offset, int whence) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return _fseeki64(f,offset,whence); +#else + return fseeko(f,offset,whence); +#endif +} + +portable_off_t portable_ftell(FILE *f) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return _ftelli64(f); +#else + return ftello(f); +#endif +} + +char portable_pathSeparator() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return '\\'; +#else + return '/'; +#endif +} + +char portable_pathListSeparator() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return ';'; +#else + return ':'; +#endif +} + +const char *portable_ghostScriptCommand() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return "gswin32c.exe"; +#else + return "gs"; +#endif +} + +const char *portable_dotCommand() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return "dot.exe"; +#else + return "dot"; +#endif +} + +bool portable_fileSystemIsCaseSensitive() +{ +#if defined(_WIN32) || defined(macintosh) || defined(__MACOSX__) || defined(__APPLE__) + return FALSE; +#else + return TRUE; +#endif +} + +FILE * portable_popen(const char *name,const char *type) +{ + return popen(name,type); +} + +int portable_pclose(FILE *stream) +{ + return pclose(stream); +} + +void * portable_iconv_open(const char* tocode, const char* fromcode) +{ + return iconv_open(tocode,fromcode); +} + +size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft, + char** outbuf, size_t *outbytesleft) +{ +#if (defined(_LIBICONV_VERSION) && (_LIBICONV_VERSION==0x0109)) +#define CASTNEEDED(x) (x) +#else +#define CASTNEEDED(x) (char **)(x) +#endif + return iconv(cd,CASTNEEDED(inbuf),inbytesleft,outbuf,outbytesleft); +} + +int portable_iconv_close (void *cd) +{ + return iconv_close(cd); +} + diff --git a/src/portable.h b/src/portable.h new file mode 100644 index 0000000..0a88079 --- /dev/null +++ b/src/portable.h @@ -0,0 +1,38 @@ +#ifndef PORTABLE_H +#define PORTABLE_H + +#include +#include + +#if defined(_WIN32) +typedef __int64 portable_off_t; +#else +typedef off_t portable_off_t; +#endif + +/** @file + * @brief Portable versions of functions that are platform dependent. + */ + +int portable_system(const char *command,const char *args,bool commandHasConsole=TRUE); +uint portable_pid(); +const char * portable_getenv(const char *variable); +void portable_setenv(const char *variable,const char *value); +void portable_unsetenv(const char *variable); +portable_off_t portable_fseek(FILE *f,portable_off_t offset, int whence); +portable_off_t portable_ftell(FILE *f); +char portable_pathSeparator(); +char portable_pathListSeparator(); +const char * portable_ghostScriptCommand(); +const char * portable_dotCommand(); +bool portable_fileSystemIsCaseSensitive(); +FILE * portable_popen(const char *name,const char *type); +int portable_pclose(FILE *stream); +void * portable_iconv_open(const char* tocode, const char* fromcode); +size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft, + char* * outbuf, size_t *outbytesleft); +int portable_iconv_close (void *cd); + + +#endif + diff --git a/src/pre.h b/src/pre.h index 5ac13fd..e015d56 100644 --- a/src/pre.h +++ b/src/pre.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/pre.l b/src/pre.l index b303bf4..701e02e 100644 --- a/src/pre.l +++ b/src/pre.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -44,11 +44,7 @@ #include "defargs.h" #include "debug.h" #include "bufstr.h" - -#if defined(_MSC_VER) || defined(__BORLANDC__) -#define popen _popen -#define pclose _pclose -#endif +#include "portable.h" #define YY_NEVER_INTERACTIVE 1 @@ -202,7 +198,7 @@ static FILE *checkAndOpenFile(const QCString &absName) if (!filterName.isEmpty()) { QCString cmd = filterName+" \""+absName+"\""; - f=popen(cmd,"r"); + f=portable_popen(cmd,"r"); if (!f) err("Error: could not execute filter %s\n",cmd.data()); } else @@ -2112,7 +2108,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) if (getFileFilter(fs->fileName.data()).isEmpty()) fclose(fs->filePtr); else - pclose(fs->filePtr); + portable_pclose(fs->filePtr); YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER; yy_switch_to_buffer( fs->bufState ); yy_delete_buffer( oldBuf ); @@ -2384,7 +2380,7 @@ void preprocessFile(const char *fileName,BufStr &output) { QCString cmd = inputFilter+" \""+fileName+"\""; Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data()); - preYYin = popen(cmd,"r"); + preYYin = portable_popen(cmd,"r"); if (!preYYin) { err("Error: could not execute filter %s\n",cmd.data()); @@ -2406,7 +2402,7 @@ void preprocessFile(const char *fileName,BufStr &output) if (inputFilter.isEmpty()) fclose(preYYin); else - pclose(preYYin); + portable_pclose(preYYin); if (Debug::isFlagSet(Debug::Preprocessor)) { diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h index fa1ab26..faf9b16 100644 --- a/src/printdocvisitor.h +++ b/src/printdocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/pycode.h b/src/pycode.h index b3007d4..04ca268 100644 --- a/src/pycode.h +++ b/src/pycode.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/pycode.l b/src/pycode.l index 348b521..473d0f6 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/pyscanner.h b/src/pyscanner.h index 03dce0b..ebe9ab8 100644 --- a/src/pyscanner.h +++ b/src/pyscanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/pyscanner.l b/src/pyscanner.l index 478a5d2..bdd4f71 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/qtbc.h b/src/qtbc.h index b1baec4..61a7896 100644 --- a/src/qtbc.h +++ b/src/qtbc.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/reflist.cpp b/src/reflist.cpp index 99d94cd..edbf86a 100644 --- a/src/reflist.cpp +++ b/src/reflist.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/reflist.h b/src/reflist.h index bc2b52f..9e47505 100644 --- a/src/reflist.h +++ b/src/reflist.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index 0d99613..fb0b1e1 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -29,8 +29,8 @@ #include "parserintf.h" -#define DBG_RTF(x) m_t << x -//#define DBG_RTF(x) do {} while(0) +//#define DBG_RTF(x) m_t << x +#define DBG_RTF(x) do {} while(0) RTFDocVisitor::RTFDocVisitor(QTextStream &t,CodeOutputInterface &ci, const char *langExt) @@ -1294,12 +1294,12 @@ void RTFDocVisitor::visitPost(DocText *) DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocText)}\n"); } -static char* getMultiByte(int c) -{ - static char s[10]; - sprintf(s,"\\'%X",c); - return s; -} +//static char* getMultiByte(int c) +//{ +// static char s[10]; +// sprintf(s,"\\'%X",c); +// return s; +//} void RTFDocVisitor::filter(const char *str,bool verbatim) { @@ -1310,21 +1310,21 @@ void RTFDocVisitor::filter(const char *str,bool verbatim) unsigned char pc='\0'; while (*p) { - static bool MultiByte = FALSE; + //static bool MultiByte = FALSE; c=*p++; - if ( MultiByte ) - { - m_t << getMultiByte( c ); - MultiByte = FALSE; - continue; - } - if ( c >= 0x80 ) - { - MultiByte = TRUE; - m_t << getMultiByte( c ); - continue; - } + //if ( MultiByte ) + //{ + // m_t << getMultiByte( c ); + // MultiByte = FALSE; + // continue; + //} + //if ( c >= 0x80 ) + //{ + // MultiByte = TRUE; + // m_t << getMultiByte( c ); + // continue; + //} switch (c) { diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h index 5462480..63aa662 100644 --- a/src/rtfdocvisitor.h +++ b/src/rtfdocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 447cbdb..f6fb8af 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Parker Waechter & Dimitri van Heesch. + * Copyright (C) 1997-2007 by Parker Waechter & Dimitri van Heesch. * * Style sheet additions by Alexander Bartolich * @@ -324,6 +324,7 @@ void RTFGenerator::beginRTFSection() void RTFGenerator::startFile(const char *name,const char *,const char *) { + setEncoding(QCString().sprintf("CP%s",theTranslator->trRTFansicp().data())); QCString fileName=name; relPath = relativePathToRoot(fileName); @@ -1600,13 +1601,13 @@ void RTFGenerator::endSection(const char *lab,SectionInfo::SectionType) // writeSectionRef(name,lab,title); //} -char* RTFGenerator::getMultiByte(int c) -{ - static char s[10]; - - sprintf(s,"\\'%X",c); - return s; -} +//char* RTFGenerator::getMultiByte(int c) +//{ +// static char s[10]; +// +// sprintf(s,"\\'%X",c); +// return s; +//} void RTFGenerator::docify(const char *str) { @@ -1617,9 +1618,10 @@ void RTFGenerator::docify(const char *str) unsigned char pc='\0'; while (*p) { - static bool MultiByte = FALSE; + //static bool MultiByte = FALSE; c=*p++; +#if 0 if ( MultiByte ) { t << getMultiByte( c ); @@ -1632,6 +1634,7 @@ void RTFGenerator::docify(const char *str) t << getMultiByte( c ); continue; } +#endif switch (c) { @@ -1664,10 +1667,11 @@ void RTFGenerator::codify(const char *str) while (*p) { - static bool MultiByte = FALSE; + //static bool MultiByte = FALSE; c=*p++; +#if 0 if( MultiByte ) { t << getMultiByte( c ); @@ -1680,6 +1684,7 @@ void RTFGenerator::codify(const char *str) t << getMultiByte( c ); continue; } +#endif switch(c) { @@ -2517,3 +2522,26 @@ void RTFGenerator::rtfwriteRuler_thin() t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}" << endl; } +void RTFGenerator::postProcess(QByteArray &a) +{ + QByteArray enc(a.size()*4); // worst case + int off=0; + uint i; + for (i=0;i0x80) + { + char s[10]; + sprintf(s,"\\'%X",c); + qstrcpy(enc.data()+off,s); + off+=qstrlen(s); + } + else + { + enc.at(off++)=c; + } + } + enc.resize(off); + a = enc; +} diff --git a/src/rtfgen.h b/src/rtfgen.h index 8cc8c5c..2183237 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Parker Waechter & Dimitri van Heesch. + * Copyright (C) 1997-2007 by Parker Waechter & 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 @@ -49,6 +49,7 @@ class RTFGenerator : public OutputGenerator void writeFooter() {} void endFile(); void clearBuffer(); + void postProcess(QByteArray &); //void writeIndex(); @@ -298,7 +299,7 @@ class RTFGenerator : public OutputGenerator void rtfwriteRuler_thick(); void rtfwriteRuler_thin(); void writeRTFReference(const char *label); - char *getMultiByte(int c); + //char *getMultiByte(int c); }; #endif diff --git a/src/rtfstyle.cpp b/src/rtfstyle.cpp index 430ed37..ff3c2f1 100644 --- a/src/rtfstyle.cpp +++ b/src/rtfstyle.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/rtfstyle.h b/src/rtfstyle.h index 6f4af29..172e4fe 100644 --- a/src/rtfstyle.h +++ b/src/rtfstyle.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/scanner.h b/src/scanner.h index e82daf8..891487a 100644 --- a/src/scanner.h +++ b/src/scanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/scanner.l b/src/scanner.l index 5d75f5f..ec6ff31 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2005 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/searchindex.cpp b/src/searchindex.cpp index 2610c52..acc6a58 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/searchindex.h b/src/searchindex.h index e5c9387..8a2bf08 100644 --- a/src/searchindex.h +++ b/src/searchindex.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/section.h b/src/section.h index 70dd5e1..2423a5f 100644 --- a/src/section.h +++ b/src/section.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/sortdict.h b/src/sortdict.h index 07c450a..790d796 100644 --- a/src/sortdict.h +++ b/src/sortdict.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/store.cpp b/src/store.cpp index 5e6e8f7..328b679 100644 --- a/src/store.cpp +++ b/src/store.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -17,6 +17,7 @@ */ #include "store.h" +#include "portable.h" #include @@ -26,7 +27,7 @@ #include #define BLOCK_SIZE 512 // should be >8 and a multiple of 8 -#define BLOCK_POINTER_SIZE sizeof(off_t) +#define BLOCK_POINTER_SIZE sizeof(portable_off_t) #define ASSERTS_ENABLED @@ -37,12 +38,6 @@ #define STORE_ASSERT(x) #endif -#ifdef _WIN32 // TODO: add 64bit support using _fseeki64 and _ftelli64 (studio 2003+ req) -#define fseeko fseek -#define ftello ftell -#endif - - //------------------------------------------------------------------------------------ Store::Store() @@ -101,20 +96,20 @@ void Store::close() m_state = Init; } -off_t Store::alloc() +portable_off_t Store::alloc() { STORE_ASSERT(m_state==Reading); m_state=Writing; - off_t pos; + portable_off_t pos; if (m_head==0) // allocate new block { //printf("alloc: new block\n"); - if (fseeko(m_file,0,SEEK_END)==-1) // go to end of the file + if (portable_fseek(m_file,0,SEEK_END)==-1) // go to end of the file { fprintf(stderr,"Store::alloc: Error seeking to end of file: %s\n",strerror(errno)); exit(1); } - pos = ftello(m_file); + pos = portable_ftell(m_file); STORE_ASSERT( (pos & (BLOCK_SIZE-1))==0 ); m_front = pos + BLOCK_SIZE; // move front to end of this block } @@ -127,7 +122,7 @@ off_t Store::alloc() m_head = node->next; delete node; // move to start of the block - if (fseeko(m_file,pos,SEEK_SET)==-1) + if (portable_fseek(m_file,pos,SEEK_SET)==-1) { fprintf(stderr,"Store::alloc: Error seeking to position %d: %s\n", (int)pos,strerror(errno)); @@ -142,10 +137,10 @@ off_t Store::alloc() int Store::write(const char *buf,uint size) { STORE_ASSERT(m_state==Writing); - //printf("%x: Store::write\n",(int)ftello(m_file)); + //printf("%x: Store::write\n",(int)portable_ftell(m_file)); do { - off_t curPos = ftello(m_file); + portable_off_t curPos = portable_ftell(m_file); int bytesInBlock = BLOCK_SIZE - BLOCK_POINTER_SIZE - (curPos & (BLOCK_SIZE-1)); int bytesLeft = bytesInBlock<(int)size ? (int)size-bytesInBlock : 0; int numBytes = size - bytesLeft; @@ -162,26 +157,26 @@ int Store::write(const char *buf,uint size) } if (bytesLeft>0) // still more bytes to write { - STORE_ASSERT(((ftello(m_file)+BLOCK_POINTER_SIZE)&(BLOCK_SIZE-1))==0); + STORE_ASSERT(((portable_ftell(m_file)+BLOCK_POINTER_SIZE)&(BLOCK_SIZE-1))==0); // allocate new block if (m_head==0) // no free blocks to reuse { - //printf("%x: Store::write: new: pos=%x\n",(int)m_front,(int)ftello(m_file)); + //printf("%x: Store::write: new: pos=%x\n",(int)m_front,(int)portable_ftell(m_file)); // write pointer to next block if (fwrite(&m_front,BLOCK_POINTER_SIZE,1,m_file)!=1) { fprintf(stderr,"Error writing to store: %s\n",strerror(errno)); exit(1); } - STORE_ASSERT(ftello(m_file)==(curPos&~(BLOCK_SIZE-1))+BLOCK_SIZE); + STORE_ASSERT(portable_ftell(m_file)==(curPos&~(BLOCK_SIZE-1))+BLOCK_SIZE); // move to next block - if (fseeko(m_file,0,SEEK_END)==-1) // go to end of the file + if (portable_fseek(m_file,0,SEEK_END)==-1) // go to end of the file { fprintf(stderr,"Store::alloc: Error seeking to end of file: %s\n",strerror(errno)); exit(1); } - STORE_ASSERT(ftello(m_file)==m_front); + STORE_ASSERT(portable_ftell(m_file)==m_front); // move front to the next of the block m_front+=BLOCK_SIZE; } @@ -194,12 +189,12 @@ int Store::write(const char *buf,uint size) exit(1); } Node *node = m_head; - off_t pos = node->pos; + portable_off_t pos = node->pos; // point head to next free item m_head = node->next; delete node; // move to start of the block - if (fseeko(m_file,pos,SEEK_SET)==-1) + if (portable_fseek(m_file,pos,SEEK_SET)==-1) { fprintf(stderr,"Store::write: Error seeking to position %d: %s\n", (int)pos,strerror(errno)); @@ -218,7 +213,7 @@ int Store::write(const char *buf,uint size) void Store::end() { STORE_ASSERT(m_state==Writing); - off_t curPos = ftello(m_file); + portable_off_t curPos = portable_ftell(m_file); int bytesInBlock = BLOCK_SIZE - (curPos & (BLOCK_SIZE-1)); //printf("%x: Store::end erasing %x bytes\n",(int)curPos&~(BLOCK_SIZE-1),bytesInBlock); //printf("end: bytesInBlock=%x\n",bytesInBlock); @@ -231,13 +226,13 @@ void Store::end() m_state=Reading; } -void Store::release(off_t pos) +void Store::release(portable_off_t pos) { STORE_ASSERT(m_state==Reading); //printf("%x: Store::release\n",(int)pos); STORE_ASSERT(pos>0 && (pos & (BLOCK_SIZE-1))==0); // goto end of the block - off_t cur = pos, next; + portable_off_t cur = pos, next; while (1) { // add new node to the free list @@ -247,7 +242,7 @@ void Store::release(off_t pos) m_head = node; // goto the end of cur block - if (fseeko(m_file,cur+BLOCK_SIZE-BLOCK_POINTER_SIZE,SEEK_SET)==-1) + if (portable_fseek(m_file,cur+BLOCK_SIZE-BLOCK_POINTER_SIZE,SEEK_SET)==-1) { fprintf(stderr,"Store::release: Error seeking to position %d: %s\n", (int)(cur+BLOCK_SIZE-BLOCK_POINTER_SIZE),strerror(errno)); @@ -266,11 +261,11 @@ void Store::release(off_t pos) } } -void Store::seek(off_t pos) +void Store::seek(portable_off_t pos) { STORE_ASSERT(m_state==Reading); //printf("%x: Store::seek\n",(int)pos); - if (fseeko(m_file,pos,SEEK_SET)==-1) + if (portable_fseek(m_file,pos,SEEK_SET)==-1) { fprintf(stderr,"Store::seek: Error seeking to position %d: %s\n", (int)pos,strerror(errno)); @@ -282,10 +277,10 @@ void Store::seek(off_t pos) int Store::read(char *buf,uint size) { STORE_ASSERT(m_state==Reading); - //printf("%x: Store::read total=%d\n",(int)ftello(m_file),size); + //printf("%x: Store::read total=%d\n",(int)portable_ftell(m_file),size); do { - off_t curPos = ftello(m_file); + portable_off_t curPos = portable_ftell(m_file); int bytesInBlock = BLOCK_SIZE - BLOCK_POINTER_SIZE - (curPos & (BLOCK_SIZE-1)); int bytesLeft = bytesInBlock<(int)size ? (int)size-bytesInBlock : 0; int numBytes = size - bytesLeft; @@ -293,7 +288,7 @@ int Store::read(char *buf,uint size) if (numBytes>0) { - //printf("%x: Store::read: %d out of %d bytes\n",(int)ftello(m_file),numBytes,size); + //printf("%x: Store::read: %d out of %d bytes\n",(int)portable_ftell(m_file),numBytes,size); if ((int)fread(buf,1,numBytes,m_file)!=numBytes) { fprintf(stderr,"Error reading from store: %s\n",strerror(errno)); @@ -303,9 +298,9 @@ int Store::read(char *buf,uint size) } if (bytesLeft>0) { - off_t newPos; + portable_off_t newPos; // read offset of the next block - STORE_ASSERT(((ftello(m_file)+BLOCK_POINTER_SIZE)&(BLOCK_SIZE-1))==0); + STORE_ASSERT(((portable_ftell(m_file)+BLOCK_POINTER_SIZE)&(BLOCK_SIZE-1))==0); if (fread((char *)&newPos,BLOCK_POINTER_SIZE,1,m_file)!=1) { fprintf(stderr,"Error reading from store: %s\n",strerror(errno)); @@ -317,7 +312,7 @@ int Store::read(char *buf,uint size) STORE_ASSERT((newPos&(BLOCK_SIZE-1))==0); curPos = newPos; // move to next block - if (fseeko(m_file,curPos,SEEK_SET)==-1) + if (portable_fseek(m_file,curPos,SEEK_SET)==-1) { fprintf(stderr,"Store::read: Error seeking to position %d: %s\n", (int)curPos,strerror(errno)); @@ -335,7 +330,7 @@ int Store::read(char *buf,uint size) void Store::printFreeList() { printf("FreeList: "); - off_t pos = m_head->pos; + portable_off_t pos = m_head->pos; while (pos) { printf("%x ",(int)pos); @@ -354,7 +349,7 @@ void Store::printStats() int main() { - printf("sizeof(off_t)=%d\n",(int)sizeof(off_t)); + printf("sizeof(portable_off_t)=%d\n",(int)sizeof(portable_off_t)); Store s; if (s.open("test.db")==0) { @@ -366,13 +361,13 @@ int main() { char buf[100]; - off_t handle = s.alloc(); + portable_off_t handle = s.alloc(); for (i=0;i<1000000000;i++) { s.write(str1,strlen(str1)+1); } s.end(); - off_t handle2 = s.alloc(); + portable_off_t handle2 = s.alloc(); for (i=0;i<10;i++) { s.write(str2,strlen(str2)+1); diff --git a/src/store.h b/src/store.h index 3fc3ac0..4e0503e 100644 --- a/src/store.h +++ b/src/store.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -20,7 +20,8 @@ #include #include -#include + +#include "portable.h" /*! @brief Abstract interface for file based memory storage operations */ class StorageIntf @@ -63,7 +64,7 @@ class Store : public StorageIntf int open(const char *name); /*! Allocates a handle to write to and read from. */ - off_t alloc(); + portable_off_t alloc(); /*! Writes \a size bytes in array \a buf to the store. * First alloc() has to be called. @@ -78,13 +79,13 @@ class Store : public StorageIntf void end(); /*! Releases the memory corresponding to the handle returned with alloc() */ - void release(off_t handle); + void release(portable_off_t handle); /*! Closes the store */ void close(); /*! Goes to the start of information corresponding to handle \a pos */ - void seek(off_t handle); + void seek(portable_off_t handle); /*! Reads \a size bytes from the store into the array pointed to be \a buf. * \note Before reading seek() has to be called to set the right start of the store. @@ -102,12 +103,12 @@ class Store : public StorageIntf }; struct Node { - off_t pos; + portable_off_t pos; struct Node *next; }; void printFreeList(); FILE *m_file; - off_t m_front; + portable_off_t m_front; Node *m_head; State m_state; int m_reads; diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 8fd61a8..22a0648 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/tagreader.h b/src/tagreader.h index d52b3df..6bc466e 100644 --- a/src/tagreader.h +++ b/src/tagreader.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/textdocvisitor.cpp b/src/textdocvisitor.cpp index a2c722b..fe5573b 100644 --- a/src/textdocvisitor.cpp +++ b/src/textdocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/textdocvisitor.h b/src/textdocvisitor.h index 3fcf96a..cf7788a 100644 --- a/src/textdocvisitor.h +++ b/src/textdocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/translator.h b/src/translator.h index 449af81..dc18558 100644 --- a/src/translator.h +++ b/src/translator.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/translator_ar.h b/src/translator_ar.h index 7ce9c0a..6a37040 100644 --- a/src/translator_ar.h +++ b/src/translator_ar.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2005 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -71,7 +71,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6 /*! return the language charset. This will be used for the HTML output */ virtual QCString idLanguageCharset() { - return "cp 1256"; + return "cp1256"; } // --- Language translation methods ------------------- diff --git a/src/translator_br.h b/src/translator_br.h index 51f426d..da6bdbd 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -64,7 +64,7 @@ class TranslatorBrazilian : public Translator */ virtual QCString latexLanguageSupportCommand() { - return ""; + return "\\usepackage[spanish]{babel}"; } /*! return the language charset. This will be used for the HTML output */ diff --git a/src/translator_ca.h b/src/translator_ca.h index d2a0be3..5380d0a 100644 --- a/src/translator_ca.h +++ b/src/translator_ca.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -70,7 +70,8 @@ class TranslatorCatalan : public Translator */ virtual QCString latexLanguageSupportCommand() { - return "\\usepackage[catalan]{babel} \n\\usepackage[latin1]{inputenc}"; + //return "\\usepackage[catalan]{babel}\n\\usepackage[latin1]{inputenc}"; + return "\\usepackage[catalan]{babel}\n"; } /*! return the language charset. This will be used for the HTML output */ diff --git a/src/translator_cn.h b/src/translator_cn.h index 3233755..ac2bb6d 100644 --- a/src/translator_cn.h +++ b/src/translator_cn.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/translator_cz.h b/src/translator_cz.h index 348e2b7..ef261ed 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -96,14 +96,14 @@ class TranslatorCzech : public Translator */ inline QCString decode(const QCString & sInput) { - if (Config_getBool("USE_WINDOWS_ENCODING")) - { + //if (Config_getBool("USE_WINDOWS_ENCODING")) + //{ return sInput; - } - else - { - return Win1250ToISO88592(sInput); - } + //} + //else + //{ + // return Win1250ToISO88592(sInput); + //} } public: @@ -113,19 +113,22 @@ class TranslatorCzech : public Translator { return "czech"; } virtual QCString latexLanguageSupportCommand() - { return "\\usepackage{czech}\n"; } + { + return "\\usepackage[T2A]{fontenc}\n" + "\\usepackage[czech]{babel}\n"; + } /*! return the language charset. This will be used for the HTML output */ virtual QCString idLanguageCharset() { - if (Config_getBool("USE_WINDOWS_ENCODING")) - { + //if (Config_getBool("USE_WINDOWS_ENCODING")) + //{ return "windows-1250"; - } - else - { - return "iso-8859-2"; - } + //} + //else + //{ + // return "iso-8859-2"; + //} } // --- Language translation methods ------------------- diff --git a/src/translator_de.h b/src/translator_de.h index 2b40e9d..f36c971 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -137,9 +137,10 @@ class TranslatorGerman : public Translator */ virtual QCString latexLanguageSupportCommand() { - QCString result="\\usepackage{ngerman}\n"; - result+="\\usepackage[latin1]{inputenc}\n"; + //QCString result="\\usepackage{ngerman}\n"; + //result+="\\usepackage[latin1]{inputenc}\n"; //result+="%\\usepackage[latin1]{inputenc}% Kodierung (cp850,latin1,ansinew)\n"; + QCString result="\\usepackage[german]{babel}\n"; return result; } diff --git a/src/translator_dk.h b/src/translator_dk.h index 1168a38..c6fe415 100644 --- a/src/translator_dk.h +++ b/src/translator_dk.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -109,7 +109,6 @@ class TranslatorDanish : public Translator { return "\\usepackage[danish]{babel}\n" - "\\usepackage[latin1]{inputenc}\n" "\\usepackage[T1]{fontenc}\n"; } diff --git a/src/translator_en.h b/src/translator_en.h index 877f861..b53a355 100644 --- a/src/translator_en.h +++ b/src/translator_en.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 diff --git a/src/translator_es.h b/src/translator_es.h index 10b2aa7..996665d 100644 --- a/src/translator_es.h +++ b/src/translator_es.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2006 by Dimitri van Heesch. + * Copyright (C) 1997-2007 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 @@ -21,17 +21,28 @@ * - It's posible that some sentences haven't got meaning because * some words haven't got translate in spanish. * Updated from 1.3.8 to 1.4.6 by Guillermo Ballester Valor (May-05-2006) + * Updated fron 1.4.6 to 1.5.1 by Bartomeu Creus Navarro (22-enero-2007) */ #ifndef TRANSLATOR_ES_H #define TRANSLATOR_ES_H -class TranslatorSpanish : public TranslatorAdapter_1_4_6 +class TranslatorSpanish : public Translator { + public: + + // --- Language control methods ------------------- + + /*! Used for identification of the language. The identification + * should not be translated. It should be replaced by the name + * of the language in English using lower-case characters only + * (e.g. "czech", "japanese", "russian", etc.). It should be equal to + * the identification used in language.cpp. + */ virtual QCString idLanguage() { return "spanish"; } - + /*! Used to get the LaTeX command(s) for the language support. * This method should return string with commands that switch * LaTeX to the desired language. For example @@ -57,6 +68,8 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 return "iso-8859-1"; } + // --- Language translation methods ------------------- + /*! used in the compound documentation before a list of related functions. */ virtual QCString trRelatedFunctions() { return "Funciones relacionadas"; } @@ -83,7 +96,16 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 /*! header that is put before the list of member attributes. */ virtual QCString trMemberDataDocumentation() - { return "Documentacin de los datos miembro"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Documentacin de los campos"; + } + else + { + return "Documentacin de los datos miembro"; + } + } /*! this is the text of a link put after brief descriptions. */ virtual QCString trMore() @@ -141,23 +163,46 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 /*! This is put above each page as a link to the list of annotated classes */ virtual QCString trCompoundList() - { return "Lista de componentes"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Estructura de datos"; + } + else + { + return "Lista de clases"; + } + } /*! This is put above each page as a link to the list of documented files */ virtual QCString trFileList() { return "Lista de archivos"; } - /*! This is put above each page as a link to the list of all verbatim headers */ - virtual QCString trHeaderFiles() - { return "Archivos cabecera"; } - /*! This is put above each page as a link to all members of compounds. */ virtual QCString trCompoundMembers() - { return "Miembros de las clases"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Campos de datos"; + } + else + { + return "Miembros de las clases"; + } + } /*! This is put above each page as a link to all members of files. */ virtual QCString trFileMembers() - { return "Archivos de los miembros"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Globales"; + } + else + { + return "Miembros de los ficheros"; + } + } /*! This is put above each page as a link to all related pages. */ virtual QCString trRelatedPages() @@ -173,8 +218,8 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 /*! This is an introduction to the class hierarchy. */ virtual QCString trClassHierarchyDescription() - { return "Esta lista de herencias esta ordenada rigurosamente, " - "pero no completa, por orden alfabtico:"; + { return "Esta lista de herencias esta ordenada " + "aproximadamente por orden alfabtico:"; } /*! This is an introduction to the list with all files. */ @@ -188,40 +233,82 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 /*! This is an introduction to the annotated compound list. */ virtual QCString trCompoundListDescription() - { return "Lista de las clases, estructuras, " + { + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Lista de estructuras con una breve descripcin:"; + } + else + { + return "Lista de las clases, estructuras, " "uniones e interfaces con una breve descripcin:"; + } } /*! This is an introduction to the page with all class members. */ virtual QCString trCompoundMembersDescription(bool extractAll) { - QCString result="Lista de"; - if (!extractAll) result+=" toda la documentacin de"; - result+=" los miembros de la clase con enlaces a "; + QCString result="Esta es la lista de todos los "; + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="campos de estructuras y uniones"; + } + else + { + result+="campos de clases"; + } + if (!extractAll) + { + result+=" documentados"; + } + result+=" con enlaces a "; if (!extractAll) - result+=" la documentacin de cada clase:"; + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="la documentacin de la estructura/unin para cada campo:"; + } + else + { + result+="la documentacin de la clase para cada miembro:"; + } + } else - result+=" la clase de la que forman parte:"; + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="las estructuras/uniones a que pertenecen:"; + } + else + { + result+="las classes a que pertenecen:"; + } + } return result; } /*! This is an introduction to the page with all file members. */ virtual QCString trFileMembersDescription(bool extractAll) { - QCString result="Lista de "; - if (!extractAll) result+="toda la documentacin de "; - result+="los miembros con enlaces a "; + QCString result="Esta es la lista de "; + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="todas las funciones, variables, definiciones, enumeraciones y definiciones de tipos"; + } + else + { + result+="todos los mienbros de los ficheros"; + } + if (!extractAll) result+=" documentados"; + result+=" con enlaces "; if (extractAll) - result+="los documentos de cada archivo a los que pertenecen:"; + result+="a los ficheros a los que corresponden:"; else - result+="los archivos de los que forman parte:"; + result+="a la documentacin:"; return result; } - /*! This is an introduction to the page with the list of all header files. */ - virtual QCString trHeaderFilesDescription() - { return "Lista de los archivos cabecera que crean el API:"; } - /*! This is an introduction to the page with the list of all examples */ virtual QCString trExamplesDescription() { return "Lista de todos los ejemplos:"; } @@ -234,15 +321,8 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 virtual QCString trModulesDescription() { return "Lista de todos los mdulos:"; } - /*! This sentences is used in the annotated class/file lists if no brief - * description is given. - */ - virtual QCString trNoDescriptionAvailable() - { return "Descripcin no disponible"; } - // index titles (the project name is prepended for these) - /*! This is used in HTML as the title of index.html. */ virtual QCString trDocumentation() { return "Documentacin"; } @@ -263,7 +343,16 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 * annotated compound index. */ virtual QCString trCompoundIndex() - { return "Indice de clases"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "ndice de estructura de datos"; + } + else + { + return "ndice de clases"; + } + } /*! This is used in LaTeX as the title of the chapter with the * list of all files. @@ -281,7 +370,16 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 * the documentation of all classes, structs and unions. */ virtual QCString trClassDocumentation() - { return "Documentacin de clases"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Documentacin de las estructuras de datos"; + } + else + { + return "Documentacin de las clases"; + } + } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all files. @@ -347,15 +445,6 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 virtual QCString trEnumerationValues() { return "Valores de la enumeracin"; } - /*! This text is generated when the \\author command is used and - * for the author section in man pages. */ - virtual QCString trAuthor(bool first_capital, bool singular) - { - QCString result((first_capital ? "Autor" : "autor")); - if (!singular) result+="s"; - return result; - } - /*! This is used in the documentation of a file before the list of * documentation blocks for defines */ @@ -381,12 +470,6 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 { return "Documentacin de las enumeraciones"; } /*! This is used in the documentation of a file/namespace before the list - * of documentation blocks for enumeration values - */ - virtual QCString trEnumerationValueDocumentation() - { return "Documentacin de los valores de la enumeracin"; } - - /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for functions */ virtual QCString trFunctionDocumentation() @@ -402,7 +485,16 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 * the list of links to documented compounds */ virtual QCString trCompounds() - { return "Clases"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Estructuras de datos"; + } + else + { + return "Clases"; + } + } /*! This is used in the standard footer of each page and indicates when * the page was generated @@ -431,18 +523,10 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 virtual QCString trForInternalUseOnly() { return "Para uso interno exclusivamente."; } - /*! this text is generated when the \\reimp command is used. */ - virtual QCString trReimplementedForInternalReasons() - { return "Reimplementado por razones internas; el API no se ve afectado."; } - /*! this text is generated when the \\warning command is used. */ virtual QCString trWarning() { return "Atencin"; } - /*! this text is generated when the \\bug command is used. */ - virtual QCString trBugsAndLimitations() - { return "Bugs y limitaciones"; } - /*! this text is generated when the \\version command is used. */ virtual QCString trVersion() { return "Versin"; } @@ -451,7 +535,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 virtual QCString trDate() { return "Fecha"; } - /*! this text is generated when the \return command is used. */ + /*! this text is generated when the \\return command is used. */ virtual QCString trReturns() { return "Devuelve"; } @@ -471,7 +555,9 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 virtual QCString trGeneratedBy() { return "Generado por"; } - // new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// /*! used as the title of page containing all the index of all namespaces. */ virtual QCString trNamespaceList() @@ -509,9 +595,8 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 /*! used as the title of the HTML page of a class/struct/union */ virtual QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, - bool /*isTemplate*/) + bool isTemplate) { - QCString result="Referencia de "; switch(compType) { @@ -519,10 +604,11 @@ class TranslatorSpanish : public TranslatorAdapter_1_4_6 case ClassDef::Struct: result+="la Estructura "; break; case ClassDef::Union: result+="la Unin "; break; case ClassDef::Interface: result+="la Interfaz "; break; - case ClassDef::Protocol: result+="Protocol "; break; // translate me! - case ClassDef::Category: result+="Category "; break; // translate me! + case ClassDef::Protocol: result+="el Protocolo "; break; + case ClassDef::Category: result+="la Categoria "; break; case ClassDef::Exception: result+="la Excepcin "; break; } + if (isTemplate) result+="